You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The above derivation captures the entire repository (because of inputs.self). Thus, when anything in the repository changes, the input hash changes and causes a rebuild of any of the packages.
If I filter root to only include the source of a single package, cargo fails because it expects all packages defined in the workspace to exist on the filesystem. For example, if I filter only to include src/pkg1, it fails with:
opening file '/nix/store/abc123-source/pkg2/Cargo.toml': No such file or directory
This creates a problematic setup because I cannot disassociate the projects such that changes in one do not invalidate another one. I imagine I must be doing something wrong here. Is there a way to isolate workspace packages to avoid this problem?
The text was updated successfully, but these errors were encountered:
For additional context, I tried using the targets option instead of specifying the --package flag and it built the entire workspace. I looked through the source and it looks like it's not wired up to anything, so I think the documentation might be outdated.
Hmm, doesn't look like it works as one might expect. Cargo still tries to find the specific workspace members. I'm not sure you can override it like that, cargo still uses the root Cargo.toml to determine the workspace members.
Background
I have a repository setup as such:
The root
Cargo.toml
establishes a workspace as such:Then packages are built as such:
Problem
The above derivation captures the entire repository (because of
inputs.self
). Thus, when anything in the repository changes, the input hash changes and causes a rebuild of any of the packages.If I filter
root
to only include the source of a single package, cargo fails because it expects all packages defined in the workspace to exist on the filesystem. For example, if I filter only to includesrc/pkg1
, it fails with:This creates a problematic setup because I cannot disassociate the projects such that changes in one do not invalidate another one. I imagine I must be doing something wrong here. Is there a way to isolate workspace packages to avoid this problem?
The text was updated successfully, but these errors were encountered: