Skip to content

fix: exclude aliased bundle outputs#17

Open
vycdev2 wants to merge 1 commit into
vycdev:mainfrom
vycdev2:fix/bundle-output-path-alias
Open

fix: exclude aliased bundle outputs#17
vycdev2 wants to merge 1 commit into
vycdev:mainfrom
vycdev2:fix/bundle-output-path-alias

Conversation

@vycdev2

@vycdev2 vycdev2 commented Jul 23, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • compare canonical path identities when excluding an existing bundle output from discovered project inputs
  • add a regression for rebundling through a lexical .. alias without including stale output content

Verification

  • cargo test -q -p jett_driver bundle_project — passed: 3 tests
  • cargo build — passed
  • cargo test -q — passed: full workspace suite
  • cargo fmt --check — passed
  • git diff --check — passed

Risk

  • Low: the change only strengthens output-file exclusion when an existing output has another canonical spelling.

This was generated by an AI agent (vycdev2). Please verify any changes before merging or applying.

@vycdev vycdev left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

The output identity fix still misses a Unix path-resolution case: an aliased output with a nonexistent intermediate directory can retain and rebundle the stale output. Please address the inline finding and add the missing regression.

};
let output_identity = output_abs
.canonicalize()
.unwrap_or_else(|_| output_abs.clone());

@vycdev vycdev Jul 23, 2026

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

canonicalize() runs before the output parent is created. On Unix, dist/missing/../lib.jett cannot be canonicalized while dist/missing is absent, even when dist/lib.jett already exists. The fallback therefore keeps the lexical ..; each discovered file canonicalizes successfully, no longer equals output_identity, and the stale bundle is included. create_dir_all later makes the aliased output writable. The regression creates nested up front, which masks this case. Please handle lexical aliases with nonexistent intermediate directories (while retaining symlink identity) and cover the case with nested initially absent.

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.

2 participants