quick fix for bsc, bsdep path #886
Merged
Add this suggestion to a batch that can be applied as a single commit. This suggestion is invalid because no changes were made to the code. Suggestions cannot be applied while the pull request is closed. Suggestions cannot be applied while viewing a subset of changes. Only one suggestion per line can be applied in a batch. Add this suggestion to a batch that can be applied as a single commit. Applying suggestions on deleted lines is not supported. You must change the existing code in this line in order to create a valid suggestion. Outdated suggestions cannot be applied. This suggestion has been applied or marked resolved. Suggestions cannot be applied from pending reviews. Suggestions cannot be applied on multi-line comments. Suggestions cannot be applied while the pull request is queued to merge. Suggestion cannot be applied right now. Please check back later.
Currently,
bsb.exeassume thatbsc.exeandbsdep.exeare sitting in the same directory asbsb.exe.And it try to figure out the path of
bsc.exeby using Sys.executable_name.Note this is not nice that Sys.executable_name does not always return an absolute path, if it returns
a relative path(it can in theory change each time of invocation), we have to adjust it to the working dir
lib/bs, the worse thing is that if we change the path ofbsb.exe, it may impact the path, and ninja will recalculate all deps (the ninja behavior is correct)A simple solution in the future would be just hard code the absolute path of
bsb.exeduring configuration, and we add a check ifbsb.exe's path has changed during each executionAlso allow people to configure
bsc.exeandbsdep.exeseems to be a bad idea@chenglou