Toolchain: Fix package installing issue#7315
Merged
mohanchen merged 9 commits intodeepmodeling:developfrom May 7, 2026
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR adjusts the toolchain stage4 GitHub tarball installation logic to address failures introduced in the Toolchain 202601 update (#7310) when packages are pinned to specific commits, by switching those pins to use 7-character commit prefixes.
Changes:
- Shorten several commit-pinned package version strings in
package_versions.shfrom full commit hashes to 7-character prefixes. - Update stage4 install scripts’ “commit vs tag” URL construction logic to treat 7-hex strings as commit refs.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| toolchain/scripts/stage4/install_rapidjson.sh | Updates commit-ref detection, but currently removes short_ver initialization while still using it later. |
| toolchain/scripts/stage4/install_libri.sh | Updates commit-ref detection, but currently removes short_ver initialization while still using it later. |
| toolchain/scripts/stage4/install_libcomm.sh | Changes install dir/tarball naming to use libcomm_ver directly and updates commit-ref detection. |
| toolchain/scripts/stage4/install_cereal.sh | Changes install dir/tarball naming to use cereal_ver directly and updates commit-ref detection. |
| toolchain/scripts/package_versions.sh | Shortens commit-pinned versions (cereal/libcomm/libri/rapidjson/nep) to 7-character prefixes. |
Comments suppressed due to low confidence (2)
toolchain/scripts/stage4/install_libcomm.sh:61
- The commit-ref detection regex only matches exactly 7 hex characters. If
libcomm_veris provided as a full 40-char commit hash, this will construct.../tar.gz/v<sha>and fail to download. Consider accepting both short and full commit hashes (or normalizing to short) before URL construction.
# url construction rules:
# - Branch names (master, main, develop) without v prefix
# - Version tags (e.g., 1.0.0) with v prefix
if [[ "${libcomm_ver}" =~ ^[0-9a-f]{7}$ ]]; then
url="https://codeload.github.com/abacusmodeling/LibComm/tar.gz/${libcomm_ver}"
else
url="https://codeload.github.com/abacusmodeling/LibComm/tar.gz/v${libcomm_ver}"
fi
toolchain/scripts/stage4/install_cereal.sh:57
- The commit-ref detection regex only matches exactly 7 hex characters. If
cereal_veris a full 40-char commit hash, the script will incorrectly treat it as a tag and construct.../tar.gz/v<sha>, causing download failure. Consider accepting both short and full commit hashes (or normalizing to short) before constructing the URL.
# url construction rules:
# - Branch names (master, main, develop) without v prefix
# - Version tags (e.g., 1.0.0) with v prefix
if [[ "${cereal_ver}" =~ ^[0-9a-f]{7}$ ]]; then
url="https://codeload.github.com/USCiLab/cereal/tar.gz/${cereal_ver}"
else
url="https://codeload.github.com/USCiLab/cereal/tar.gz/v${cereal_ver}"
fi
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
75fbd59 to
c0fab01
Compare
QuantumMisaka
approved these changes
May 6, 2026
Collaborator
QuantumMisaka
left a comment
There was a problem hiding this comment.
LGTM
In fact I'm also trying to fix the problem, but this fix is better than mine \o/
mohanchen
approved these changes
May 7, 2026
Collaborator
|
Great, thanks for your help! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Uh oh!
There was an error while loading. Please reload this page.