[superseded] [WIP] fix #11457 csources2 revision is now version-controlled so we can keep updating boostrap nim version #13854
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
fix #11457
essentially this implements a poor-man's submodules since for some reason submodules are not acceptable
new file config/build_config.txt specifies the version controlled csources2 revision (url+tag) so that we can keep updating csources2 without breaking any code (neither past nor future code will break).
https://github.com/nim-lang/csources is locked because scripts may depend on it and they have not locked down the version, so they'd just checkout HEAD, which would fail if csources were to be update. All scripts depending on csources will thus keep working after this PR.
CI that calls build_all.sh/build_all.bat won't have to be updated, they'll just pick up the new csources2 at the correct revision
for now, I'm setting the url at https://github.com/timotheecour/csources.git but you can update the PR to point to https://github.com/nim-lang/csources2.git once that exists
depending on when nim 1.2 will be released (i guess soon?), we can either wait for it or create a new csources built from 1.0.6 (since 0.20.0 is quite old and makes bootstrapping less convenient)
updated build_all.bat, build_all.bat, build_all.sh to refer to the same config/build_config.txt (DRY)
special care is taken to make bootstrap as fast as possible (needed for CI), in particular git tags allow fetching just what's needed, unlike git hashes (which requires server config for that and github doesn't support it yet)
notes
--hints:off
(works since fix #8312 --hints:off and --warnings:off now honored everywhere #13489)config/build_config.txt
changes, otherwise it's fast (2 seconds)config/build_config.txt
on first run (ie, good enough for CI); that's a pre-existing "condition"TODO:
rationale for upgrading bootstrap version
eg cases where not upgrading bootstrapping nim creates "more work"
import std/macros
stays legal #14291 (comment)EDIT
superseded by #17815 and #17899