Skip to content

Rename SwiftSyntaxBuilderGeneration to generate-swift-syntax-builder #588

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
Aug 14, 2022
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
4 changes: 2 additions & 2 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ let package = Package(
.library(name: "SwiftSyntax", type: .static, targets: ["SwiftSyntax"]),
.library(name: "SwiftSyntaxParser", type: .static, targets: ["SwiftSyntaxParser"]),
.library(name: "SwiftSyntaxBuilder", type: .static, targets: ["SwiftSyntaxBuilder"]),
.executable(name: "SwiftSyntaxBuilderGeneration", targets: ["SwiftSyntaxBuilderGeneration"])
.executable(name: "generate-swift-syntax-builder", targets: ["generate-swift-syntax-builder"])
],
targets: [
.target(
Expand Down Expand Up @@ -98,7 +98,7 @@ let package = Package(
dependencies: ["SwiftSyntax", "SwiftSyntaxParser"]
),
.executableTarget(
name: "SwiftSyntaxBuilderGeneration",
name: "generate-swift-syntax-builder",
dependencies: ["SwiftSyntaxBuilder"],
exclude: [
"gyb_helpers",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

//// Automatically Generated by SwiftSyntaxBuilderGeneration
//// Automatically Generated by generate-swift-syntax-builder
//// Do Not Edit Directly!
//===----------------------------------------------------------------------===//
//
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

//// Automatically Generated by SwiftSyntaxBuilderGeneration
//// Automatically Generated by generate-swift-syntax-builder
//// Do Not Edit Directly!
//===----------------------------------------------------------------------===//
//
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

//// Automatically Generated by SwiftSyntaxBuilderGeneration
//// Automatically Generated by generate-swift-syntax-builder
//// Do Not Edit Directly!
//===----------------------------------------------------------------------===//
//
Expand Down
2 changes: 1 addition & 1 deletion Sources/SwiftSyntaxBuilder/generated/TokenSyntax.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

//// Automatically Generated by SwiftSyntaxBuilderGeneration
//// Automatically Generated by generate-swift-syntax-builder
//// Do Not Edit Directly!
//===----------------------------------------------------------------------===//
//
Expand Down
2 changes: 1 addition & 1 deletion Sources/SwiftSyntaxBuilder/generated/Tokens.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

//// Automatically Generated by SwiftSyntaxBuilderGeneration
//// Automatically Generated by generate-swift-syntax-builder
//// Do Not Edit Directly!
//===----------------------------------------------------------------------===//
//
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import SwiftSyntax
import SwiftSyntaxBuilder

let copyrightHeader = """
//// Automatically Generated by SwiftSyntaxBuilderGeneration
//// Automatically Generated by generate-swift-syntax-builder
//// Do Not Edit Directly!
//===----------------------------------------------------------------------===//
//
Expand Down
16 changes: 8 additions & 8 deletions build-script.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
SWIFTSYNTAX_DIR = os.path.join(SOURCES_DIR, "SwiftSyntax")
SWIFTSYNTAXBUILDER_DIR = os.path.join(SOURCES_DIR, "SwiftSyntaxBuilder")
SWIFTSYNTAXPARSER_DIR = os.path.join(SOURCES_DIR, "SwiftSyntaxParser")
SWIFTSYNTAXBUILDERGENERATION_DIR = \
os.path.join(SOURCES_DIR, "SwiftSyntaxBuilderGeneration")
GENERATESWIFTSYNTAXBUILDER_DIR = \
os.path.join(SOURCES_DIR, "generate-swift-syntax-builder")

LLVM_DIR = os.path.join(WORKSPACE_DIR, "llvm-project", "llvm")
SWIFT_DIR = os.path.join(WORKSPACE_DIR, "swift")
Expand Down Expand Up @@ -291,13 +291,13 @@ def gyb_dir_mapping(
swiftsyntax_destination: Optional[str] = None,
swiftsyntaxbuilder_destination: Optional[str] = None,
swiftsyntaxparser_destination: Optional[str] = None,
swiftsyntaxbuildergenerator_destination: Optional[str] = None,
generateswiftsyntaxbuilder_destination: Optional[str] = None,
) -> Dict[str, Optional[str]]:
return {
SWIFTSYNTAX_DIR: swiftsyntax_destination,
SWIFTSYNTAXBUILDER_DIR: swiftsyntaxbuilder_destination,
SWIFTSYNTAXPARSER_DIR: swiftsyntaxparser_destination,
SWIFTSYNTAXBUILDERGENERATION_DIR: swiftsyntaxbuildergenerator_destination,
GENERATESWIFTSYNTAXBUILDER_DIR: generateswiftsyntaxbuilder_destination,
}


Expand Down Expand Up @@ -343,7 +343,7 @@ def run_code_generation(
)

swiftpm_call.extend([
"SwiftSyntaxBuilderGeneration", swiftsyntaxbuilder_destination
"generate-swift-syntax-builder", swiftsyntaxbuilder_destination
])

if verbose:
Expand Down Expand Up @@ -456,7 +456,7 @@ def verify_generated_files(gyb_exec: str, verbose: bool) -> None:
swiftsyntax_destination=tempfile.mkdtemp(),
swiftsyntaxbuilder_destination=tempfile.mkdtemp(),
swiftsyntaxparser_destination=tempfile.mkdtemp(),
swiftsyntaxbuildergenerator_destination=tempfile.mkdtemp(),
generateswiftsyntaxbuilder_destination=tempfile.mkdtemp(),
)

generate_gyb_files(
Expand Down Expand Up @@ -745,7 +745,7 @@ def build_command(args: argparse.Namespace) -> None:
builder.build("SwiftSyntax")
builder.build("SwiftSyntaxParser")
builder.build("SwiftSyntaxBuilder")
builder.build("SwiftSyntaxBuilderGeneration")
builder.build("generate-swift-syntax-builder")
except subprocess.CalledProcessError as e:
fail_for_called_process_error("Building SwiftSyntax failed", e)

Expand Down Expand Up @@ -875,7 +875,7 @@ def add_default_build_arguments(parser: argparse.ArgumentParser) -> None:
"--gyb-only",
action="store_true",
help="""
Only generate gyb templates (and not SwiftSyntaxBuilderGeneration's templates)
Only generate gyb templates (and not generate-swift-syntax-builder's templates)
""",
)

Expand Down