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

CB-13496: Fix greedy regex in plist-helpers #45

Merged
merged 1 commit into from Sep 11, 2018

Conversation

4 participants
@dpogue
Copy link
Member

dpogue commented Sep 6, 2018

Platforms affected

iOS

What does this PR do?

Resolves an issue where a regex was overly greedy when comparing plist entries for merging and could result in collapsing several of them into a single entry.

What testing has been done on this change?

Added a test that fails with current master and passes with this change, based on the details provided by @knight9999 in the JIRA bug. It sounds like this might be the cause of GH-44 as well (/fyi @donnie-jp).

Now, my fix assumes that we're always looking for $(something) and not just $something, which might not be a safe assumption. Unfortunately I'm not well-versed enough in iOS stuff to know :(

Checklist

  • Reported an issue in the JIRA database
  • Commit message follows the format
  • Added automated test coverage as appropriate for this change.

@dpogue dpogue requested a review from knight9999 Sep 6, 2018

@codecov-io

This comment has been minimized.

Copy link

codecov-io commented Sep 6, 2018

Codecov Report

Merging #45 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master      #45   +/-   ##
=======================================
  Coverage   86.24%   86.24%           
=======================================
  Files          19       19           
  Lines        1730     1730           
  Branches      360      360           
=======================================
  Hits         1492     1492           
  Misses        238      238
Impacted Files Coverage Δ
src/util/plist-helpers.js 81.39% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 446adc1...22e79cc. Read the comment docs.

@dpogue

This comment has been minimized.

Copy link
Member

dpogue commented Sep 6, 2018

#44 says that their problem is related to the same JIRA ticket

@knight9999
Copy link
Contributor

knight9999 left a comment

This looks good.
In the future I think we should find a way to distinguish the placeholder (i.e. variable with $ prefix) in cordova plugin.xml and the placeholder in xcode plist. For example, introducing escape character.

@donnie-jp

This comment has been minimized.

Copy link

donnie-jp commented Sep 6, 2018

@dpogue / @knight9999 - thanks for getting this PR through so quickly!

@janpio janpio added this to 🐣 New PR / Untriaged in Apache Cordova: Tooling Pull Requests Sep 6, 2018

@janpio janpio moved this from 🐣 New PR / Untriaged to ⏳ Waiting for Review in Apache Cordova: Tooling Pull Requests Sep 6, 2018

@janpio janpio moved this from ⏳ Waiting for Review to ✅ Approved, waiting for Merge in Apache Cordova: Tooling Pull Requests Sep 6, 2018

@dpogue dpogue merged commit 9c6cda3 into apache:master Sep 11, 2018

2 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

Apache Cordova: Tooling Pull Requests automation moved this from ✅ Approved, waiting for Merge to 🏆 Merged, waiting for Release Sep 11, 2018

@dpogue dpogue deleted the dpogue:plist-helper branch Sep 11, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment