Skip to content
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

Resolve androidx.navigation.safeargs.kotlin in root module #12337

Merged
merged 1 commit into from
Aug 19, 2024

Conversation

wzieba
Copy link
Contributor

@wzieba wzieba commented Aug 15, 2024

Fixes

Description

This PR moves resolving of androidx.navigation.safeargs.kotlin plugin to the root module.

This way, androidx.navigation.safeargs.kotlin applied in WooCommerce module isn't resolved in isolation, causing resolution in module-specific classpath.

In this particular example, applying this plugin in WooCommerce caused protobuf-java in version 3.17.2 to be applied. This dependency is already on classpath on root module in version 3.22.3 so resolving safeargs in root module classpath will bump protobuf to higher version.

Testing information

Not necessary: 🟢 from CI checks should be just fine.

  • I have considered adding unit tests for this change. If I decided not to add them, I have provided a brief explanation below (optional):
  • I have considered if this change warrants release notes and have added them to RELEASE-NOTES.txt if necessary. Use the "[Internal]" label for non-user-facing changes.

This way, `androidx.navigation.safeargs.kotlin` applied in `WooCommerce` module isn't resolved in isolation, causing creating another classpath.

In this particular example, applying this plugin in `WooCommerce` caused `protobuf-java` in version `3.17.2` to be applied. This dependency is already on classpath on main module in version `3.22.3` so resolving `safeargs` in root module classpath will bump `protobuf` to higher version.
@wzieba wzieba added the type: enhancement A request for an enhancement. label Aug 15, 2024
@wzieba wzieba added this to the 20.0 milestone Aug 15, 2024
@wzieba wzieba requested a review from ParaskP7 August 15, 2024 11:44
@wzieba wzieba marked this pull request as ready for review August 15, 2024 11:44
@wpmobilebot
Copy link
Collaborator

📲 You can test the changes from this Pull Request in WooCommerce-Wear Android by scanning the QR code below to install the corresponding build.
App Name WooCommerce-Wear Android
Platform⌚️ Wear OS
FlavorJalapeno
Build TypeDebug
Commit997e8c2
Direct Downloadwoocommerce-wear-prototype-build-pr12337-997e8c2.apk

@wpmobilebot
Copy link
Collaborator

📲 You can test the changes from this Pull Request in WooCommerce Android by scanning the QR code below to install the corresponding build.

App Name WooCommerce Android
Platform📱 Mobile
FlavorJalapeno
Build TypeDebug
Commit997e8c2
Direct Downloadwoocommerce-prototype-build-pr12337-997e8c2.apk

@codecov-commenter
Copy link

codecov-commenter commented Aug 15, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 40.01%. Comparing base (ecca3e7) to head (997e8c2).
Report is 106 commits behind head on trunk.

Additional details and impacted files
@@             Coverage Diff              @@
##              trunk   #12337      +/-   ##
============================================
- Coverage     40.01%   40.01%   -0.01%     
+ Complexity     5598     5597       -1     
============================================
  Files          1219     1219              
  Lines         69355    69355              
  Branches       9525     9525              
============================================
- Hits          27752    27751       -1     
  Misses        39073    39073              
- Partials       2530     2531       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@ThomazFB ThomazFB modified the milestones: 20.0, 20.1 Aug 16, 2024
Copy link
Contributor

@ParaskP7 ParaskP7 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👋 @wzieba !

I have reviewed this PR as per the instructions, everything LGTM, great job in figuring this out! 🌟 x 🌟 ^ 🌟


Btw, I tried testing it a bit too, just to make sure I see what you see as well, is that what you see when comparing the builds? 🤔

BEFORE

image

AFTER

image


Also, for those 2 security issues below:

Both are suggesting to updade to 1.53.0 or later, but we are anyway at least above 3.17.2, even before that change, what am I missing... 🤔

@wzieba wzieba merged commit 0698fe9 into trunk Aug 19, 2024
17 of 18 checks passed
@wzieba wzieba deleted the protobuf_alert branch August 19, 2024 12:25
@wzieba
Copy link
Contributor Author

wzieba commented Aug 19, 2024

Both are suggesting to updade to 1.53.0 or later, but we are anyway at least above 3.17.2, even before that change, what am I missing... 🤔

The two alerts you linked are about io.grpc:grpc-protobuf dependency, which is a transitive dependency for protobuf-java. I hope this clarifies things!

@ParaskP7
Copy link
Contributor

The two alerts you linked are about io.grpc:grpc-protobuf dependency, which is a transitive dependency for protobuf-java. I hope this clarifies things!

Ah, true, thanks for clarifying this for me! 🫣

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement A request for an enhancement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants