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

[superseded] [WIP] fix #11457 csources2 revision is now version-controlled so we can keep updating boostrap nim version #13854

Closed

Conversation

timotheecour
Copy link
Member

@timotheecour timotheecour commented Apr 3, 2020

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

  • aded --hints:off (works since fix #8312 --hints:off and --warnings:off now honored everywhere #13489)
  • rerunning build_all.sh will do the right thing wrt csources and bin/nim: csources is rebuilt if config/build_config.txt changes, otherwise it's fast (2 seconds)
  • same could be done for build_all.bat if someone wants to add that, but it correctly picks up config/build_config.txt on first run (ie, good enough for CI); that's a pre-existing "condition"
  • build_all.sh now always builds from the binary built by csources (at specified revision)

TODO:

  • make ci/build.sh reuse script
  • make freebsd reuse script
  • make azure reuse script
  • make ci_ssl reuse script
  • make github doc ci reuse script
  • .github/workflows/ci_ssl.yml => I can't trigger it to run (even with modifications), so I can't test nor modify this

rationale for upgrading bootstrap version

eg cases where not upgrading bootstrapping nim creates "more work"

EDIT

superseded by #17815 and #17899

@timotheecour timotheecour changed the title fix #11457 csources2 revision is now version-controlled fix #11457 csources2 revision is now version-controlled so we can keep updating boostrap nim version Apr 3, 2020
@timotheecour timotheecour changed the title fix #11457 csources2 revision is now version-controlled so we can keep updating boostrap nim version [WIP] fix #11457 csources2 revision is now version-controlled so we can keep updating boostrap nim version Apr 3, 2020
@timotheecour timotheecour force-pushed the pr_fix_11457_csources_hash branch from 533492f to f10824f Compare April 3, 2020 06:42
@Araq
Copy link
Member

Araq commented Apr 3, 2020

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.

Exactly! Everything works fine. You claim we're restricted for the Nim compiler development because the Nim compiler itself has to buildable from a Nim that was bootstrapped from the csources. But this restriction is fine. There is nothing to do here.

And in the longer run we can have csources2 once we need it. And then since we need it, the CIs will be red to remind us we need to update their configs. Nothing to keep in mind, the system is self-healing.

@Araq Araq closed this Apr 3, 2020
@timotheecour timotheecour deleted the pr_fix_11457_csources_hash branch April 30, 2021 06:22
@timotheecour timotheecour changed the title [WIP] fix #11457 csources2 revision is now version-controlled so we can keep updating boostrap nim version [superseded] [WIP] fix #11457 csources2 revision is now version-controlled so we can keep updating boostrap nim version Apr 30, 2021
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

Successfully merging this pull request may close these issues.

Lock down csources version
2 participants