Skip to content

Make CodeGeneration depend on swift-syntax 509 #2336

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

Merged
merged 1 commit into from
Nov 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 2 additions & 22 deletions CodeGeneration/Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,8 @@ let package = Package(
.executable(name: "generate-swift-syntax", targets: ["generate-swift-syntax"])
],
dependencies: [
// This directory is a standalone package that uses swift-syntax from the
// outer directory.
// If you are making significant changs to `CodeGeneration` locally and want
// to avoid breaking the build of `CodeGeneration` itself by generating new
// files in the parent swift-syntax package, it is encouraged to change the
// dependency to the following. That way `CodeGeneration` has its own
// checkout of swift-syntax that is unaffected by the newly generated files.
// Be sure to revert the change before committing your changes.
//
// .package(url: "https://github.com/apple/swift-syntax", branch: "main")
.package(path: "..")
.package(url: "https://github.com/apple/swift-syntax", from: "509.0.0"),
.package(url: "https://github.com/apple/swift-argument-parser.git", from: "1.2.2"),
],
targets: [
.executableTarget(
Expand Down Expand Up @@ -63,14 +54,3 @@ let package = Package(
),
]
)

if ProcessInfo.processInfo.environment["SWIFTCI_USE_LOCAL_DEPS"] == nil {
// Building standalone.
package.dependencies += [
.package(url: "https://github.com/apple/swift-argument-parser.git", from: "1.2.2")
]
} else {
package.dependencies += [
.package(path: "../../swift-argument-parser")
]
}
8 changes: 4 additions & 4 deletions Sources/SwiftParser/generated/ExperimentalFeatures.swift
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,14 @@ extension Parser {

extension Parser.ExperimentalFeatures {
/// Whether to enable the parsing of reference bindings.
public static let referenceBindings = Self(rawValue: 1 << 0)
public static let referenceBindings = Self (rawValue: 1 << 0)

/// Whether to enable the parsing of 'then' statements.
public static let thenStatements = Self(rawValue: 1 << 1)
public static let thenStatements = Self (rawValue: 1 << 1)

/// Whether to enable the parsing of typed throws.
public static let typedThrows = Self(rawValue: 1 << 2)
public static let typedThrows = Self (rawValue: 1 << 2)

/// Whether to enable the parsing of 'do' expressions.
public static let doExpressions = Self(rawValue: 1 << 3)
public static let doExpressions = Self (rawValue: 1 << 3)
}