diff --git a/Examples/Package.swift b/Examples/Package.swift
index f10a7c4a..821d3939 100644
--- a/Examples/Package.swift
+++ b/Examples/Package.swift
@@ -62,7 +62,7 @@ let package = Package(
// The following targets are added only if the OS is macOS. This is because Swift macros are currently
// not available on other platforms. As a result, we're guarding these targets with `#if os(macOS)`
// to ensure that they are only included in the package when building on a macOS system.
-#if os(macOS)
+#if os(macOS) || os(Linux)
package.targets.append(
contentsOf: [
.target(
in the Examples directory run MacroExamplesPlayground
$ cd Examples
$ ~/swift-DEVELOPMENT-SNAPSHOT-2023-09-01-a-ubuntu20.04-aarch64/usr/bin/swift run MacroExamplesPlayground
and succeeded
(Unfortunately 5.9 snapshots haven't got the macro patches at this moment)
swift-frontend: /home/build-user/swift/lib/Serialization/Serialization.cpp:1669: void swift::serialization::Serializer::writeLocalNormalProtocolConformance(swift::NormalProtocolConformance *): Assertion `conformance->isComplete() || allowCompilerErrors()' failed.
Please submit a bug report (https://swift.org/contributing/#reporting-bugs) and include the crash backtrace.
Stack dump:
0. Program arguments: /home/foo/usr/bin/swift-frontend -frontend -emit-module -experimental-skip-non-inlinable-function-bodies-without-types /home/foo/swift-syntax/Examples/Sources/MacroExamples/Playground/main.swift -target x86_64-unknown-linux-gnu -disable-objc-interop -I /home/foo/swift-syntax/Examples/.build/x86_64-unknown-linux-gnu/debug -color-diagnostics -enable-testing -g -module-cache-path /home/foo/swift-syntax/Examples/.build/x86_64-unknown-linux-gnu/debug/ModuleCache -swift-version 5 -Onone -D SWIFT_PACKAGE -D DEBUG -new-driver-path /home/foo/usr/bin/swift-driver -entry-point-function-name MacroExamplesPlayground_main -load-plugin-executable /home/foo/swift-syntax/Examples/.build/x86_64-unknown-linux-gnu/debug/MacroExamplesImplementation#MacroExamplesImplementation -empty-abi-descriptor -resource-dir /home/foo/usr/lib/swift -enable-anonymous-context-mangled-names -Xcc -fPIC -module-name MacroExamplesPlayground -package-name examples -plugin-path /home/foo/usr/lib/swift/host/plugins -plugin-path /home/foo/usr/local/lib/swift/host/plugins -emit-module-doc-path /home/foo/swift-syntax/Examples/.build/x86_64-unknown-linux-gnu/debug/MacroExamplesPlayground.swiftdoc -emit-module-source-info-path /home/foo/swift-syntax/Examples/.build/x86_64-unknown-linux-gnu/debug/MacroExamplesPlayground.swiftsourceinfo -emit-dependencies-path /home/foo/swift-syntax/Examples/.build/x86_64-unknown-linux-gnu/debug/MacroExamplesPlayground.build/MacroExamplesPlayground.emit-module.d -o /home/foo/swift-syntax/Examples/.build/x86_64-unknown-linux-gnu/debug/MacroExamplesPlayground.swiftmodule
1. Swift version 5.9-dev (LLVM 97263007aaf8c2b, Swift b850c17a6db76c2)
2. Compiling with the current language version
3. While evaluating request ExecuteSILPipelineRequest(Run pipelines { Non-Diagnostic Mandatory Optimizations, Serialization, Rest of Onone } on SIL for MacroExamplesPlayground)
4. While running pass #1236 SILModuleTransform "SerializeSILPass".
5. While serializing protocol conformance to 'Observable' (in module 'MacroExamplesInterface') for type 'Dog' (declared at [/home/foo/swift-syntax/Examples/Sources/MacroExamples/Playground/main.swift:90:7 - line:101:1] RangeText="class Dog {
var name: String?
var treat: Treat?
var isHappy: Bool = true
init() {}
func bark() {
print("bork bork")
}
")
Stack dump without symbol names
Let me know if you see the same, or if that doesn't matter.
Edit: one thing I just noticed is that this Macro target was not there in the 5.9 branch of swift-syntax, so maybe the issue is because I'm trying to build this Macro example from latest swift-syntax trunk with that Swift 5.9.0 build?
Second edit: I just tried the same example with the latest Sep. 1 5.9 snapshot build and cannot reproduce the crash, so that 5.9.0 crash must not be because of the Swift version. Maybe some other commit on the release/5.9 branch fixed the issue, though I don't see what it could be, or that 5.9.0 CI build I linked above is just broken for some spurious reason. @rintaro, you may want to run the final 5.9.0 builds through this test to make sure.
This looks exactly like the crash I fixed here, which landed in the 5.9.0 branch after the toolchain you mention was built. That fix has been on main and release/5.9 for a while longer, we just pulled it into release/5.9.0 fairly late.
great job to everyone who worked on this! i have been wanting to try out the macros feature for a while now and iām glad this made it into the 5.9 release.
Thanks for the explanation. I just wanted to make sure whatever fix made it work for the 5.9 branch was also pulled into the separate 5.9.0 branch, sounds like it has.