-
Notifications
You must be signed in to change notification settings - Fork 874
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
adds a basic maven dependency updater hint. #5009
Conversation
4c0a8a5
to
e03fc81
Compare
e03fc81
to
d631225
Compare
d631225
to
bf34dff
Compare
only rebased to latest master |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Implementation looks sane. Two thoughts:
- (Out of scope for this changeset): Maven hints are missing "Show as warning on current line". With more hints the noise goes up and the hepfulness goes down. This is a candiate for to much noise. @work this would flag nearly all dependencies and thus I would deactivate it.
- Would it make sense to provide an update to latest and "latest in same major version"? I associate bumping major version with incompatible change or at least "no stability guarentee".
bf34dff
to
922fa4c
Compare
yeah would be nice to have feature parity with the java hints where it makes sense. There is also currently no way to run maven hints as inspections although this is probably only rarely needed. Projects can define project specific hints but this is also only possible for java hints I believe (I don't see anything else in the combo box).
Done. I added it as option in the hint settings. I actually thought about adding this too but dismissed it since I initially wanted to keep this really simple (since there are maven plugins and dependabot for this). But I believe a simple "don't suggest major version upgrades" probably covers 95% of all typical cases, so why not. The initial motivation for this was because many project pom templates are outdated, this gives the user a quick upgrade path even on first use once the IDE downloaded the maven index. The release version hint (and other IDE features too) require certain compiler plugin versions. This hint can basically unlock other hints by bumping this version. |
java/maven.hints/src/org/netbeans/modules/maven/hints/pom/UpdateDependencyHint.java
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks sane to me.
ecf07b8
to
b3406cf
Compare
awesome, squashed PR to:
this should hopefully reduce risks and allow to test things independently if something happens. (I try to avoid fixing bugs in feature commits) |
for option customizers: - this fixes various issues with cancel behavior caused by hints logic not polling the saved values on second open of the options panel - fixes apply button activation when options change for the main panel hint activation/deactivation logic: - fixes a bug when it was not possible to enable a hint again when previously disabled in the same session without a NB restart - this was caused by the fact that the interal saved value storage of the Configuration object was never reset before reuse
- marks artifacts which have a newer version available - provides a fix to bump the version - supports maven properties - can optionally ignore major version upgrades - gives it's best to filter/compare non-standard versions
b3406cf
to
0fdc498
Compare
@matthiasblaesing sorry for changing the PR after approval. I fixed #5165 too. See first commit. |
Could reproduce the problem and found it fixed with the update. Thank you. |
ignores non-numerical versionsdiscoveredComparableVersion
:)-SNAPSHOT
if the used version is also using a qualifierI wasn't sure whether or not to enable this by default but I decided to enable it mostly because:
Performance seems good. It checks large poms in about a second. Maven hints are not cancellable unfortunately.