Skip to content

fix(addBuildPhase): adding of PBXBuildFile entries to lookup table#174

Merged
erisu merged 2 commits into
apache:masterfrom
erisu:feat/fix-add-build-phase-without-path
Jun 25, 2026
Merged

fix(addBuildPhase): adding of PBXBuildFile entries to lookup table#174
erisu merged 2 commits into
apache:masterfrom
erisu:feat/fix-add-build-phase-without-path

Conversation

@erisu

@erisu erisu commented Jun 24, 2026

Copy link
Copy Markdown
Member
  • Add PBXBuildFile entry to filePathToBuildFile lookup table when a valid identifier is present.
  • Valid identifier is determined when the fileReference has either a path or name property value.
  • The path property takes priority when both path and name are defined.
  • When the path and name properties are not defined the entry is not added to the lookup table.

Additionally, this PR

  • Added some in-code documentation.
  • Using JSDocs
  • Added a basic example

Any additional JSDoc changes I would like to keep under #171. This PR only added the minimum required to document addBuildPhase.


The main purpose of this PR is to resolve and close PR #140.

Closes #140

PR #140 was attempting to resolve a failure that occurred when looping through build files to create the filePathToBuildFile lookup table, where a file reference did not have path defined. The PR attempted to resolve this by skipping when the path property of the file reference was missing.

There are cases where name can be used instead of path. In those cases, name appears to serve as the file path, with path resolution determined by the file reference's sourceTree. But generally, name often matches the file name.

Same issue was reported here: apache/cordova-ios#1357

This PR takes a different approach and check if either path or name is defined before it skipped the build file.

erisu added 2 commits June 24, 2026 16:27
- Add PBXBuildFile entry to filePathToBuildFile lookup table when a valid identifier is present.
- Valid identifier is determined when the fileReference has either a path or name property value.
- The path property takes priority when both path and name are defined.
- When the path and name properties are not defined the entry is not added to the lookup table.
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.34%. Comparing base (04fc2dd) to head (1a38327).

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #174      +/-   ##
==========================================
+ Coverage   97.31%   97.34%   +0.02%     
==========================================
  Files          51       51              
  Lines       10968    11058      +90     
==========================================
+ Hits        10674    10764      +90     
  Misses        294      294              

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@erisu erisu requested a review from dpogue June 24, 2026 13:19
@erisu erisu merged commit 81ddc4a into apache:master Jun 25, 2026
12 checks passed
@erisu erisu deleted the feat/fix-add-build-phase-without-path branch June 25, 2026 05:21
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.

4 participants