Not planned
Description
WebJars Locator (that is, webjars-locator-core
) uses X.Y
versioning format that doesn't quite align with the semver, however it seems that Spring Boot's dependency management policy treats the Y
part as minor here as it didn't pick up 0.51
that was released about a week before Spring Boot 2.7.1
.
I'm not really sure what's the policy for managing dependencies with similar versioning format but it seems that as things stand now Spring Boot will only upgrade WebJars Locator once per its own minor release, meaning 2.7.x
will stick with 0.50
which isn't ideal. Could you consider doing an exception here?
Metadata
Metadata
Assignees
Type
Projects
Milestone
Relationships
Development
No branches or pull requests
Activity
philwebb commentedon Jul 8, 2022
I'm not sure we should do this. There doesn't seem to be any guarantee that
0.51
is compatible with0.50
. In fact, applying this rule would suggest that0.51
is compatible with0.1
.vpavic commentedon Jul 8, 2022
Just to confirm, your position on guarantees here is basically due to SemVer item 4?
wilkinsona commentedon Jul 8, 2022
Not from my perspective. It could be
1.1
and1.51
and Phil's reasoning would stand.vpavic commentedon Jul 8, 2022
How come, if this is about backwards compatibility guarantees? Minor should by definition be backwards compatible.
philwebb commentedon Jul 8, 2022
It's not clear to me if WebJars is following semver or not, but just thinking practically it seems to me that breaking changes are likely possible in a minor version bump. Looking at https://mvnrepository.com/artifact/org.webjars/webjars-locator it appears that there aren't really any patch releases. If we follow the logic that
0.51
is compatible with0.50
backwards then0.51
must also be compatible with0.1
.vpavic commentedon Jul 8, 2022
Alright, I'll try reaching out to WebJars to see if they're willing to adopt SemVer.
philwebb commentedon Jul 8, 2022
That would be helpful. It looks like the API is pretty stable so I imagine upgrades are most often back compatible. There have been examples in the past where deprecated classes have been removed so it seems there's no guarantee at the moment.
vpavic commentedon Jul 8, 2022
I've opened webjars/webjars-locator-core#86.
jamesward commentedon Jul 8, 2022
Hi all! Thanks for all your great support of WebJars in Spring. :)
A few thoughts...
webjars-locator-core
because the primary feature ofwebjars-locator-core
is about classpath scanning which a) doesn't use Spring's mechanism b) may not be compatible with Spring Native c) has performance overhead. We may still need something from WebJars that can handle resolving the version-less paths but that could be pulled out ofwebjars-locator-core
to a much smaller library.wilkinsona commentedon Jul 8, 2022
Thanks, @jamesward.
We added dependency management for
webjars-locator
in #3892 and switched towebjars-locator-core
in #12060. Boot itself doesn't depend on it but I think we added the dependency management as a convenience for users of Framework'sWebJarsResourceResolver
. The resolver usesorg.webjars.WebJarAssetLocator
and therefore requireswebjars-locator-core
.FWIW, we don't follow strict SemVer ourselves. We aim for patch releases (third digit) to be drop-in replacements, minor releases to be easy to adopt, and major releases to potentially take a bit more effort. We only consume patch releases of third-party dependencies in our patch releases in a best effort to be a drop-in replacement. Perhaps with a policy like this, automation wouldn't be necessary?
4 remaining items