cargo swift package fails when crate is part of a workspace
antoniusnaumann opened this issue · 1 comments
antoniusnaumann commented
Currently, this tool implicitly assumes that compilation results can be found in a /target directory at the crate level. This is not true for crates that are part of a workspace as those share a /target directory in the workspace top-level.
To get this fixed, we should (somehow) detect if a crate is part of a workspace and if so we should use the workspaces target directory instead.
Considering #7, maybe the generated package should be located in the workspace top-level directory as well.
antoniusnaumann commented
A quick fix is to use the --target-dir
flag to ensure a target location. A better fix is to only change the location of the final build artifacts with --out-dir
once this flag is stabilized.