You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Changelog.md
+5-1Lines changed: 5 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -4,6 +4,10 @@ Note: This is in reverse chronological order, so newer entries are added to the
4
4
5
5
## `main`
6
6
7
+
* With the introduction of the new `SwiftParser`, the existing `SwiftSyntaxParser` is deprecated and will be removed. The module and it's API surface still exists as a thin wrapper over `SwiftParser`, which no longer requires a matching toolchain or `_InternalSwiftSyntaxParser` shared library to work.
8
+
9
+
## Swift 5.6
10
+
7
11
* To clarify that the edits passed to `IncrementalParseTransition` are applied concurrently, introduce a new `ConcurrentEdit` type that provides the guarantee and allows translation of sequentially applied edits to the expected concurrent form.
8
12
* The `SwiftSyntaxParser` type and a few related types now live in their own module (also named `SwiftSyntaxParser`). This allows using `SwiftSyntax` for code generation purposes without having a compatible `_InternalSwiftSyntaxParser.dylib` around.
9
13
@@ -86,7 +90,7 @@ Note: This is in reverse chronological order, so newer entries are added to the
6. Apply the following diff to `Package.swift`, adjusting `<release tag>` and `<checksum>`
19
-
```diff
20
-
diff --git a/Package.swift b/Package.swift
21
-
index 4c6db83a..7a953fc6 100644
22
-
--- a/Package.swift
23
-
+++ b/Package.swift
24
-
@@ -23,6 +23,21 @@ if ProcessInfo.processInfo.environment["SWIFT_BUILD_SCRIPT_ENVIRONMENT"] != nil
25
-
swiftSyntaxSwiftSettings = []
26
-
}
27
-
28
-
+// Include the parser library as a binary dependency if both the host and the target are macOS.
29
-
+// - We need to require that the host is macOS (checked by `#if os(macOS)`) because package resolve will download and unzip the referenced framework, which requires `unzip` to be installed. Only macOS guarantees that `unzip` is installed, the Swift Docker images don’t have unzip installed, so package resolve would fail.
30
-
+// - We need to require that the target is macOS (checked by `.when`) because binary dependencies are only supported by SwiftPM on macOS.
Tags will be created forevery nightly buildin the form of `swift-DEVELOPMENT-SNAPSHOT-<DATE>`. The revision field
34
-
should be specified with the intended tag.
35
-
36
-
Different from building SwiftSyntax from source, declaring SwiftSyntax as a SwiftPM dependency doesn't require
37
-
the Swift compiler source because we always push gyb-generated files to a tag.
38
-
39
-
### Embedding SwiftSyntax in an Application
40
-
41
-
SwiftSyntax depends on the `lib_InternalSwiftSyntaxParser.dylib/.so` library which provides a C interface to the underlying Swift C++ parser. When you do `swift build` SwiftSyntax links and uses the library included in the Swift toolchain. If you are building an application make sure to embed `_InternalSwiftSyntaxParser` as part of your application's libraries.
42
-
43
-
You can either copy `lib_InternalSwiftSyntaxParser.dylib/.so` directly from the toolchain or even build it yourself from the [Swift repository](https://github.com/apple/swift), as long as you are matching the same tags or branches in both the SwiftSyntax and Swift repositories. To build it for the host os (macOS/linux) use the following steps:
then you will need to build a newer compiler from source or download a more recent development snapshot from https://swift.org and pass its path to the script using the `--swiftc` flag:
You need to build `lib_InternalSwiftSyntaxParser.dylib` yourself, you cannot copy it from the toolchain. Follow the instructions above and change the invocation of `build-tooling-libs` accordingly:
0 commit comments