Skip to content

Fix parsing#33

Merged
kunitoki merged 1 commit into
mainfrom
dev/parsing_fixes
Jun 8, 2026
Merged

Fix parsing#33
kunitoki merged 1 commit into
mainfrom
dev/parsing_fixes

Conversation

@kunitoki

@kunitoki kunitoki commented Jun 8, 2026

Copy link
Copy Markdown
Owner

This pull request introduces a new workaround for parsing C++ translation units on macOS by injecting the system SDK path when needed, and adds comprehensive tests to ensure the robustness of this logic. It also bumps the package version and makes minor documentation updates.

macOS sysroot injection and related test coverage:

  • Added logic in parse_translation_unit (in parser.py) to detect when running on macOS without an explicit -isysroot argument, and automatically inject the system SDK path using xcrun to prevent missing C header errors. Handles and silences possible exceptions if xcrun fails or is missing.
  • Added a new TestDarwinSysroot test class in test_parser.py to cover all code paths of the sysroot injection logic, including cases where -isysroot is already present, xcrun returns an empty string, or raises errors.

Diagnostics handling:

  • Improved diagnostics printing in parse_translation_unit to only print all diagnostics when verbose, but always collect errors for strict mode.

Version and documentation:

  • Bumped the package version to 0.22.0 in __init__.py.
  • Updated badge URLs in README.md to reflect the new version and minor query parameter changes. [1] [2]

@kunitoki kunitoki merged commit bd5e0b6 into main Jun 8, 2026
48 checks passed
@kunitoki kunitoki deleted the dev/parsing_fixes branch June 8, 2026 12:52
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.

1 participant