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

[MNG-7854] Warn if imported dep is ignored #1370

Merged
merged 6 commits into from
Feb 1, 2024

Conversation

cstamas
Copy link
Member

@cstamas cstamas commented Jan 10, 2024

The artificial (or "bolted on") scope "import" behaves wildly differently that rest of Maven, causes surprise to our users. For start, we should emit "actionable" warnings about these, ultimate goal is to align this behaviour with "maven way" of working ("closest occurence wins" vs current weird "direct occurrence then first occurence wins" strategy)


https://issues.apache.org/jira/browse/MNG-7854

@gnodet gnodet mentioned this pull request Feb 1, 2024
@gnodet
Copy link
Contributor

gnodet commented Feb 1, 2024

I've added a few unit tests. I've slightly changed things so that the warnings are only created when the dependency is not directly managed. The warning also suggests to add a direct managed dependency to get rid of it, so it's now helpful and actionnable.

That's clearly a good first step. The next one could be to use a "closest wins" strategy instead of this "direct wins, then first wins" weird ad-hoc strategy.

@cstamas cstamas marked this pull request as ready for review February 1, 2024 15:47
@cstamas cstamas merged commit 4255993 into apache:master Feb 1, 2024
18 checks passed
@cstamas cstamas deleted the MNG-7854-take-2 branch February 1, 2024 16:25
This pull request was closed.
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