Rust/Cargo: Changing a relative dependency source does not invalidate the project hash #1802
-
I want to use moon for managing a rust monorepo with multiple workspaces. So far it seems to be a good fit but I encountered an issue when changing something in a used library that an application depends on. Even when declaring a I guess this is either a quirky workspaces setup or a misconfiguration but couldn't figure it out so far :/ Example:
language: rust
type: library
language: rust
type: application
tasks:
build:
command: 'cargo build'
inputs:
- '@globs(sources)'
dependsOn:
- 'example-lib'
[dependencies]
lib = { path = "../../libs/example-lib" } |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Only task If you want don't want to reference another task in the lib, you can create a "fake" task that is simple used as a touched check. # lib
tasks:
touched:
command: noop
# app
tasks:
build:
command: 'cargo build'
inputs:
- '@globs(sources)'
deps:
- 'lib:touched' |
Beta Was this translation helpful? Give feedback.
Only task
deps
are included in a task's hash, not a project's deps. https://moonrepo.dev/docs/config/project#depsIf you want don't want to reference another task in the lib, you can create a "fake" task that is simple used as a touched check.