Skip to content

Make GSON and org.json dependencies optional #3278

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

agavrilov76
Copy link
Contributor

Stop requiring GSON and org.json dependencies by declaring them 'optional' in the pom file as described in https://maven.apache.org/guides/introduction/introduction-to-optional-and-excludes-dependencies.html

This change will break existing projects that use the JSON jedis feature and don't have explicit dependencies to GSON and org.json. Projects that don't use JSON would not longer have unwanted dependencies in their class-path

See #2961 and #2962 for more information and rationale.

Stop requiring GSON and org.json dependencies by decalring them 'optional' in the pom file as described in https://maven.apache.org/guides/introduction/introduction-to-optional-and-excludes-dependencies.html

This change will break existing projects that use the JSON jedis feature and don't have explict depedencies to GSON and org.json.
Projects that don't use JSON would not longer have unwanted dependencies in their classpath
@codecov-commenter
Copy link

Codecov Report

Base: 66.94% // Head: 66.89% // Decreases project coverage by -0.04% ⚠️

Coverage data is based on head (38861c1) compared to base (bc1d02a).
Patch has no changes to coverable lines.

Additional details and impacted files
@@             Coverage Diff              @@
##             master    #3278      +/-   ##
============================================
- Coverage     66.94%   66.89%   -0.05%     
+ Complexity     4635     4632       -3     
============================================
  Files           256      256              
  Lines         15014    15014              
  Branches        937      937              
============================================
- Hits          10051    10044       -7     
- Misses         4560     4565       +5     
- Partials        403      405       +2     
Impacted Files Coverage Δ
...nts/jedis/providers/ClusterConnectionProvider.java 73.21% <0.00%> (-5.36%) ⬇️
src/main/java/redis/clients/jedis/Protocol.java 90.62% <0.00%> (-1.25%) ⬇️
...ava/redis/clients/jedis/JedisClusterInfoCache.java 71.25% <0.00%> (-1.25%) ⬇️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@sazzad16
Copy link
Contributor

This is unlikely to be accepted, for the reasons mentioned in the description. Advanced and concerned users can now exclude those dependencies.

@agavrilov76
Copy link
Contributor Author

This is unlikely to be accepted, for the reasons mentioned in the description. Advanced and concerned users can now exclude those dependencies.

Alright. Perhaps it can be accepted for the next major version if the JSON support remains implemented in the same way.

@sazzad16 sazzad16 added this to the 5.0.0 milestone Jan 12, 2023
@sazzad16 sazzad16 added the dependencies Pull request that updates a dependency label May 7, 2023
@sazzad16 sazzad16 modified the milestones: 5.0.0, 6.0.0 May 7, 2023
@sazzad16 sazzad16 removed this from the 6.0.0 milestone May 25, 2023
@sazzad16 sazzad16 added the breakingchange Pull request that has breaking changes. Must include the breaking behavior in release notes. label Sep 23, 2024
@sazzad16 sazzad16 added this to the 6.0.0 milestone Oct 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breakingchange Pull request that has breaking changes. Must include the breaking behavior in release notes. dependencies Pull request that updates a dependency
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants