Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support invoking in Cargo Workspaces #7

Open
antoniusnaumann opened this issue Feb 1, 2023 · 5 comments
Open

Support invoking in Cargo Workspaces #7

antoniusnaumann opened this issue Feb 1, 2023 · 5 comments
Labels
enhancement New feature or request package Related to the 'package' subcommand
Milestone

Comments

@antoniusnaumann
Copy link
Owner

Invoking in a workspace should execute the command for all members of this workspace that contain a Cargo Swift config.

This issue needs #5 and #6 to be resolved

@antoniusnaumann antoniusnaumann added enhancement New feature or request package Related to the 'package' subcommand labels Feb 1, 2023
@antoniusnaumann antoniusnaumann added this to the v0.4.0 milestone Mar 12, 2023
@antoniusnaumann antoniusnaumann modified the milestones: v0.4.0, v0.5.0 Aug 11, 2023
@antoniusnaumann
Copy link
Owner Author

Alternative: Add metadata tag to workspace that specifies which libraries should be built when cargo swift is invoked in a workspace

@antoniusnaumann
Copy link
Owner Author

The following behavior will be implemented:

cargo swift package will invoke cargo metadata to detect all crates in the current workspace that have a dependency on UniFFI. The package command is then invoked for every of those crates that are at the same level, above or below the current working directory (but not paralell to it).

This means:
It is possible to invoke cargo swift package in a sub-directory e.g. src/ or the top-level directory of a crate, this will package the current crate. This mirrors the current behavior. But it will also be possible to invoke cargo swift package in a workspace, in which case all crates in the workspace that depend on UniFFI will be packaged.

@antoniusnaumann
Copy link
Owner Author

Reopening this as it introduced unwanted behavior for workspaces that contain a root package, if only the root package should be packaged.

@antoniusnaumann antoniusnaumann modified the milestones: v0.5.0, 0.5.1 Oct 26, 2023
@Eliot00
Copy link
Contributor

Eliot00 commented Nov 6, 2023

Can cargo-swift support cargo swift package -p <pname> like cargo build -p does?

@antoniusnaumann
Copy link
Owner Author

Can cargo-swift support cargo swift package -p <pname> like cargo build -p does?

That's the solution I currently favor, but I currently don't have time to implement this unfortunately.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request package Related to the 'package' subcommand
Projects
None yet
Development

No branches or pull requests

2 participants