Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix setCommand so it behaves like regular nim invocation and so that projectName, outFile, json file etc are correct #18555

Merged
merged 1 commit into from
Jul 22, 2021

Conversation

timotheecour
Copy link
Member

@timotheecour timotheecour commented Jul 21, 2021

import std/compilesettings
static: echo "recompiling"
static: echo (querySetting(outFile), querySetting(outDir), querySetting(projectName), querySetting(projectPath), querySetting(projectFull), querySetting(command))

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, so jsonBuildInstructionsFile is also correct and the json file is indeed written (and -d:nimBetterRun is honored)

azure CI keeps getting cancelled for some unrelated reason

##[error]An error occurred while provisioning resources (Error Type: Failure).
,##[error]The remote provider was unable to process the request.

EDIT: upstream issue, refs https://docs.microsoft.com/en-us/answers/questions/484649/an-error-occurred-while-provisioning-resources-err.html

@timotheecour timotheecour changed the title fix setCommand so it behaves like regular nim invocation fix setCommand so it behaves like regular nim invocation and so that projectName, outFile, json file etc are correct Jul 21, 2021
@timotheecour timotheecour reopened this Jul 21, 2021
@timotheecour timotheecour marked this pull request as ready for review July 21, 2021 22:46
@Araq Araq merged commit d5b5827 into nim-lang:devel Jul 22, 2021
@Araq
Copy link
Member

Araq commented Jul 22, 2021

Superb work, thanks!

sthagen added a commit to sthagen/nim-lang-Nim that referenced this pull request Jul 22, 2021
fix setCommand so it behaves like regular nim invocation (nim-lang#18555)
@timotheecour timotheecour deleted the pr_fix_setCommand branch July 22, 2021 06:40
PMunch pushed a commit to PMunch/Nim that referenced this pull request Mar 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants