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

Conflicting fields are ignored in deps specified by location #2869

Closed
Ericson2314 opened this issue Jul 13, 2016 · 1 comment
Closed

Conflicting fields are ignored in deps specified by location #2869

Ericson2314 opened this issue Jul 13, 2016 · 1 comment
Labels
E-easy Experience: Easy

Comments

@Ericson2314
Copy link
Contributor

  1. Within git deps, it is possible to specify all three of branch, tag, and revision:

    let reference = details.branch.clone().map(GitReference::Branch)
        .or_else(|| details.tag.clone().map(GitReference::Tag))
        .or_else(|| details.rev.clone().map(GitReference::Rev))
        .unwrap_or_else(|| GitReference::Branch("master".to_string()));
  2. It is possible to specify git and path, in which case git is used

    let new_source_id = match details.git {
        Some(ref git) => {
            ...
        }
        None => {
            match details.path.as_ref() {
                Some(path) => {
                    ...
                }
                None => None,
            }
        }
    }

We should add a warning or make this an error. I learn towards error because any package that uses this is already violating the author's intention.

@alexcrichton
Copy link
Member

I'm going to tag this as E-easy as it should be relatively easy to detect this in the manifest parser, and it should also be pretty easy to add a warning.

We'll want to add a warning for at least a few cycles, and maybe after a few months we can turn it into a hard error once we're certain it's not used. For now though we can just lint against this happening.

@alexcrichton alexcrichton added the E-easy Experience: Easy label Jul 14, 2016
bors added a commit that referenced this issue Aug 1, 2016
Warn about unused keys in dependency specification

Closes #2869 and #2695
@bors bors closed this as completed in #2940 Aug 1, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
E-easy Experience: Easy
Projects
None yet
Development

No branches or pull requests

2 participants