Skip to content

fix(docker): touch src/main.rs to force recompilation in cache layer - #2

Merged
denerFernandes merged 1 commit into
masterfrom
dev/v0.5.0-resilience
May 14, 2026
Merged

denerFernandes merged 1 commit into
masterfrom
dev/v0.5.0-resilience

Conversation

@denerFernandes

Copy link
Copy Markdown
Member

The dependency-cache layer removes the binary and fingerprints, but cargo's incremental detection still considers the crate up-to-date when the real sources are COPYed in the next layer. This resulted in a 580KB dummy binary (from the 'fn main(){}' stub) being shipped instead of the real 15MB proxy binary.

Adding 'touch src/main.rs' before the final cargo build forces cargo to recompile the turbineproxy crate.

Summary

Type of Change

  • feat — new feature
  • fix — bug fix
  • perf — performance improvement
  • refactor — code change without feat/fix
  • docs — documentation only
  • test — adding or updating tests
  • ci — CI/CD changes
  • chore — maintenance

Related Issue

Closes #

Checklist

  • Commit messages follow Conventional Commits
  • cargo fmt --all passes
  • cargo clippy --all-targets -- -D warnings passes
  • Tests added or updated for logic changes
  • cargo test --lib passes locally
  • Documentation updated (if applicable)

Testing

The dependency-cache layer removes the binary and fingerprints, but
cargo's incremental detection still considers the crate up-to-date
when the real sources are COPYed in the next layer. This resulted in
a 580KB dummy binary (from the 'fn main(){}' stub) being shipped
instead of the real 15MB proxy binary.

Adding 'touch src/main.rs' before the final cargo build forces cargo
to recompile the turbineproxy crate.
@denerFernandes
denerFernandes merged commit 3ab2d08 into master May 14, 2026
15 of 18 checks passed
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.

1 participant