Skip to content

fix: add missing icu_locale_core src files to vendor tree#2

Merged
piyyy314 merged 3 commits into
mainfrom
copilot/update-tarball-packaging-logic
May 5, 2026
Merged

fix: add missing icu_locale_core src files to vendor tree#2
piyyy314 merged 3 commits into
mainfrom
copilot/update-tarball-packaging-logic

Conversation

Copilot AI commented May 3, 2026

Copy link
Copy Markdown

Build from tarball CI was failing because deps/crates/vendor/icu_locale_core/src/ (62 files) was never committed to git. Since tarball creation uses git checkout-index -a, these files were absent from the produced tarball, causing Cargo checksum validation to fail at build time with No such file or directory.

Changes

  • deps/crates/vendor/icu_locale_core/src/ — adds the 62 missing source files for icu_locale_core v2.0.1. Files sourced from the published crate on static.crates.io; all 84 file checksums verified against the existing .cargo-checksum.json before committing.

  • .github/workflows/build-tarball.yml — adds a post-extract assertion step that checks for deps/crates/vendor/icu_locale_core/src/extensions/private/other.rs in $TAR_DIR and fails fast with a descriptive error if absent, so regressions surface immediately rather than deep in a Cargo compile step.

Original prompt

Fix failing GitHub Actions job Build from tarball (run 25258211913, job 74063864685).

Failure:

  • During the test-tarball-linux job, step "Build" runs make -C "$TAR_DIR" build-ci and fails with Cargo error:
    • error: failed to calculate checksum of: .../deps/crates/vendor/icu_locale_core/src/extensions/private/other.rs
    • failed to open file ... other.rs
    • No such file or directory (os error 2)
      This indicates the source tarball being tested is missing vendored Rust crate sources under deps/crates/vendor/....

Repository: piyyy314/node
Ref for failure context: 849ad8d

Tasks:

  1. Update the tarball packaging logic so that tarballs used for CI contain the needed Rust vendored crate sources. Specifically, ensure deps/crates is not removed when building tarballs intended to be buildable/testable from source.
    • Investigate the make tar target in the repo Makefile and any SKIP_SHARED_DEPS related logic that removes deps/crates.
    • Adjust conditions so normal tarballs include deps/crates (and vendor files like deps/crates/vendor/icu_locale_core/.../other.rs).
    • Keep behavior for truly minimal tarballs if required, but CI build-from-tarball workflow must produce a buildable tarball.
  2. Add a clear CI assertion in .github/workflows/build-tarball.yml after extracting the tarball to check for presence of a representative vendored crate file (deps/crates/vendor/icu_locale_core/src/extensions/private/other.rs) and fail early with a helpful error if missing.
  3. Run/adjust any existing tests/CI scripts as needed.

Deliverable:

  • Open a PR against main that fixes the tarball contents and makes the Build from tarball workflow pass.

Relevant files:

  • .github/workflows/build-tarball.yml
  • Makefile tarball packaging section.

The following is the prior conversation context from the user's chat exploration (may be truncated):

User: Please find a solution for this failing job. Use the logs, job definition, and any referenced files where the failure occurred. Keep your response focused on the solution and include code suggestions when appropriate.

Assistant: The job is failing during Build from tarball → test-tarball-linux → “Build” with:

  • error: failed to calculate checksum of: .../deps/crates/vendor/icu_locale_core/.../other.rs
  • failed to open file ... other.rs
  • No such file or directory (os error 2)

That means the extracted tarball is missing at least one file inside the vendored Rust crates tree (deps/crates/vendor/...). This is almost always caused by the tarball packaging step not including all vendored crate sources, or by the tarball generation depending on files that are present in a full git checkout but not staged into the release tarball.

Fix: ensure the release tarball includes the vendored crates (and the missing file)

1) Add a verification step right after extracting the tarball (to make failures obvious)

In .github/workflows/build-tarball.yml at ref: 849ad8dfa35bac9d2b6bc83d942b690047d4c5f2, add a quick check after “Extract tarball”:

      - name: Verify vendored crates exist in tarball
        run: |
          test -f "$TAR_DIR/deps/crates/vendor/icu_locale_core/src/extensions/private/other.rs" \
            || (echo "Missing vendored crate file in tarball"; exit 1)

This doesn’t fix the bug by itself, but it confirms the root cause immediately and prevents confusing build logs.

2) Fix tarball generation to include deps/crates/vendor/**

The actual fix needs to be in the tarball creation logic that runs in the build-tarball job:

      - name: Make tarball
        run: |
          export DISTTYPE=nightly
          export DATESTRING=$(date "+%Y-%m-%d")
          export COMMIT=$(git rev-parse --short=10 "$GITHUB_SHA")
          ./configure && make tar -j4 SKIP_XZ=1

In Node’s build system, make tar uses a manifest/list of files to include. Your tarball is being produced successfully, but it’s incomplete. The fix is to update the tarball file manifest (commonly a tools/release/... file list, or the gyp/release tar logic) so it explicitly includes the vendored crates directory and any generated metadata Cargo needs.

Concrete change to make in the repo’s tarball manifest logic:

  • Ensure these paths are included in the tarball:
    • deps/crates/vendor/** (all files, not just Cargo.toml)
    • deps/crates/Cargo.toml
    • deps/crates/Cargo.lock (if used)
    • any .cargo/config.toml or checksum/metadata files that the build expects

Why this resolves the failure: the build step is compiling Rust deps and validating sources/checksums; if a source file referenced by the crate is absent from the tarball, Cargo fails exactly as shown.

3) Optional: make the build robust by (re)vendoring in the tarball build (only if acceptable)

If you intend tarballs not to carry the full vendor tree, then you must regenerate it inside the extracted tarball before buil...

This pull request was created from Copilot chat.

@piyyy314
piyyy314 marked this pull request as ready for review May 3, 2026 11:59
Copilot AI review requested due to automatic review settings May 3, 2026 11:59

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot wasn't able to review any files in this pull request.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copilot AI and others added 2 commits May 3, 2026 12:02
Copilot AI changed the title [WIP] Fix failing GitHub Actions job Build from tarball fix: add missing icu_locale_core src files to vendor tree May 3, 2026
Copilot AI requested a review from piyyy314 May 3, 2026 12:04
@piyyy314
piyyy314 merged commit 6abd782 into main May 5, 2026
2 of 3 checks passed
@piyyy314
piyyy314 deleted the copilot/update-tarball-packaging-logic branch May 5, 2026 21:52
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.

3 participants