fix setCommand
so it behaves like regular nim invocation and so that projectName, outFile, json file etc are correct
#18555
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.
setCommand
are now correct and consistent with what you'd have if you'd use a regular nim compilation command, as can be seen with adding this to test/tlex.nim in https://github.com/flyx/NimYAML:before PR, those paths were wrong (outFile is assumed to be base name in rest of code):
("test/tlex", "/private/tmp/d13/NimYAML", "test/tlex", "/private/tmp/d13/NimYAML", "/private/tmp/d13/NimYAML/test/tlex", "c")
after PR, those paths are correct:
("tlex", "/private/tmp/d13/NimYAML/test", "tlex", "/private/tmp/d13/NimYAML/test", "/private/tmp/d13/NimYAML/test/tlex", "c")
and they're the same as what you'd have with:
nim c -r --nimcache:/tmp/c09f test/tlex
note
before #18100, writeJsonBuildInstructions would silently not write the json file (because of the above bug in setCommand which resulted in a wrong value for
jsonBuildInstructionsFile
); after #18100 it would crash as mentioned in #18543 (comment) as a result of this;after this PR, the paths computed after
setCommand
are now correct, sojsonBuildInstructionsFile
is also correct and the json file is indeed written (and-d:nimBetterRun
is honored)azure CI keeps getting cancelled for some unrelated reason
EDIT: upstream issue, refs https://docs.microsoft.com/en-us/answers/questions/484649/an-error-occurred-while-provisioning-resources-err.html