Skip to content

feat(add): Workspace support#504

Merged
ordian merged 1 commit intokillercup:masterfrom
epage:workspace
Sep 22, 2021
Merged

feat(add): Workspace support#504
ordian merged 1 commit intokillercup:masterfrom
epage:workspace

Conversation

@epage
Copy link
Collaborator

@epage epage commented Sep 21, 2021

If the user doesn't specify anything beyond a positional name or path,
we'll check if its a workspace member and add it according to workspace
best practices

  • Use version and path for published dependencies so it uses the
    local version for dev and the upcoming version on publish
  • Use path for unpublished dependencies for development without
    creating version bumping cycles.

Fixes #480

@epage epage requested a review from ordian September 21, 2021 20:15
If the user doesn't specify anything beyond a positional name or path,
we'll check if its a workspace member and add it according to workspace
best practices
- Use `version` and `path` for published dependencies so it uses the
  local version for dev and the upcoming version on publish
- Use `path` for unpublished dependencies for development without
  creating version bumping cycles.

Fixes killercup#480
Copy link
Collaborator

@ordian ordian left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! Just one question.

cargo-list-test-fixture-dependency = { version = "0.0.0", path = "../dependency" }

[dev-dependencies]
cargo-list-test-fixture-dependency = { path = "../dependency" }
Copy link
Collaborator

@ordian ordian Sep 21, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this wasn't introduced in the PR, but shouldn't we skip adding to dev-deps if it's present in deps? I guess same applies to build-deps.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dev-dependencies can introduce features, make optional dependencies, required, etc. We'd need to interrogate these different settings to make sure we weren't skipping something that needed to happen.

@ordian ordian merged commit bb7703a into killercup:master Sep 22, 2021
@epage epage deleted the workspace branch September 22, 2021 13:25
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

Successfully merging this pull request may close these issues.

cargo add should "Do the Right Thing" for workspaces

2 participants