microsoft / microsoft/xcodeproj

Deserilization fails when swift package is linked to iOS app

Open
#34 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
45
Forks
18
PR merge metrics
No merged PRs in 30d

Description

See the screenshot for steps to reproduce, I have erased the name of the swift package

Image

  • Add swift package
  • Link swift package library to an app target
  • Open Xcode project xcodeproj.XcodeProject(project_path, ignore_deserialization_errors=True)
  File "scratch_8.py", line 16, in xcodeproj_compare
    project = xcodeproj.XcodeProject(project_path, ignore_deserialization_errors=True)
  File "venv/lib/python3.8/site-packages/xcodeproj/__init__.py", line 109, in __init__
    **deserialize.deserialize(
  File "venv/lib/python3.8/site-packages/deserialize/__init__.py", line 91, in deserialize
    return _deserialize(
  File "venv/lib/python3.8/site-packages/deserialize/__init__.py", line 185, in _deserialize
    _deserialize_dict(
  File "venv/lib/python3.8/site-packages/deserialize/__init__.py", line 295, in _deserialize_dict
    result[dict_key] = _deserialize(
  File "venv/lib/python3.8/site-packages/deserialize/__init__.py", line 185, in _deserialize
    _deserialize_dict(
  File "venv/lib/python3.8/site-packages/deserialize/__init__.py", line 389, in _deserialize_dict
    raise DeserializeException(
deserialize.exceptions.DeserializeException: Unexpected missing value for: typing.Dict[str, xcodeproj.pbxobject.PBXObject].4CE2EAC72C338DC100CB62EF.package

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the failure by linking a Swift package library to an iOS app, then opening the project with xcodeproj.XcodeProject(..., ignore_deserialization_errors=True). Start from the deserialization traceback for PBXObject.package; done means the project opens without the Unexpected missing value exception.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, swift
Domain
build-system, mobile
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.