This repository has been archived by the owner on Sep 9, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1k
Per-project prune options are ignored #1561
Comments
speijnik
added a commit
to speijnik/dep
that referenced
this issue
Jan 24, 2018
* Use prune options defined per-project when generating gps.RootPruneOptions * Add test cases checking if this behavior is correct
speijnik
added a commit
to speijnik/dep
that referenced
this issue
Jan 24, 2018
* Use prune options defined per-project when generating gps.RootPruneOptions * Add test cases checking if this behavior is correct
🤦♂️ thank you. |
sdboyer
added a commit
that referenced
this issue
Jan 24, 2018
Fix ignored per-project prune options (#1561)
I noticed a very strange behavior after this change. Are per-project options inherited from the top However it's not the case. My config is like this: [prune]
unused-packages = true
go-tests = true
non-go = true
[[prune.project]]
name = "github.com/aaa/bbb"
non-go = false With this, the global config
is not inherited for the dependency I must write
Then it works properly, but the command line displays a warning:
|
ugh. that PR is correct in the small - it processes the data correctly out of Gopkg.toml. but the interleaving of global with per-project options happens elsewhere. perhaps we need to review that, too. |
cc @ibrasho |
Should I open a new issue? |
yeah, this isn't actually fixed. |
This was referenced Jan 24, 2018
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
What version of
dep
are you using (dep version
)?v0.4.0
What
dep
command did you run?dep ensure
Gopkg.toml contains per-project prune options which are silently ignored.
Global options have non-go pruning enabled, per-project options has non-go pruning disabled.
What did you expect to see?
Per-project prune options applied, non-go files not pruned for specific project.
What did you see instead?
Global prune options are applied to every project.
Analysis
A quick analysis of this issue shows that fromRawPruneOptions incorrectly applies the global options (from raw, instead of from p) when converting the raw prune options to gps.RootPruneOptions.
I am in the process of preparing a PR with a fix for this problem right now.
The text was updated successfully, but these errors were encountered: