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 both path and version dependencies #69

Merged
merged 2 commits into from
Nov 22, 2022
Merged

Conversation

bnaecker
Copy link
Collaborator

A previous commit removed the version specification for the path dependencies in the repository. This all works fine, until the crates are published. Crates on crates.io may not have path dependencies, but there is no version to use.

The accepted solution appears to be to specify both path and version dependencies. The former is used when building from source, the latter when publishing.

A previous commit removed the version specification for the path
dependencies in the repository. This all works fine, until the crates
are published. Crates on crates.io may not have path dependencies, but
there is no version to use.

The accepted solution appears to be to specify _both_ path and version
dependencies. The former is used when building from source, the latter
when publishing.
Copy link

@gjcolombo gjcolombo left a comment

Choose a reason for hiding this comment

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

LGTM with one small comment.

I did a little browsing, and it looks like cargo package can help detect the "no version information" case; if I run it against master I get errors of the following form:

error: all dependencies must have a version specified when packaging.                                  
dependency `dtrace-parser` does not specify a version                                                                                   
Note: The packaged dependency will use the version from crates.io,                                                                      
the `path` specification will be removed from the dependency declaration. 

If I run it against the published packages in this branch, I get different errors about unsatisfiable dependencies, but I think that's expected and can be resolved by publishing things in the right order. (For example, usdt-macro complains about not being able to find dtrace-parser 0.1.14, which makes sense since it's not published yet.)

usdt/Cargo.toml Show resolved Hide resolved
usdt/Cargo.toml Outdated Show resolved Hide resolved
@gjcolombo
Copy link

New changes LGTM!

@bnaecker bnaecker merged commit eb7bcfa into master Nov 22, 2022
@bnaecker bnaecker deleted the path-and-version-deps branch November 22, 2022 22:30
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.

2 participants