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

fix(ios): Prevent mix build phases #933

Merged
merged 5 commits into from
Oct 23, 2024

Conversation

MaximBelov
Copy link
Contributor

@MaximBelov MaximBelov commented Oct 17, 2024

Platforms affected

Any

Motivation and Context

Different installation orders for currently installed plugins

iOS
https://github.com/MaximBelov/reproduce-cordova-apply-plugins-sort/blob/20ab95bca8aef992aa5b1982b38e5e6d750580a8/plugins/ios.json

Android
https://github.com/MaximBelov/reproduce-cordova-apply-plugins-sort/blob/20ab95bca8aef992aa5b1982b38e5e6d750580a8/plugins/android.json

Plugins installation order should be the same for any platform and have the source of faithful from package.json

Why is this important?
ios: Prevent mix build phases

The plugin cordova-plugin-firebasex runs a hook that adds a new Build Phase "Crashlytics", which should be the last one
dpa99c/cordova-plugin-firebasex#897

Description

How to reproduce

https://github.com/MaximBelov/reproduce-cordova-apply-plugins-sort

Testing

How to reproduce
Repository: https://github.com/MaximBelov/reproduce-cordova-apply-plugins-sort

Version without patch

git checkout master
npm run build
git diff  --no-index plugins/ios.json plugins/android.json

Result:
image


Version with patch

git checkout patch
npm run build
git diff  --no-index plugins/ios.json plugins/android.json

Result:
image

Checklist

  • I've run the tests to see all new and existing tests pass
  • I added automated test coverage as appropriate for this change
  • Commit is prefixed with (platform) if this change only applies to one platform (e.g. (android))
  • If this Pull Request resolves an issue, I linked to the issue in the text above (and used the correct keyword to close issues using keywords)
  • I've updated the documentation if necessary

@MaximBelov MaximBelov changed the title fix(addHelper): Apply plugins sort from package.json fix: Apply plugins sort from package.json Oct 17, 2024
@MaximBelov MaximBelov marked this pull request as ready for review October 17, 2024 03:42
@MaximBelov MaximBelov changed the title fix: Apply plugins sort from package.json fix(ios): Prevent mix build phases Oct 17, 2024
Copy link
Member

@dpogue dpogue left a comment

Choose a reason for hiding this comment

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

This looks good to me.

I don't remember off-hand what the plugins/android.json and plugins/ios.json files are used for (ideally they wouldn't be necessary since they duplicate what's already listed in package.json?), but I know the order of the plugins in package.json is important for load ordering issues.

@dpogue
Copy link
Member

dpogue commented Oct 18, 2024

You might need to add a mock for something in the tests, they seem to be unhappy.

@MaximBelov
Copy link
Contributor Author

MaximBelov commented Oct 18, 2024

You might need to add a mock for something in the tests, they seem to be unhappy.

Fixed

@codecov-commenter
Copy link

codecov-commenter commented Oct 18, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 87.95%. Comparing base (a70e330) to head (fc30726).

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #933      +/-   ##
==========================================
+ Coverage   87.92%   87.95%   +0.02%     
==========================================
  Files          46       46              
  Lines        2129     2134       +5     
==========================================
+ Hits         1872     1877       +5     
  Misses        257      257              

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

@dpogue dpogue merged commit 36284e1 into apache:master Oct 23, 2024
11 checks passed
@MaximBelov MaximBelov deleted the apply-plugins-sort branch October 23, 2024 01:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants