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

Private crates that are added via path are not recognized as private #147

Closed
fgo-ableton opened this issue Feb 26, 2020 · 5 comments · Fixed by #394
Closed

Private crates that are added via path are not recognized as private #147

fgo-ableton opened this issue Feb 26, 2020 · 5 comments · Fixed by #394
Assignees
Labels
bug Something isn't working

Comments

@fgo-ableton
Copy link

Describe the bug
Running cargo deny in a crate that pulls in other unlicensed crates from a path errors, even though the pulled in dependencies are marked as not published.

To Reproduce
Steps to reproduce the behavior:

  1. Set deny.toml to ignore unlicensed private crates:
[licenses]
private = { ignore = true }
  1. Import a different crate via path in Cargo.toml
[dependencies]
other_crate = { path = "/path/to/other/crate" }
  1. Mark other crate as not published in its Cargo.toml
[package]
name = "other_crate"
...
publish = false
  1. Running cargo deny check from parent crate returns an error even though it shouldn't
    error: other_crate 1.2.3 (path+file:///path/to/other/crate) is unlicensed
@fgo-ableton fgo-ableton added the bug Something isn't working label Feb 26, 2020
@Jake-Shadle Jake-Shadle self-assigned this Feb 26, 2020
@djc
Copy link

djc commented Jan 21, 2022

FWIW, I'm also running into this. At work, I'm doing an experiment where I switch our Cargo workspace into two workspaces with a few shared crates outside the workspace. Those crates are used as path dependencies directly.

@leofidus
Copy link

For reference, we work around the imperfect ignore-private behavior by setting the license in each crate's Cargo.toml to license = "LicenseRef-OURCOMPANYNAME-Proprietary" and then adding that to the allowed licenses.

@Jake-Shadle
Copy link
Member

Oops, I think that might be why I never noticed this since our main repo does this, I will take a look at this sometime this week.

@djc
Copy link

djc commented Jan 27, 2022

@Jake-Shadle thanks for fixing! Are you planning on pushing out a release soon?

@Jake-Shadle
Copy link
Member

Yes, I'm just going to fix a few more bugs first.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants