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

nimble -v may bootstrap Nim compiler from sources #1232

Closed
alex65536 opened this issue Jun 30, 2024 · 1 comment · Fixed by #1234
Closed

nimble -v may bootstrap Nim compiler from sources #1232

alex65536 opened this issue Jun 30, 2024 · 1 comment · Fixed by #1234

Comments

@alex65536
Copy link

When Nim executable is not found, then nimble -v will try to download and bootstrap the Nim compiler from sources, even though it's not necessary at all to have a working compiler for just showing version info.

It is really an issue because of choosenim. choosenim tries to call nimble -v before it produces a valid symlink to nim executable. So, when nimble -v is executed, then it tries to boostrap the compiler from sources, leading to much unnecessary CPU usage.

The main outcome of this issue is that running choosenim update 2.0.6 from scratch takes approximately six minutes, making CI runs last much longer than expected.

Note that Nim 2.0.4 is shipped with a version of nimble which doesn't try to bootstrap the compiler on -v when it's not found, but fails with an error instead. So, the problem was not visible before Nim 2.0.6 official release.

It's probably also a good idea to fix this issue in choosenim by preventing it from calling nimble -v.

@alex65536
Copy link
Author

See also: nim-lang/choosenim#6

jmgomez added a commit to jmgomez/nimble that referenced this issue Jul 4, 2024
@Araq Araq closed this as completed in #1234 Jul 4, 2024
Araq pushed a commit that referenced this issue Jul 4, 2024
* `nimble -v` should not compile Nim Fixes #1232

* help should not compile Nim Fixes #1227
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants