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

Add --detach-path-deps #4

Merged
merged 1 commit into from
Oct 17, 2023
Merged

Add --detach-path-deps #4

merged 1 commit into from
Oct 17, 2023

Conversation

taiki-e
Copy link
Owner

@taiki-e taiki-e commented Feb 11, 2022

If path dependencies exist, the above ways may miss the problem when you publish the crate (e.g., tokio-rs/tokio#4376, tokio-rs/tokio#4490)
By using --detach-path-deps flag, you can run minimal versions check with path fields removed from dependencies.

cargo minimal-versions check --workspace --ignore-private --detach-path-deps

--detach-path-deps (--detach-path-deps=all) flag removes all1 path fields by default.
By using --detach-path-deps=skip-exact flag, you can skip the removal of path fields in dependencies with exact version requirements ("=<version>"). For example, this is useful for a pair of a proc-macro and a library that export it.

Open questions:

  • Is --detach-path-deps=all a reasonable default?
  • Should this be enabled by default?

This also fixes \ #1 (the 3rd commit) EDIT: see #4 (comment)

Footnotes

  1. To exactly, when neither version, git, nor path is specified, an error will occur, so we will remove the path field of all of dependencies for which the version or git URL is specified.

@taiki-e taiki-e force-pushed the detach-path-deps branch 2 times, most recently from 335fe32 to fd947bd Compare February 11, 2022 22:29
@taiki-e taiki-e force-pushed the detach-path-deps branch 7 times, most recently from 138ce8d to 3728b33 Compare February 12, 2022 05:48
bors bot added a commit that referenced this pull request Jun 9, 2022
8: Use toml_edit for removing dev-deps r=taiki-e a=taiki-e

Split from #4.

This increases the rustc version required to build cargo-minimal-versions. (rustc 1.51+ -> 1.59+)


Co-authored-by: Taiki Endo <te316e89@gmail.com>
@taiki-e taiki-e force-pushed the detach-path-deps branch from 3728b33 to 3d1e9f3 Compare June 9, 2022 12:15
@taiki-e taiki-e marked this pull request as draft June 9, 2022 12:16
@taiki-e taiki-e force-pushed the detach-path-deps branch from 3d1e9f3 to 01d35f3 Compare July 8, 2022 16:02
@taiki-e taiki-e force-pushed the detach-path-deps branch 2 times, most recently from 39fab0d to ebd5dbc Compare October 17, 2023 17:01
@taiki-e
Copy link
Owner Author

taiki-e commented Oct 17, 2023

The fix for #1 was complex so I separated it into a separate patch. An older version of this PR containing it is currently in detach-workspace branch #23.

@taiki-e taiki-e marked this pull request as ready for review October 17, 2023 17:10
@taiki-e taiki-e force-pushed the detach-path-deps branch 3 times, most recently from 57e9a50 to 12195f5 Compare October 17, 2023 18:11
@taiki-e taiki-e merged commit e92d67e into main Oct 17, 2023
@taiki-e taiki-e deleted the detach-path-deps branch October 17, 2023 18:26
@taiki-e
Copy link
Owner Author

taiki-e commented Oct 17, 2023

The fix for #1 was complex so I separated it into a separate patch.

Opened as #23.

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.

1 participant