-
Notifications
You must be signed in to change notification settings - Fork 154
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
consider support //!DEPS for excluding dependencies #150
Comments
I stumbled upon this issue as well. For a certain library I would like to exclude all transitive dependencies. To be more precise. This is the exception I currently get:
Without exclusions there is no way to get out of this... |
So what you are after is that to be able to use a dependency but NOT get its transitive or would being able to exclude a dependency be what you are after ? I think/fear both actually need doing as I bumped into both cases but thus far solved by fixing the broken dependencies upstream :) |
I guess excluding all transitive dependencies is a rare use case. I'd like to do something equivalent to maven exclusions: <dependency>
<groupId>...</groupId>
<artifactId>...</artifactId>
<version>...</version>
<exclusions>
<exclusion>
<groupId>*</groupId>
<artifactId>*</artifactId>
</exclusion>
</exclusions>
</dependency> In this example it's used to exclude all transitive deps, but of course you can fine-tune it to exclude certain deps. |
Hmm. That isn't a bad idea. Something like: '//DEPS x:y:2.3!::*' And then allow to have comma separate list of patterns after ! You won't be able to do a global exclude this way but can express exclude all deps or exclude specific deps per dep. |
Well, I have not been precise enough in my first comment. Your suggestion perfectly matches my requirements. |
In my opinion using a So to translate it into natural language: Add a dependency to this GAV, but not to these GAVs. |
so just to outline the suggested expansion of dependency syntax:
The nice thing about this syntax is that it can be used on the command line too. Probably want to figure out if #980 notion of runtime/compile dependencies is per dependency or just something done via Thoughts ? |
I don't have an alternative right now that is not worse, but I do feel that this increases complexity for that feature quite a bit so thinking about it some more might be advantageous. Because once we add this we'll have to support it forever :-) |
I like the syntax. The only thing that is too much magic in my opinion is Excluding all transitive deps is a rare use case and I prefer to make this more explicit by using |
And multiple transitive deps which should be excluded are comma-separated? You did not add an example for this use case. |
rareness is probably relative ;) i.e. any maven fat jar published in maven central i.e. quarkus cli will have a pom.xml that says it needs dependencies when it does not.
and thats the reson I prefer to allow the shorthand. |
yes, comma separated with no whitespace allowed.
|
what I don't like is the inabiity to do a global exclude, i.e. always exclude log4j no matter what dependency its from. Maybe allow
would quarkus-cli be allowed to take in log4j ? I'm inclined to say no but that does mean we'll need to parse list in phases... also, should |
Will the issue be fixed/improvement implemented? |
Yes, Eventually. You want to make a go on it? |
usecase:
which happens when you have:
could ofcourse just exclude slf4j-nop here but what if that is the one I want to use...thus we could have something like:
to mark for exclusion instead of exclude
The text was updated successfully, but these errors were encountered: