-
Notifications
You must be signed in to change notification settings - Fork 200
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
Question: Display max minor and max overall versions? #841
Comments
It's a good idea that we never tried to implement. We discussed it in #69 as version breadcrumbs, e.g. A concern is that unfortunately Gradle does not parallelize the dependency metadata requests (like Maven does), so those are sequentially evaluated. For large projects that is slow and this might require a few round trips if it looks at each |
I know nothing about the Gradle API so this question may be stupid, but is there an endpoint where you can provide group and name, and it give you the list of versions? My thinking is that if there is, can then run it through a function to obtain the Prod released versions and then run a version REGEX (based on the current version of a dependency) against the list and pull the highest minor version. Then of course, also pull the max version. |
That would make sense if we inspected the versioning metadata directly. For example, if we looked at the maven-metadata.xml for a dependency. However, this plugin instead defers all of the resolution to Gradle since it has rich dependency management that we didn't want to reinvent. That let's us be consistent with resolution rules, constraints, security and proxying, etc. We resolve a copy of the source configuration using a dynamic version and compare the results. In this case we'd have to resolve |
Apologies for delayed response. Coming back to this, wouldn't you only need to ask Gradle to resolve |
Correct, but it would have to be resolved twice as two cloned configurations. If we added both dependency versions in a single configuration then it will always resolve to the latest once since you can't have duplicates of the same coordinate. In general we'd probably resolve the next major, next minor, next patch versions for 3x the number of resolutions. Since Gradle resolves sequentially, that might be slow for a large build as 3x the number of resolutions. However, since it is the same dependency, it might cache the metadata so the subsequent resolutions are instant. Therefore, I don't know if there is a performance penalty until we attempt this feature. As users often use |
I swear I am not only responding once a month on purpose. I have been thinking over this sporadically over the past month whenever the topic of dependency management comes up. As an alternative, what if I could provide this Gradle script a flag that would tell it that I want it to resolve the highest minor version instead? The default behavior of the script would continue as it currently is, finding the highest overall version. Could this approach solve the caching unknowns (and concern) of your last comment? |
Yep. Those were the concerns / unknowns, but had we done the implementation work we’d know and could flag it if a concern. As a weekend project it’s open to PRs to anyone who has an itch as long as they don’t increase the plugin’s scope/burden substantially. |
For example, SpringBoot recommends updating to the latest 2.x version before making the jump to 3.x
So, say I have an application running SpringBoot 2.2.6. I would like a column to show 2.7.18 as the highest minor version and another column to show 3.2.2 as the highest overall version.
Is this at all possible with the current version of the library or would that be an enhancement?
The text was updated successfully, but these errors were encountered: