Skip to content

fix: prevent cargo cache invalidation in wash-runtime build script#220

Merged
lxfontes merged 1 commit intowasmCloud:mainfrom
Aditya1404Sal:fix/busted_cargo_cache_build_script
Jan 5, 2026
Merged

fix: prevent cargo cache invalidation in wash-runtime build script#220
lxfontes merged 1 commit intowasmCloud:mainfrom
Aditya1404Sal:fix/busted_cargo_cache_build_script

Conversation

@Aditya1404Sal
Copy link
Contributor

Feature or Problem

The build script was watching entire example directories and the fixtures
directory with cargo:rerun-if-changed, which included their target/
subdirectories.

Because the build script itself builds into those target/
directories, this was creating a circular dependency that was invalidating cargo's
cache on every build, causing a rerun everytime.

Changed to watch only the source inputs that should trigger rebuilds:

  • The Individual Cargo.toml
  • src/ directory
  • wit/ directory

This will prevent the build script from triggering itself when it writes
build artifacts, fixing the cache-busting issue.

Related Issues

#121

Release Information

Consumer Impact

Testing

Unit Test(s)

Acceptance or Integration

Manual Verification

Signed-off-by: Aditya <aditya.salunkh919@gmail.com>
Copy link
Contributor

@dman-os dman-os left a comment

Choose a reason for hiding this comment

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

Thanks, you didn't have to jump on this immediately on a Sun :)

@Aditya1404Sal
Copy link
Contributor Author

Thanks, you didn't have to jump on this immediately on a Sun :)

No problem at all! Was already online and it only took a few minutes to sort out.

@lxfontes lxfontes added this pull request to the merge queue Jan 5, 2026
Merged via the queue into wasmCloud:main with commit 6b86185 Jan 5, 2026
16 of 17 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.

3 participants