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

build-script doesn't generate TokenKinds.def for Xcode builds #63580

Open
WowbaggersLiquidLunch opened this issue Feb 10, 2023 · 1 comment
Open
Assignees
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. build-script Area → utils: The build script cmake contributor experience generated Xcode project swift 5.9 unexpected behavior Bug: Unexpected behavior or incorrect output utils Area: the build system and other accessory scripts under the "utils" directory

Comments

@WowbaggersLiquidLunch
Copy link
Contributor

WowbaggersLiquidLunch commented Feb 10, 2023

Description

This makes it difficult to work with things like tok::kw_s.

Steps to reproduce

  1. Generate the project using utils/build-script --swift-darwin-supported-archs "$(uname -m)" --debug --llvm-cmake-options="-DLLVM_OPTIMIZED_TABLEGEN=ON" --xcode --clean (this command differs from the one recommended in the Getting Started guide only by the additional --debug --llvm-cmake-options="-DLLVM_OPTIMIZED_TABLEGEN=ON", which shouldn't matter much).

  2. Follow the rest of the steps for setting up the Xcode project: https://github.com/apple/swift/blob/72f9c3ff122e5f79d63cbaff44a1e2db95e36286/docs/HowToGuides/GettingStarted.md#using-ninja-with-xcode

  3. Look for TokenKinds.def in the project, and find only TokenKinds.def.gyb.

Expected behavior

TokenKinds.def should be generated.

Environment

  • swift-driver 1.62.15
  • Swift 5.7.2 (swiftlang-5.7.2.135.5 clang-1400.0.29.51)
  • Xcode 14.2 (14C18)
  • macOS 12.6.2
@WowbaggersLiquidLunch WowbaggersLiquidLunch added bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. build-script Area → utils: The build script generated Xcode project triage needed This issue needs more specific labels labels Feb 10, 2023
@WowbaggersLiquidLunch WowbaggersLiquidLunch changed the title Xcode project doesn't generate TokenKinds.def build-script doesn't generate TokenKinds.def for Xcode builds Feb 10, 2023
@WowbaggersLiquidLunch WowbaggersLiquidLunch added bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. and removed bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. labels Feb 10, 2023
@WowbaggersLiquidLunch
Copy link
Contributor Author

Workaround for anyone else facing the same problem: drag Attr.def and TokenKinds.def generated by a Ninja build into the Xcode project, and add them to the "SwiftAST" target.

@AnthonyLatsis AnthonyLatsis added cmake utils Area: the build system and other accessory scripts under the "utils" directory unexpected behavior Bug: Unexpected behavior or incorrect output and removed triage needed This issue needs more specific labels labels Mar 16, 2023
@AnthonyLatsis AnthonyLatsis self-assigned this Mar 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. build-script Area → utils: The build script cmake contributor experience generated Xcode project swift 5.9 unexpected behavior Bug: Unexpected behavior or incorrect output utils Area: the build system and other accessory scripts under the "utils" directory
Projects
None yet
Development

No branches or pull requests

2 participants