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

Clean up module imports in Cargo #294

Open
MrDarthShoe opened this issue Aug 8, 2023 · 0 comments
Open

Clean up module imports in Cargo #294

MrDarthShoe opened this issue Aug 8, 2023 · 0 comments
Assignees

Comments

@MrDarthShoe
Copy link
Contributor

MrDarthShoe commented Aug 8, 2023

Currently in relay-client there are following dependencies in cargo.toml:

[dependencies]
ya-relay-stack = "0.5.0"
ya-relay-proto = "0.4.2"
ya-relay-core = "0.4.0"

And workspace cargo.toml has following patches:

[patch.crates-io]
ya-relay-client = { path = "client" }
ya-relay-core = { path = "crates/core" }
ya-relay-proto = { path = "crates/proto" }
ya-relay-stack = { path = "crates/stack" }
ya-relay-util = { path = "crates/util" }
ya-relay-server = { path = "server" }

By doing it, when somebody uses ya-relay-client revision instead of released one, he needs to patch these manually like so:

[patch.crates-io]
ya-relay-stack = { git = "https://github.com/golemfactory/ya-relay.git", rev = "506a678ef65893e9c0d857e4d7b8f84999790928" }
ya-relay-client = { git = "https://github.com/golemfactory/ya-relay.git", rev = "506a678ef65893e9c0d857e4d7b8f84999790928" }
ya-relay-core = { git = "https://github.com/golemfactory/ya-relay.git", rev = "506a678ef65893e9c0d857e4d7b8f84999790928" }
ya-relay-proto = { git = "https://github.com/golemfactory/ya-relay.git", rev = "506a678ef65893e9c0d857e4d7b8f84999790928" }

Even if proto, stack and core are not used directly.
Possible way of resolving it would be to use relative paths + versions in workspace cargo.toml and then use them in others like so:

[dependencies]
ya-relay-stack = { workspace = true }
[...]
@MrDarthShoe MrDarthShoe self-assigned this Sep 4, 2023
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

No branches or pull requests

1 participant