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

Migrate to new home for LLVM toolchain #225

Merged
merged 2 commits into from
Mar 7, 2024
Merged

Conversation

chiphogg
Copy link
Contributor

@chiphogg chiphogg commented Mar 7, 2024

The LLVM toolchain graduated from grailbio/bazel-toolchain to
bazel-contrib/toolchains_llvm. Good for them! Unfortunately, that
broke everyone's build who was using a sha256 checksum, because GitHub
does not guarantee SHA stability for automatically generated artifacts.
(Remember when they broke the world in January 2023?)

We need to upgrade to the new repo location, which means changing the
SHA. We would not like to be forced to do this again, so we'll want to
link to a concrete artifact, not an auto-generated one. This means
moving from a particular commit hash to a named release, because the
.tar.gz file is attached to that release. So we pick the latest one.

I followed and adapted the 0.10.3 instructions, using the "not
bzlmod" section. I also grepped the repo for grailbio, and updated
a URL in some comments. (I verified that the new URL gives the same
contents as the old one.)

But wait, there's more! The aspect-build/gcc-toolchain repo also
migrated to a new home! Now it lives with a particular individual
called f0rmiga, instead of the aspect-build bazel organization. We
can't land code until we unbreak all of the builds, so we need to fix
that in the same PR. Here, I don't want to migrate to a new release,
because (a) we have a patch on top of the specific commit that we had
been using, and (b) they don't even upload archive files for their
releases.

Fixes #224.

The LLVM toolchain graduated from `grailbio/bazel-toolchain` to
`bazel-contrib/toolchains_llvm`.  Good for them!  Unfortunately, that
broke everyone's build who was using a `sha256` checksum, because GitHub
does not guarantee SHA stability for automatically generated artifacts.
(Remember when they [broke the world] in January 2023?)

We need to upgrade to the new repo location, which means changing the
SHA.  We would not like to be forced to do this again, so we'll want to
link to a concrete artifact, not an auto-generated one.  This means
moving from a particular commit hash to a named release, because the
`.tar.gz` file is attached to that release.  So we pick the latest one.

I followed and adapted the [0.10.3 instructions], using the "not
`bzlmod`" section.  I also grepped the repo for `grailbio`, and updated
a URL in some comments.  (I verified that the new URL gives the same
contents as the old one.)

We hope and expect that this will unbreak our remote builds.

[broke the world]: https://github.blog/2023-02-21-update-on-the-future-stability-of-source-code-archives-and-hashes/
[0.10.3 instructions]: https://github.com/bazel-contrib/toolchains_llvm/releases/tag/0.10.3
@chiphogg chiphogg marked this pull request as ready for review March 7, 2024 15:21
@chiphogg chiphogg requested a review from geoffviola March 7, 2024 15:22
Copy link
Contributor

@geoffviola geoffviola left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using the named release and getting the build to pass looks good.

@chiphogg chiphogg merged commit 8153761 into main Mar 7, 2024
10 checks passed
@chiphogg chiphogg deleted the chiphogg/holey-grail-lol#224 branch March 7, 2024 22:00
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.

Toolchain moved to new repo name, breaking hashes
2 participants