-
Notifications
You must be signed in to change notification settings - Fork 65
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 devel --latest
fails build
#256
Comments
As @alaviss mentioned here, choosenim needs to start using csources_v1. /cc @timotheecour |
Why do we have a |
the rationale for a new repo csources_v1 instead of csources was avoid breaking scripts from older nim versions relying on This new design is forward compatible, as it specifies the version (git hash) of csources_v1 from which to bootstrap (analog to a git submodule). All those details are abstracted out via a bash API which is the recommended way to bootstrap from csources_v1, and which all the CI scripts in nim repo now follow:
choosenim should be updated as follows:
If for some reason (please explain) something more granular is needed than |
Would it be possible to provide a backward compatible wrapper around this new mechanism? i.e. a |
how would that help given that older nim versions don't have such a the only correct way is to customize the logic based on which nim version is being built; it should be as simple as I do intend to write a nim bisect tool at some point with the aim of being able to build nim (just nim, no tools) at any prior git hash to help with git bisect workflows, the way it'll work is:
|
I'm talking about the I see that the new C sources also have this: https://github.com/nim-lang/csources_v1/blob/master/build.sh. So Im once again confused why we have a new repo for this. |
as explained above, so that existing scripts calling
this will continue to work in the future if csources were updated, the above script would break because in older nim versions, |
How about for simplicity choosenim just detects the existance of the Btw as an aside, from https://github.com/nim-lang/csources readme:
This clearly says that HEAD of https://github.com/nim-lang/csources should be able to build any Nim version 1.0+. Did we change our mind? If so we should update the readme. |
as noted in #256 (comment), this is indeed what should be done but only to building nim >= 0.20.0, as it'd fail for versions < 0.20.0 even with build_all.sh present (see explanation above). here's how i'm doing it here: nim-lang/Nim#18119 (for
indeed, this readme should be updated to reflect reality; the promise of allowing it to build any nim version >= 1.0 was a false good idea, for reasons discussed elsewhere (eg timotheecour/Nim#251 + links) ; eg prevents using more recent nim to bootstrap nim (ie from benefitting from bugfixes + features + cleanups in the compiler), or, in this case, from boostrapping from apple M1. |
Building via
I also tried:
(Plus Any ideas what could be going wrong? |
can you show commands starting from scratch?
|
Not sure what info that can give you, but sure: dom@DESKTOP-AAP3EIS:/tmp$ git clone https://github.com/nim-lang/Nim
Cloning into 'Nim'...
remote: Enumerating objects: 143822, done.
remote: Counting objects: 100% (589/589), done.
remote: Compressing objects: 100% (180/180), done.
remote: Total 143822 (delta 429), reused 525 (delta 408), pack-reused 143233
Receiving objects: 100% (143822/143822), 105.01 MiB | 5.83 MiB/s, done.
Resolving deltas: 100% (110719/110719), done.
Checking out files: 100% (2964/2964), done.
dom@DESKTOP-AAP3EIS:/tmp$ cd Nim
dom@DESKTOP-AAP3EIS:/tmp/Nim$ sh build_all.sh
: not foundh: 3: build_all.sh:
: not foundh: 7: build_all.sh:
: not foundh: 10: build_all.sh: |
what is:
2 possibilities:
|
(It's Ubuntu 18.04 on WSL)
(No idea how to get
but yes, it looks like it's problems with CRLF...
|
well that was a pretty big clue... seems like same problem as described here: microsoft/WSL#2318 |
* fix dom96/choosenim#256 WSL CRLF * fixup
@dom96 Does that commit to Nim repo fix this issue? I thought choosenim needed to switch to the |
yeah, it doesn't. |
yes, I should've phrased nim-lang/Nim#18452 differently, that PR fixed #256 (comment) (AFAIU) which is a pre-requisite but choosenim still needs to be updated to call build_all.sh for nim >= 0.20.0, and use old method for nim < 0.20.0 as explained here: #256 (comment) |
Why >= 0.20.0? AFAIK the old method works quite well even for 1.4 no? |
not for 1.4.8 my point is you can't use the same method for every release, so you have to build via build_all.sh for any recent enough nim, ie nim >= 1.4.8, refs https://nim-lang.org/blog/2021/05/25/version-148-released.html
and you can't use build_all.sh for nim < 0.20.0 as explained above. where you put the threshold is up to you, but that seemed like a reasonable option. |
* fix dom96/choosenim#256 WSL CRLF * fixup
Hello,
I saw
choosenim devel --build
fail on a Travis CI run, and then was also able to reproduce that same issue on Windows 10.Here's the Travis failure.
The text was updated successfully, but these errors were encountered: