Skip to content

Commit 0059f2f

Browse files
authored
Merge branch 'main' into main
2 parents 0dc27c9 + 050f057 commit 0059f2f

File tree

68 files changed

+596
-327
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+596
-327
lines changed

.editorconfig

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# editorconfig.org
2+
3+
root = true
4+
5+
[*]
6+
indent_style = space
7+
indent_size = 2
8+
trim_trailing_whitespace = true
9+
insert_final_newline = true

.github/ISSUE_TEMPLATE/BASICFORMAT_BUG.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ labels: [bug, BasicFormat]
44
body:
55
- type: markdown
66
attributes:
7-
value: Thanks for taking the time to fill out this bug report! We would really appreciate if you could take the time to reduce the issue as described in [Filing BasicFormat Bug Reports](https://swiftpackageindex.com/apple/swift-syntax/main/documentation/swiftbasicformat/filingbugreports).
7+
value: Thanks for taking the time to fill out this bug report! We would really appreciate if you could take the time to reduce the issue as described in [Filing BasicFormat Bug Reports](https://swiftpackageindex.com/swiftlang/swift-syntax/main/documentation/swiftbasicformat/filingbugreports).
88
- type: textarea
99
id: source
1010
attributes:

.github/ISSUE_TEMPLATE/PARSER_BUG.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@ labels: [bug, SwiftParser]
44
body:
55
- type: markdown
66
attributes:
7-
value: Thanks for taking the time to fill out this bug report! We would really appreciate if you could take the time to reduce the issue as described in [Filing Parser Bug Reports](https://swiftpackageindex.com/apple/swift-syntax/main/documentation/swiftparser/filingbugreports).
7+
value: Thanks for taking the time to fill out this bug report! We would really appreciate if you could take the time to reduce the issue as described in [Filing Parser Bug Reports](https://swiftpackageindex.com/swiftlang/swift-syntax/main/documentation/swiftparser/filingbugreports).
88
- type: dropdown
99
id: issue-type
1010
attributes:
1111
label: Issue Kind
12-
description: What kind of issue is this? See [Filing Parser Bug Reports](https://swiftpackageindex.com/apple/swift-syntax/main/documentation/swiftparser/filingbugreports) for more details.
12+
description: What kind of issue is this? See [Filing Parser Bug Reports](https://swiftpackageindex.com/swiftlang/swift-syntax/main/documentation/swiftparser/filingbugreports) for more details.
1313
options:
1414
- Round-Trip Failure
1515
- Parser Crash

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,5 @@
1111
url: https://forums.swift.org/tags/c/development/tooling/39/swift-syntax
1212
about: Ask and answer questions about SwiftSyntax
1313
- name: SwiftSyntax Documentation
14-
url: https://swiftpackageindex.com/apple/swift-syntax/documentation/swiftsyntax
14+
url: https://swiftpackageindex.com/swiftlang/swift-syntax/documentation/swiftsyntax
1515
about: Learn about how to use the SwiftSyntax in your projects

.github/PULL_REQUEST_TEMPLATE/release_branch.md

Lines changed: 0 additions & 7 deletions
This file was deleted.

.spi.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,15 @@ builder:
1010
- SwiftSyntax
1111
- SwiftBasicFormat
1212
- SwiftCompilerPlugin
13-
- SwiftCompilerPluginMessageHandling
1413
- SwiftDiagnostics
1514
- SwiftIDEUtils
16-
- SwiftLibraryPluginProvider
1715
- SwiftOperators
1816
- SwiftParser
1917
- SwiftParserDiagnostics
2018
- SwiftRefactor
2119
- SwiftSyntaxBuilder
2220
- SwiftSyntaxMacros
2321
- SwiftSyntaxMacroExpansion
22+
- SwiftSyntaxMacrosGenericTestSupport
2423
- SwiftSyntaxMacrosTestSupport
2524
custom_documentation_parameters: [--experimental-skip-synthesized-symbols]

.swift-format

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
},
77
"lineBreakBeforeEachArgument": true,
88
"indentConditionalCompilationBlocks": false,
9+
"prioritizeKeepingFunctionOutputTogether": true,
910
"rules": {
1011
"AlwaysUseLowerCamelCase": false,
1112
"AmbiguousTrailingClosureOverload": false,

BUILD.bazel

Lines changed: 30 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ swift_syntax_library(
8888
deps = [
8989
":SwiftCompilerPluginMessageHandling",
9090
":SwiftSyntaxMacros",
91+
":_SwiftLibraryPluginProviderCShims",
9192
],
9293
)
9394

@@ -251,15 +252,26 @@ swift_syntax_library(
251252
)
252253

253254
swift_syntax_library(
254-
name = "SwiftSyntaxMacrosTestSupport",
255+
name = "SwiftSyntaxMacrosGenericTestSupport",
255256
testonly = True,
256257
deps = [
257258
":SwiftDiagnostics",
258259
":SwiftIDEUtils",
259260
":SwiftParser",
260261
":SwiftSyntaxMacroExpansion",
261262
":SwiftSyntaxMacros",
262-
":_SwiftSyntaxTestSupport",
263+
":_SwiftSyntaxGenericTestSupport",
264+
],
265+
)
266+
267+
swift_syntax_library(
268+
name = "SwiftSyntaxMacrosTestSupport",
269+
testonly = True,
270+
deps = [
271+
":SwiftSyntax",
272+
":SwiftSyntaxMacroExpansion",
273+
":SwiftSyntaxMacros",
274+
":SwiftSyntaxMacrosGenericTestSupport",
263275
],
264276
)
265277

@@ -299,6 +311,14 @@ cc_library(
299311
visibility = ["//visibility:private"],
300312
)
301313

314+
cc_library(
315+
name = "_SwiftLibraryPluginProviderCShims",
316+
hdrs = glob(["Sources/_SwiftLibraryPluginProviderCShims/include/*.h"]),
317+
includes = ["Sources/_SwiftLibraryPluginProviderCShims/include"],
318+
tags = ["swift_module=_SwiftLibraryPluginProviderCShims"],
319+
visibility = ["//visibility:private"],
320+
)
321+
302322
cc_library(
303323
name = "_SwiftSyntaxCShims",
304324
hdrs = glob(["Sources/_SwiftSyntaxCShims/include/*.h"]),
@@ -307,6 +327,13 @@ cc_library(
307327
visibility = ["//visibility:private"],
308328
)
309329

330+
swift_syntax_library(
331+
name = "_SwiftSyntaxGenericTestSupport",
332+
testonly = True,
333+
deps = [
334+
],
335+
)
336+
310337
swift_syntax_library(
311338
name = "_SwiftSyntaxTestSupport",
312339
testonly = True,
@@ -315,6 +342,7 @@ swift_syntax_library(
315342
":SwiftSyntax",
316343
":SwiftSyntaxBuilder",
317344
":SwiftSyntaxMacroExpansion",
345+
":_SwiftSyntaxGenericTestSupport",
318346
],
319347
)
320348

CODE_OF_CONDUCT.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

CONTRIBUTING.md

Lines changed: 14 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ swift-syntax is a SwiftPM package, so you can build and test it using anything t
1919
2020
## Formatting
2121

22-
swift-syntax is formatted using [swift-format](http://github.com/apple/swift-format) to ensure a consistent style.
22+
swift-syntax is formatted using [swift-format](http://github.com/swiftlang/swift-format) to ensure a consistent style.
2323

2424
To format your changes run the formatter using the following command
2525
```bash
@@ -79,34 +79,28 @@ For more information and instructions, read the GitHub docs on [forking a repo](
7979

8080
Once you've pushed your branch, you should see an option on this repository's page to create a PR from a branch in your fork.
8181

82+
> [!TIP]
83+
> If you are stuck, it’s encouraged to submit a PR that describes the issue you’re having, e.g. if there are tests that are failing, build failures you can’t resolve, or if you have architectural questions. We’re happy to work with you to resolve those issue.
84+
8285
## Opening a PR for Release Branch
8386

8487
In order for a pull request to be considered for inclusion in a release branch (e.g. `release/6.0`) after it has been cut, it must meet the following requirements:
8588

8689
1. The title of the PR should start with the tag `[{swift version number}]`. For example, `[6.0]` for the Swift 6.0 release branch.
8790

88-
1. The PR description must include the following information:
89-
90-
```md
91-
* **Explanation**: A description of the issue being fixed or enhancement being made. This can be brief, but it should be clear.
92-
* **Scope**: An assessment of the impact/importance of the change. For example, is the change a source-breaking language change, etc.
93-
* **Issue**: The GitHub Issue link if the change fixes/implements an issue/enhancement.
94-
* **Original PR**: Pull Request link from the `main` branch.
95-
* **Risk**: What is the (specific) risk to the release for taking this change?
96-
* **Testing**: What specific testing has been done or needs to be done to further validate any impact of this change?
97-
* **Reviewer**: One or more code owners for the impacted components should review the change. Technical review can be delegated by a code owner or otherwise requested as deemed appropriate or useful.
98-
```
99-
100-
> [!TIP]
101-
> The PR description can be generated using the [release_branch.md](https://github.com/apple/swift-syntax/blob/main/.github/PULL_REQUEST_TEMPLATE/release_branch.md) [pull request template](https://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/about-issue-and-pull-request-templates). To use this template when creating a PR, you need to add the query parameter:
102-
> ```
103-
> ?expand=1&template=release_branch.md
104-
> ```
105-
> to the PR URL, as described in the [GitHub documentation on using query parameters to create a pull request](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/using-query-parameters-to-create-a-pull-request).
106-
> This is necessary because GitHub does not currently provide a UI to choose a PR template.
91+
1. [This][form] should be filled out in the description of the PR.
92+
To use this template when creating a PR, append the `template=release.md`
93+
query parameter to the current URL and refresh.
94+
For example:
95+
```diff
96+
-https://github.com/swiftlang/swift-syntax/compare/main...my-branch?quick_pull=1
97+
+https://github.com/swiftlang/swift-syntax/compare/main...my-branch?quick_pull=1&template=release.md
98+
```
10799

108100
All changes going into a release branch must go through pull requests that are approved and merged by the corresponding release manager.
109101

102+
[form]: https://github.com/swiftlang/.github/blob/main/PULL_REQUEST_TEMPLATE/release.md?plain=1
103+
110104
## Review and CI Testing
111105

112106
After you opened your PR, a maintainer will review it and test your changes in CI (*Continuous Integration*) by adding a `@swift-ci Please test` comment on the pull request. Once your PR is approved and CI has passed, the maintainer will merge your pull request.

CodeGeneration/Package.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ let package = Package(
1212
.executable(name: "generate-swift-syntax", targets: ["generate-swift-syntax"])
1313
],
1414
dependencies: [
15-
.package(url: "https://github.com/apple/swift-syntax", from: "510.0.0"),
15+
.package(url: "https://github.com/swiftlang/swift-syntax", from: "510.0.0"),
1616
.package(url: "https://github.com/apple/swift-argument-parser.git", from: "1.2.2"),
1717
],
1818
targets: [

CodeGeneration/Sources/SyntaxSupport/Child.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ public class Child {
197197
The old string-based implementation returned "Token" to ensure that `tokenKind` is not nil
198198
and that `isToken` computed-property will return true, but the value "Token" had never been
199199
used in other cases. We should try to remove this computed property altogether in the issue:
200-
https://github.com/apple/swift-syntax/issues/2010
200+
https://github.com/swiftlang/swift-syntax/issues/2010
201201
*/
202202
return .unknown
203203
}

0 commit comments

Comments
 (0)