-
-
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
CIs: attempt to use csources_v1 #16282
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we're still using the ci/
scripts.
For ci_docs you'd need to prepend csources_v1-
to the cache key so that we have a fully separated cache (not too important as I don't think the commit hash can clash).
You may also want to update azure-pipelines.yml, which is the main CI pipeline.
@@ -15,7 +15,7 @@ environment: | |||
tasks: | |||
- setup: | | |||
cd Nim | |||
git clone --depth 1 -q https://github.com/nim-lang/csources.git | |||
git clone --depth 1 -q https://github.com/nim-lang/csources_v1.git csources |
This comment was marked as outdated.
This comment was marked as outdated.
Sorry, something went wrong.
since we're for some reason not using git submodules, we need to at least cross reference the git hashes used.
export NIM_CSOURCES_HASH=v1.0.0
# or if you don't want to tag csources_v1 yet:
# export NIM_CSOURCES_HASH=2fbbfb191dffdfe0f62460a6aad93f7a1ccd2f5c
source nimdeps.sh
git clone --depth 1 -q https://github.com/nim-lang/csources_v1.git
git -C csources_v1 checkout $NIM_CSOURCES_HASH Let's not repeat the same mistakes again, we need
note
|
The idea isn't terrible but I wonder if a shell script is a good idea. Maybe a generic format like |
We don't repeat mistakes, you repeat wrong claims. "git bisect" doesn't need this. There is only one nim binary coming from csources and that is always the start of the bootstrapping process. 1.6 might use the csources_v1 Nim binary. |
@@ -9,7 +9,7 @@ | |||
|
|||
## Dead code elimination (=DCE) for IC. | |||
|
|||
import std / [intsets, tables] | |||
import intsets, tables |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why? compiler/ic/dce.nim and intsets are not in the same nimble package
likewise everywhere inside compiler/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bootstrapping on the BSDs doesn't work otherwise.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we need csources_v1_2 instead but then I need to go through all the testing trouble again.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bootstrapping on the BSDs doesn't work otherwise.
is a --lib:lib
missing from compilation command in bootstrap? this should be fixable, at least i don't see why it couldn't work; i can take a look if needed;
Maybe we need csources_v1_2 instead
I'm still strongly arguing in favor of latest stable release (1.4.4), (see sample reasons in timotheecour#251) and I'm ready to help if that's what it takes to make it happen. But 1_2 is still better than 1_0 at least.
This PR has tons of unrelated changes to the csources_v1 topic, can't it be 2 PRs?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Every change is related to bootstrapping on the BSDs. I presume there is a regression for the 1.0 line where it's pickier about 'std' than even 0.9.x is.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, Nim v1.0 can compile 1.2, 1.4, etc, whereas Nim 1.4 cannot even compile Nim 1.2, last time I checked. We need a csources that can continue to compile the 1.0.x and 1.2.x lines which are still supported and receive backports on a regular basis.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, Nim v1.0 can compile 1.2, 1.4, etc
at the price of contorsions like the above comment and many others that prevent code simplifications or using newer features that aid in development of new features/bug fixes;
many times the obvious way to write things didn't work because of boostrap. All that's needed is that each version of nim can be bootstrapped from a deterministic csources version (determined by a stored hash, see #16282 (comment))
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Every change is related to bootstrapping on the BSDs. I presume there is a regression for the 1.0 line where it's pickier about 'std' than even 0.9.x is.
see #17801, how do i make bsd CI run in that PR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
git bisect needs this. here's how i run git bisect when i encounter a regression (say at HEAD) that originates beyond last csources update:
where future proof fix:With the simple recommendation i gave, we store in nim repo in a text file (accessible by bash/nim scripts) the url, commit, or tag corresponding to the csources2 revision that can bootstrap current nim. with this, the above command in It's efficient (each unique bin/nim_csources only needs to be built once even, even across git bisect runs, they're cached), and I can volunteer a PR to write that nim script (tools/nimbisect.nim) if the fix i recommended (simply storing the csources2 hash) is accepted. |
why though... who cares if something worked with 0.20, it's archaic and effectively every line of code has been touched since then. I simply look into fixing the bug instead. |
it doesn't matter much that every LOC has changed, once git bisect returns offending commit it usually becomes clear what the problem is and how to fix the regression, you've narrowed down the search considerably; i and probably others use it frequently. That's true even if last working version was old, eg see #13066 (from last year, but where regression was introduced before 0.20 and current nim bootstrap doesn't work). without For easy bug fixes (where cause and effect are close) it doesn't matter either way, but for harder ones, tooling helps. note that there are other use cases for ability to build nim at arbitrary past revisions (eg running performance benchmark across nim versions to monitor performance across versions) And finally, this is future proof; once csources is upgraded, the new one will be less archaic and more likely to be more recent than the point where a regression was introduced. |
Merging this now as most changes are preferable anyway. But we can try your suggestions in follow-up PRs. |
=> #17815 |
* CIs: attempt to use csources_v1 * also updated the BSDs * also updated azure pipelines * std modules should not itself use the 'std/' import dir... * compiler has to be careful with std/ for v1 booting (cherry picked from commit a9b62de)
* CIs: attempt to use csources_v1 * also updated the BSDs * also updated azure pipelines * std modules should not itself use the 'std/' import dir... * compiler has to be careful with std/ for v1 booting (cherry picked from commit a9b62de)
* CIs: attempt to use csources_v1 * also updated the BSDs * also updated azure pipelines * std modules should not itself use the 'std/' import dir... * compiler has to be careful with std/ for v1 booting (cherry picked from commit a9b62de)
* CIs: attempt to use csources_v1 * also updated the BSDs * also updated azure pipelines * std modules should not itself use the 'std/' import dir... * compiler has to be careful with std/ for v1 booting (cherry picked from commit a9b62de)
* CIs: attempt to use csources_v1 * also updated the BSDs * also updated azure pipelines * std modules should not itself use the 'std/' import dir... * compiler has to be careful with std/ for v1 booting (cherry picked from commit a9b62de)
* CIs: attempt to use csources_v1 * also updated the BSDs * also updated azure pipelines * std modules should not itself use the 'std/' import dir... * compiler has to be careful with std/ for v1 booting (cherry picked from commit a9b62de)
…ootstrap + bsd * refs #16282 (comment) * sounds very similar to #14291
…ootstrap + bsd * refs #16282 (comment) * sounds very similar to #14291
…ap + bsd (#17902) * [WIP] bring back std/ prefix within compiler and ensure it works in bootstrap + bsd * refs #16282 (comment) * sounds very similar to #14291 * more: vmops * update tools/ci_generate.nim * auto-generate freebsd.yml as well, to avoid duplication with openbsd.yml * cleanup * undo temporary CI removal
* CIs: attempt to use csources_v1 * also updated the BSDs * also updated azure pipelines * std modules should not itself use the 'std/' import dir... * compiler has to be careful with std/ for v1 booting
…ap + bsd (nim-lang#17902) * [WIP] bring back std/ prefix within compiler and ensure it works in bootstrap + bsd * refs nim-lang#16282 (comment) * sounds very similar to nim-lang#14291 * more: vmops * update tools/ci_generate.nim * auto-generate freebsd.yml as well, to avoid duplication with openbsd.yml * cleanup * undo temporary CI removal
No description provided.