You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@solr.apache.org by "malliaridis (via GitHub)" <gi...@apache.org> on 2024/12/18 16:27:34 UTC
[PR] Optimize dependency resolution via platform module [solr]
malliaridis opened a new pull request, #2915:
URL: https://github.com/apache/solr/pull/2915
# Description
After the upgrade to version catalogs there were changes made in the way our project resolves the dependencies. The new "flow introduced has proven to be quite confusing and problematic.
# Solution
This PR aims to solve the issues by introducing a platform module that holds all the constraints with the libraries included in our version catalog. This platform module is added to the root modules `solr:api` and `solr.core` as via the `api` configuration, so that it is inherited across all the other modules.
This way, it is no longer necessary to add constraints to the `gradle/validation/dependencies.gradle`, but it is sufficient to include the conflicting dependency in the version catalog.
# Tests
These changes can be manually tested by comparing the libraries included in the output of `gradlew assemble`. There should not be any differences.
# Checklist
Please review the following and check all that apply:
- [X] I have reviewed the guidelines for [How to Contribute](https://github.com/apache/solr/blob/main/CONTRIBUTING.md) and my code conforms to the standards described there to the best of my ability.
- [ ] I have created a Jira issue and added the issue ID to my pull request title.
- [X] I have given Solr maintainers [access](https://help.github.com/en/articles/allowing-changes-to-a-pull-request-branch-created-from-a-fork) to contribute to my PR branch. (optional but recommended, not available for branches on forks living under an organisation)
- [X] I have developed this patch against the `main` branch.
- [ ] I have run `./gradlew check`.
- [ ] I have added tests for my changes.
- [ ] I have added documentation for the [Reference Guide](https://github.com/apache/solr/tree/main/solr/solr-ref-guide)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org
Re: [PR] Optimize dependency resolution via platform module [solr]
Posted by "malliaridis (via GitHub)" <gi...@apache.org>.
malliaridis commented on PR #2915:
URL: https://github.com/apache/solr/pull/2915#issuecomment-2602716704
Closing this in favor to https://github.com/apache/solr/pull/2925
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org
Re: [PR] Optimize dependency resolution via platform module [solr]
Posted by "dsmiley (via GitHub)" <gi...@apache.org>.
dsmiley commented on PR #2915:
URL: https://github.com/apache/solr/pull/2915#issuecomment-2564228811
Ah; thanks for making the important distinction between constraints and dependencies. Your Gradle knowledge is impressive!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org
Re: [PR] Optimize dependency resolution via platform module [solr]
Posted by "malliaridis (via GitHub)" <gi...@apache.org>.
malliaridis closed pull request #2915: Optimize dependency resolution via platform module
URL: https://github.com/apache/solr/pull/2915
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org
Re: [PR] Optimize dependency resolution via platform module [solr]
Posted by "malliaridis (via GitHub)" <gi...@apache.org>.
malliaridis commented on PR #2915:
URL: https://github.com/apache/solr/pull/2915#issuecomment-2560092738
> SolrJ depends on "api" module too; so does this mean we unwittingly add dependencies for SolrJ users which they previously didn't have?
We have to distinguish between constraints and actual dependencies. This new platform module adds constraints to all modules that depend on it, either directly or via transitive dependencies. And the constraints currently applied are all the dependency versions currently present in the version catalog. So SolrJ only inherits the constraints, "forcing it" to use the same dependency versions as the rest of the project for the dependencies it has.
What I am not sure and need to verify is, do we set this way the constraints for any consumer of SolrJ as well, even for dependencies SolrJ does not include? If so, this would probably not be optimal.
If that is the case, this could probably be resolved by including a different version catalog for SolrJ, as Gradle allows having multiple version catalogs.
It is also worth noting, that the previous solution (if I am correct) was applying the constraints to all module configurations as well, but only if there was any conflict in any of the modules and we had to add explicitly a rule. So SolrJ inherited constraints that were not necessarily part of it anyway. So this solution should not have a large impact, but it is still under investigation.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org