Closed michaelmcguire closed 1 year ago
Thanks for raising this @michaelmcguire and for the thorough details and context 👍
I'm working on a fix for this
Thank you, this would be a welcome contribution!
- this is considered a bug
It's something we missed when working, but would be great to have xcdiff display the diff for those properties too.
- showing these differences in the
BUILD_PHASES
section is appropriate.
We do have a dedicated comparator for PBXCopyFilesBuildPhase
which is also a build phase, for consistency perhaps we can have a dedicated comparator for script phases too?
@marciniwanicki would it be odd to have duplicate or partial information for the same build phase under two different comparators? e.g. inputFileListPaths
appears under BUILD_PHASES
but the new comparator would display the diff of the other properties such as "Based on dependency analysis" (alwaysOutOfDate
).
It's something we missed when working, but would be great to have xcdiff display the diff for those properties too.
Great! Thanks for the verification, @kwridan.
- showing these differences in the
BUILD_PHASES
section is appropriate.We do have a dedicated comparator for
PBXCopyFilesBuildPhase
which is also a build phase, for consistency perhaps we can have a dedicated comparator for script phases too?@marciniwanicki would it be odd to have duplicate or partial information for the same build phase under two different comparators? e.g.
inputFileListPaths
appears underBUILD_PHASES
but the new comparator would display the diff of the other properties such as "Based on dependency analysis" (alwaysOutOfDate
).
Yeah, I noticed that several of the build phases (dependencies, resources) have dedicated comparators and listed themselves separately from BUILD_PHASES
. It seems to me like having a separate place for these differences to be reported would make sense as well.
I have an issue opened with XcodeProj
to make accessing the script phases easier (with a PR to be opened today), but it's not strictly necessary to fix this issue (which I'll also be working on today).
Let me know if you'd like it as a new report section or done inside of BUILD_PHASES
. I'll probably move forward for now implementing as a new comparator but if you'd like it done inside BUILD_PHASES
, shouldn't be too difficult to change.
Thanks for your quick response!
Thank you for the follow up @michaelmcguire
I have an https://github.com/tuist/XcodeProj/issues/716 to make accessing the script phases easier (with a PR to be opened today), but it's not strictly necessary to fix this issue (which I'll also be working on today).
awesome, will review that shortly.
Let me know if you'd like it as a new report section or done inside of BUILD_PHASES. I'll probably move forward for now implementing as a new comparator but if you'd like it done inside BUILD_PHASES, shouldn't be too difficult to change.
Makes sense having it as a separate comparator for consistency - perhaps called with a tag of scripts
?
Thank you for the follow up @michaelmcguire
I have an tuist/XcodeProj#716 to make accessing the script phases easier (with a PR to be opened today), but it's not strictly necessary to fix this issue (which I'll also be working on today).
awesome, will review that shortly.
Thanks!
Let me know if you'd like it as a new report section or done inside of BUILD_PHASES. I'll probably move forward for now implementing as a new comparator but if you'd like it done inside BUILD_PHASES, shouldn't be too difficult to change.
Makes sense having it as a separate comparator for consistency - perhaps called with a tag of
scripts
?
That works. I was thinking of generally referring to it as "run script" everywhere since that is how it's defined in the UI, but I can just shorten to scripts (or whatever else you like when I open the PR).
That works. I was thinking of generally referring to it as "run script" everywhere since that is how it's defined in the UI, but I can just shorten to scripts (or whatever else you like when I open the PR).
run_scripts
works too 👍
Resolved via: https://github.com/bloomberg/xcdiff/pull/112
Describe the bug Comparisons of build phases does not compare all properties for script actions.
To Reproduce Steps to reproduce the behavior:
cd Fixtures
open Project1.xcodeproj
swift run xcdiff --target Project --tag BUILD_PHASES -v
shows difference:⚠️ Only in first (1):
• ShellScript (runScript)
✅ BUILD_PHASES > "Project" target
❌ BUILD_PHASES > "Project" target
⚠️ Value mismatch (1):
• Different properties in "ShellScript (runScript)" ◦ inputFileListPaths = ["$(SRCROOT)/newInputFile.xcfilelist"] ◦ inputFileListPaths = []
✅ BUILD_PHASES > "Project" target