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

Adopt PIF cache as a means for determining targets and relationships #62

Merged
merged 21 commits into from
Jul 12, 2024

Conversation

NinjaLikesCheez
Copy link
Collaborator

This change adopts the ideas in and closes #61

PIF (Project Interchange Format) is a representation of a project model created by clients (SPM & Xcode) to send to the new build services XCBuild. A more in-depth description can be found in SPM's PIF.swift.

The reason to use PIF over PBXProject comes down to a couple reasons:

  • Structured and easy to consume
  • More publicly documented than PBX
  • We can leverage most of the structures from SPM (with some changes as SPM uses a different internal representation than Xcode)
  • Solves some existing issues like SPM dependencies, xcconfig naming changes, etc

This change adds a new package PIF with a library PIFSupport (and test executable) which supports the parsing of a PIF cache as it exists in Xcode's Derived Data. This module doesn't attempt to reason about it's contents - it is purely there for discovery and decoding of the cache.

PIFCache therefore exists to handle the reasoning of PIF targets and dependencies in the context of Gen IR.

This library derives it's behaviour from SPM's PIF decoding, but adjusts it to work with Xcode's internal json file format.
This allows us to switch out the Node value without massive changes
One test is failing because the output postprocessor is not moving dependencies - that still needs to be addressed
@NinjaLikesCheez NinjaLikesCheez self-assigned this May 23, 2024
@NinjaLikesCheez NinjaLikesCheez mentioned this pull request May 23, 2024
@NinjaLikesCheez NinjaLikesCheez marked this pull request as draft May 23, 2024 12:23
Check modification time to grab the most recent one.
These have different PIF cache locations in the build cache
This attempts to more accurately define what Gen-IR's idea of a target
is, which is a bit different than the PIF representation. Not every
target is considered buildable, so we also split out the storage of
commands and pass them directly to CompilerCommandRunner.
@bmxav bmxav marked this pull request as ready for review July 12, 2024 11:08
@bmxav bmxav merged commit 1e8375e into develop Jul 12, 2024
2 checks passed
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.

2 participants