-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
os.nim Error: cannot evaluate at compile time: environment #5867
Comments
Same issue here (also arch). Rolled back to 0.16.0-2 and working fine again... |
Here's what can reproduce it (Nim Compiler Version 0.17.0 (2017-05-22) [Linux: amd64] from the Archlinux community repo): import os
echo "asdf" Pretty annoying, any program that imports |
Just tested with a fresh nim compiled from the git repo, and everything is fine. |
That's pretty bad, can we notify the maintainer of the Arch package somehow? |
I found what's wrong. Presence of |
Bug now reported on Archlinux's bug tracker, with a patch attached for the PKGBUILD |
Please test this well, IIRC there is a reason for this .nimble file's existence. Also I don't understand how the presence of that file could possibly cause that issue so are you sure this is the cause? |
Affects me too. |
I'm entirely sure removing that file makes the compiler work, I'm not sure what more there is to test.
and is originally at the root of the Nim repo. Here's a sample of the archlinux package buidling script for nim:
That file just has nothing to do in You can probably test it out on your own system by copying that |
You can reproduce it on non-archlinux systems like this:
|
Hello, this also fixes the problem for me. I was importing os also. |
Me too. Also on Arch. |
The compiler VM relies on |
Removing the |
What would make the compiler fail to import the compiler package if that compiler.nimble is not present ? |
Its contents do not matter, it's its mere existance to cause things to end up in the "compiler" namespace rather than the "stdlib" namespace. |
I have the same issue on Manjaro |
@andreaferretti the current releases don't allow to simply kill the compiler distribution in the nim package. Doing so results in nimble not being able to build with system nim because of missing "compiler/ast". |
@anthraxx I think you should ask to the mantainer of the Nim Arch package. This seems a packaging error on their part, it is not something that ca be fixed upstream |
I am the packager. Fact is, if I remove the compiler sources then nimble can't build. If I don't, then the os import fails. I don't see how this can be solved in a sane way on the packaging side while using system nim for nimble.
|
Are yo the packager of Nim or the packager of Nimble? As far as I understand from this discussion, the issue is that Nim is packaged incorrectly. This sentence
makes me think you are only packaging nimble - not having control over "system nim". Am I understanding correctly? |
No, you are not. I control both packages, it's Nim and nimble itself that refuse to work together with the described problems and linked references.
|
@anthraxx The fix is not to Solution: |
@idlewan that finally sounds like a proper solution, thanks a lot for the efforts and investigation 👍 I will make extended tests and release new packages. If everything works as I expect it, i will close the ticket. Merci |
I am happy that works for you. The fact that |
@andreaferretti mentioning it dozen of times to remove it is not the same like mentioning to put it somewhere else where it makes both use cases happy. but never mind, it works now |
Hi,
I'm trying to build and package nimble for Arch Linux using the latest nim 0.17.0 and it started failing with this version:
I'm a bit lost as I can't spot the problem when taking a look at the nim file. As this only popped up with nim 0.17.0 and seems to come out of the nim library files, i believe it may be an issue on nim's side.
The text was updated successfully, but these errors were encountered: