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: don't hard fail when serializing failed #5

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

hannojg
Copy link

@hannojg hannojg commented Dec 12, 2023

In my project scenario this case failed for me. It was trying to serialise a string/uuid:

[Malformed Xcode project]: Found orphaned reference: 79332038C44045AD94B3A9FB > PBXTargetDependency.targetProxy > 68D8C8772B28CFF300FF65DB
[Malformed Xcode project]: Found orphaned reference: 096AE6AA28DE43C8996B60E0 > PBXTargetDependency.targetProxy > 68D8C8782B28CFF300FF65DB
[Malformed Xcode project]: Found orphaned reference: E408E5530DA04F7487D5646D > PBXTargetDependency.targetProxy > 68D8C8792B28CFF300FF65DB
[Malformed Xcode project]: Found orphaned reference: EE6CD26D29074DF499E3D6D6 > PBXTargetDependency.targetProxy > F186507EA3414BFCB686D489
[Malformed Xcode project]: Found orphaned reference: 241EA4F9F32C4ED7930D0229 > PBXTargetDependency.targetProxy > 09A87CA44CFA41E3BEDA4063
[Malformed Xcode project]: Found orphaned reference: 13B07F861A680F5B00A75B9A > PBXNativeTarget.buildPhases > 318C3A8FB1A0467E8F8B864D

✖ Config sync failed

Error: [ios.xcodeProjectBeta]: withIosXcodeProjectBetaBaseMod: Unable to serialize object: '68D8C8772B28CFF300FF65DB'

Instead of failing I just thought we could return a warning here?
However, I understand that It might be better to find the root cause why its failing.

@kirillzyusko
Copy link

Just for a better context what exactly fails. If we change logger to:

console.warn(util_1.default.format("Unable to serialize object: %O", value, key, this.props));

Then failed output looks like:

Unable to serialize object: 'C2AF0FB572684A1887E54D96' targetProxy {
  isa: 'PBXTargetDependency',
  target: PBXNativeTarget {
    uuid: '071838C5188B4ECC98F296EF',
    props: {
      isa: 'PBXNativeTarget',
      name: 'Shortcuts',
      productName: 'Shortcuts',
      productReference: [PBXFileReference],
      productType: 'com.apple.product-type.app-extension',
      buildConfigurationList: [XCConfigurationList],
      buildPhases: [Array],
      buildRules: [],
      dependencies: []
    }
  },
  targetProxy: 'C2AF0FB572684A1887E54D96'
}

Still investigating why key: string is not a valid construction 👀

@EvanBacon
Copy link
Owner

Could I get a repro object to test against?

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