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

choosenim breaks nim when used with custom paths #61

Open
peppergrayxyz opened this issue Dec 19, 2024 · 0 comments
Open

choosenim breaks nim when used with custom paths #61

peppergrayxyz opened this issue Dec 19, 2024 · 0 comments

Comments

@peppergrayxyz
Copy link

choosenim alters nim in a way that breaks it when used with custom paths:

$ choosenim --choosenimDir:$nimpath/my-choosenim --nimbleDir:$nimpath/my-nimbledir stable
$ export PATH=$nimpath/my-nimbledir/bin:$PATH
$ nim --version

Expected Behavior:

Nim Compiler Version 2.2.0 [Linux: amd64]
Compiled at 2024-10-02
Copyright (c) 2006-2024 by Andreas Rumpf

git hash: 78983f1876726a49c69d65629ab433ea1310ece1
active boot switches: -d:release

Actual Behavior:

     Error: getAppFilename failed. (Error was: Unable to read /home/user/.choosenim/current. (Error was: No installation has been chosen. (File missing: /home/user/.choosenim/current)))
      Info: If unexpected, please report this error to https://github.com/nim-lang/choosenim

Observations:

When building nim from source, this behavior is not present.

See also: nim-lang/Nim#24281 (comment)

The string If unexpected, please report this error doesn't even show up in nim source. Checking all repos, it only shows up in the source code of choosenim. For some resons this check ends up in the binaries (nim, nimble, etc.) when fetched via choosenim.

via choosenim

strings nim | grep unexpected
@If unexpected, please report this error to https://github.com/nim-lang/choosenim

built from source:

strings nim | grep unexpected
lowerings.nim(250, 3) `field != unexpected construct in the new-styled concept: cannot infer the value of the st static param '
 unexpectedly found, while the following intermediate section level(s) are mississing on lines 
@unexpected postprocess directive
@unexpected set type kind
@unexpected pragma
@unexpected indentation in quoted literal block
@unexpected de-indentation in Markdown code block

If this behavior is intended, there should be an env-var or something to set the path.

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

No branches or pull requests

1 participant