diff --git a/.github/workflows/Docs.yml b/.github/workflows/Docs.yml index 771a7e415..dae46852a 100644 --- a/.github/workflows/Docs.yml +++ b/.github/workflows/Docs.yml @@ -19,8 +19,8 @@ jobs: - name: Install Swift uses: tayloraswift/swift-install-action@master with: - swift-prefix: "swift-6.1.2-release/ubuntu2404/swift-6.1.2-RELEASE" - swift-id: "swift-6.1.2-RELEASE-ubuntu24.04" + swift-prefix: "swift-6.2-release/ubuntu2404/swift-6.2-RELEASE" + swift-id: "swift-6.2-RELEASE-ubuntu24.04" # This installs an older version of Unidoc, not the one we are testing. # We use `--static-swift-stdlib` so it doesn’t matter if the Unidoc binary was @@ -33,9 +33,9 @@ jobs: - name: Build documentation run: | - unidoc compile -I .. \ + unidoc build \ --ci fail-on-errors \ - --package-name swift-unidoc \ + --project-path . \ --swift-toolchain $SWIFT_INSTALLATION macos: @@ -53,6 +53,6 @@ jobs: - name: Build documentation run: | - unidoc compile -I .. \ + unidoc build \ --ci fail-on-errors \ - --package-name swift-unidoc + --project-path . diff --git a/.github/workflows/Test.yml b/.github/workflows/Test.yml index 6ab151ae9..2c4db939d 100644 --- a/.github/workflows/Test.yml +++ b/.github/workflows/Test.yml @@ -34,7 +34,7 @@ jobs: -v $PWD:/swift/swift-unidoc \ -w /swift/swift-unidoc \ -e SWIFT_INSTALLATION=/usr \ - swift:6.1.2-noble \ + swift:6.2-noble \ /bin/bash Scripts/Linux/TestAll linux: @@ -47,8 +47,8 @@ jobs: - name: Install Swift uses: tayloraswift/swift-install-action@master with: - swift-prefix: "swift-6.1.2-release/ubuntu2404/swift-6.1.2-RELEASE" - swift-id: "swift-6.1.2-RELEASE-ubuntu24.04" + swift-prefix: "swift-6.2-release/ubuntu2404/swift-6.2-RELEASE" + swift-id: "swift-6.2-RELEASE-ubuntu24.04" - name: Checkout repository uses: actions/checkout@v3 diff --git a/.gitignore b/.gitignore index 89eaf20f7..805c20149 100644 --- a/.gitignore +++ b/.gitignore @@ -4,8 +4,9 @@ .ssgc .testing .unidoc -.vscode -.DS_Store + +/.vscode/launch.json +/.vscode/settings.json /*.tar.gz /unidoc diff --git a/.vscode/tasks.json b/.vscode/tasks.json new file mode 100644 index 000000000..984bf3e23 --- /dev/null +++ b/.vscode/tasks.json @@ -0,0 +1,159 @@ +{ + "version": "2.0.0", + "tasks": [ + { + "type": "swift", + "args": [ + "build", + "-c", + "debug", + "--build-tests", + "--explicit-target-dependency-import-check=error", + "--destination", "Scripts/Linux/x86_64/x86_64.json" + ], + "env": { + "UNIDOC_ENABLE_INDEXSTORE": "1" + }, + "disableTaskQueue": true, + "problemMatcher": [ + "$swiftc" + ], + "group": "build", + "label": "swift: Build All", + "detail": "swift build" + }, + { + "type": "swift", + "args": [ + "build", + "-c", + "release", + "--build-tests", + "--explicit-target-dependency-import-check=error", + "--destination", "Scripts/Linux/x86_64/x86_64.json" + ], + "env": { + "UNIDOC_ENABLE_INDEXSTORE": "1" + }, + "disableTaskQueue": true, + "problemMatcher": [ + "$swiftc" + ], + "group": "build", + "label": "swift: Build All (release)", + "detail": "swift build -c release" + }, + { + "type": "swift", + "args": [ + "test", + "-c", + "release", + "--skip-build", + "--skip", + "SymbolGraphValidationTests", + "--no-parallel", + "--explicit-target-dependency-import-check=error", + "--destination", "Scripts/Linux/x86_64/x86_64.json" + ], + "env": { + "UNIDOC_ENABLE_INDEXSTORE": "1" + }, + "disableTaskQueue": true, + "problemMatcher": [ + "$swiftc" + ], + "group": "build", + "label": "swift: Test All (release)", + "detail": "swift test -c release" + }, + { + "type": "swift", + "args": [ + "test", + "--skip-build", + "--filter", + "UCFTests", + "--no-parallel", + "--explicit-target-dependency-import-check=error", + "--destination", "Scripts/Linux/x86_64/x86_64.json" + ], + "env": { + "UNIDOC_ENABLE_INDEXSTORE": "1" + }, + "disableTaskQueue": true, + "problemMatcher": [ + "$swiftc" + ], + "group": "build", + "label": "swift: Test UCF", + "detail": "swift test" + }, + { + "type": "swift", + "args": [ + "test", + "--skip-build", + "--filter", + "MarkdownPluginSwiftTests", + "--no-parallel", + "--explicit-target-dependency-import-check=error", + "--destination", "Scripts/Linux/x86_64/x86_64.json" + ], + "env": { + "UNIDOC_ENABLE_INDEXSTORE": "1" + }, + "disableTaskQueue": true, + "problemMatcher": [ + "$swiftc" + ], + "group": "build", + "label": "swift: Test MarkdownPluginSwift", + "detail": "swift test" + }, + { + "type": "swift", + "args": [ + "test", + "--skip-build", + "--filter", + "MarkdownRenderingTests", + "--no-parallel", + "--explicit-target-dependency-import-check=error", + "--destination", "Scripts/Linux/x86_64/x86_64.json" + ], + "env": { + "UNIDOC_ENABLE_INDEXSTORE": "1" + }, + "disableTaskQueue": true, + "problemMatcher": [ + "$swiftc" + ], + "group": "build", + "label": "swift: Test MarkdownRendering", + "detail": "swift test" + }, + { + "type": "swift", + "args": [ + "test", + "--skip-build", + "--filter", + "SymbolGraphLinkerTests", + "--no-parallel", + "--explicit-target-dependency-import-check=error", + "--destination", "Scripts/Linux/x86_64/x86_64.json" + ], + "env": { + "UNIDOC_ENABLE_INDEXSTORE": "1" + }, + "disableTaskQueue": true, + "problemMatcher": [ + "$swiftc" + ], + "group": "build", + "label": "swift: Test SymbolGraphLinkerTests", + "detail": "swift test" + }, + ] +} diff --git a/Package.resolved b/Package.resolved index 1368a0d1f..1005e983e 100644 --- a/Package.resolved +++ b/Package.resolved @@ -1,5 +1,5 @@ { - "originHash" : "92f415f02e2054026c8b7ded15be9d35f8b4e00ffa1d788df4e8d5d31922790f", + "originHash" : "760790d81393f446c02f0b6035f257800653765a8ee15d9cb5a120b2874cc0aa", "pins" : [ { "identity" : "indexstore-db", @@ -42,8 +42,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/apple/swift-cmark.git", "state" : { - "revision" : "b022b08312decdc46585e0b3440d97f6f22ef703", - "version" : "0.6.0" + "revision" : "b97d09472e847a416629f026eceae0e2afcfad65", + "version" : "0.7.0" } }, { @@ -51,8 +51,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/apple/swift-collections", "state" : { - "revision" : "671108c96644956dddcd89dd59c203dcdb36cec7", - "version" : "1.1.4" + "revision" : "c11818f3cae0780656baa430b49e7f163f08dffd", + "version" : "1.1.6" } }, { @@ -60,8 +60,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/tayloraswift/swift-dom", "state" : { - "revision" : "9920611b7ba050912bf6e7f7083067aa14816bc0", - "version" : "1.1.2" + "revision" : "a7a3aba21863fca2fcb3426cfae0b44a03c7558c", + "version" : "1.2.0" } }, { @@ -141,8 +141,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/apple/swift-nio", "state" : { - "revision" : "34d486b01cd891297ac615e40d5999536a1e138d", - "version" : "2.83.0" + "revision" : "a18bddb0acf7a40d982b2f128ce73ce4ee31f352", + "version" : "2.86.2" } }, { @@ -159,8 +159,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/apple/swift-nio-ssl", "state" : { - "revision" : "36b48956eb6c0569215dc15a587b491d2bb36122", - "version" : "2.32.0" + "revision" : "b2b043a8810ab6d51b3ff4df17f057d87ef1ec7c", + "version" : "2.34.1" } }, { @@ -177,8 +177,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/apple/swift-syntax", "state" : { - "revision" : "0687f71944021d616d34d922343dcef086855920", - "version" : "600.0.1" + "revision" : "4799286537280063c85a32f09884cfbca301b1a1", + "version" : "602.0.0" } }, { @@ -186,8 +186,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/apple/swift-system", "state" : { - "revision" : "61e4ca4b81b9e09e2ec863b00c340eb13497dac6", - "version" : "1.5.0" + "revision" : "395a77f0aa927f0ff73941d7ac35f2b46d47c9db", + "version" : "1.6.3" } }, { diff --git a/Package.swift b/Package.swift index 134f35b9e..2f27612f8 100644 --- a/Package.swift +++ b/Package.swift @@ -1,4 +1,4 @@ -// swift-tools-version:6.0 +// swift-tools-version:6.2 import class Foundation.ProcessInfo import PackageDescription import CompilerPluginSupport @@ -77,7 +77,7 @@ let package:Package = .init( .package(url: "https://github.com/tayloraswift/swift-bson", .upToNextMinor( from: "1.0.0")), .package(url: "https://github.com/tayloraswift/swift-dom", .upToNextMinor( - from: "1.1.0")), + from: "1.2.0")), .package(url: "https://github.com/tayloraswift/swift-grammar", .upToNextMinor( from: "0.5.0")), .package(url: "https://github.com/tayloraswift/swift-hash", .upToNextMinor( @@ -113,7 +113,7 @@ let package:Package = .init( .package(url: "https://github.com/apple/swift-markdown", .upToNextMinor( from: "0.4.0")), .package(url: "https://github.com/apple/swift-syntax", - from: "600.0.1"), + from: "602.0.0"), ], targets: [ .executableTarget(name: "ssgc", @@ -733,6 +733,9 @@ for target:PackageDescription.Target in package.targets settings.append(.enableUpcomingFeature("ExistentialAny")) settings.append(.enableExperimentalFeature("StrictConcurrency")) + settings.append(.treatWarning("ExistentialAny", as: .error)) + settings.append(.treatWarning("MutableGlobalVariable", as: .error)) + settings.append(.define("DEBUG", .when(configuration: .debug))) $0 = settings diff --git a/Sources/HTTPClient/HTTP2/HTTP.Client2.InterfaceHandler.swift b/Sources/HTTPClient/HTTP2/HTTP.Client2.InterfaceHandler.swift index f5bfcaf22..876d823b6 100644 --- a/Sources/HTTPClient/HTTP2/HTTP.Client2.InterfaceHandler.swift +++ b/Sources/HTTPClient/HTTP2/HTTP.Client2.InterfaceHandler.swift @@ -2,10 +2,6 @@ import NIOCore import NIOHPACK import NIOHTTP2 -extension ChannelHandlerContext:@retroactive @unchecked Sendable -{ -} - extension HTTP.Client2 { /// An HTTP/2 handler whose sole purpose is to initiate HTTP/2 streams in parallel by diff --git a/Sources/MarkdownPluginSwift/Signatures/SignatureSyntax.Autographer.swift b/Sources/MarkdownPluginSwift/Signatures/SignatureSyntax.Autographer.swift index d271314ed..1b4d2d521 100644 --- a/Sources/MarkdownPluginSwift/Signatures/SignatureSyntax.Autographer.swift +++ b/Sources/MarkdownPluginSwift/Signatures/SignatureSyntax.Autographer.swift @@ -31,6 +31,18 @@ extension SignatureSyntax.Autographer } } + mutating + func encode(type:GenericArgumentSyntax.Argument, stem:Bool = false) + { + switch type + { + case .type(let type): + self.encode(type: type, stem: stem) + + case .expr: + self.autograph.append("_") + } + } mutating func encode(type:TypeSyntax, stem:Bool = false) { @@ -191,7 +203,7 @@ extension SignatureSyntax.Autographer { if let arguments:GenericArgumentListSyntax, resugar { - let arguments:[TypeSyntax] = arguments.map(\.argument) + let arguments:[GenericArgumentSyntax.Argument] = arguments.map(\.argument) let position:Int = name.positionAfterSkippingLeadingTrivia.utf8Offset if self.sugarMap.arrays.contains(position), arguments.count == 1 diff --git a/Sources/SourceDiagnostics/Contexts/DiagnosticContext.swift b/Sources/SourceDiagnostics/Contexts/DiagnosticContext.swift index 8962aa541..f156cc045 100644 --- a/Sources/SourceDiagnostics/Contexts/DiagnosticContext.swift +++ b/Sources/SourceDiagnostics/Contexts/DiagnosticContext.swift @@ -1,7 +1,7 @@ import Sources @frozen @usableFromInline -struct DiagnosticContext +struct DiagnosticContext:SendableMetatype { @usableFromInline let location:SourceLocation? diff --git a/Sources/Testing_/TestBattery.swift b/Sources/Testing_/TestBattery.swift index a02bf5f75..0c6ca7c72 100644 --- a/Sources/Testing_/TestBattery.swift +++ b/Sources/Testing_/TestBattery.swift @@ -1,5 +1,5 @@ public -protocol TestBattery +protocol TestBattery:SendableMetatype { static var name:String { get } diff --git a/Sources/UnidocQueryTests/LinkResolution.TestCase.swift b/Sources/UnidocQueryTests/LinkResolution.TestCase.swift index b188d72f8..f10a8f519 100644 --- a/Sources/UnidocQueryTests/LinkResolution.TestCase.swift +++ b/Sources/UnidocQueryTests/LinkResolution.TestCase.swift @@ -88,7 +88,6 @@ extension LinkResolution.TestCase fragmentLinks.insert(display) case .bare(line: _, let id): - let id:Unidoc.Scalar = try #require(id) let full:String = try #require(loadable[id]) internalLinks[full, default: []].append("__attribute") diff --git a/Sources/UnidocQueryTests/PackageQueries.swift b/Sources/UnidocQueryTests/PackageQueries.swift index 53644d7f9..5158c95a9 100644 --- a/Sources/UnidocQueryTests/PackageQueries.swift +++ b/Sources/UnidocQueryTests/PackageQueries.swift @@ -97,8 +97,6 @@ struct PackageQueries:Unidoc.TestBattery let index:Unidoc.TextResourceOutput = try #require(try await db.query(with: query)) - #expect(index.hash != nil) - switch index.text { case .inline(.utf8(let utf8)): diff --git a/Sources/_AsyncChannel/Channels/ChannelStateMachine.swift b/Sources/_AsyncChannel/Channels/ChannelStateMachine.swift index 2c8b1b920..920f60561 100644 --- a/Sources/_AsyncChannel/Channels/ChannelStateMachine.swift +++ b/Sources/_AsyncChannel/Channels/ChannelStateMachine.swift @@ -10,9 +10,6 @@ //===----------------------------------------------------------------------===// import OrderedCollections -// NOTE: this is only marked as unchecked since the swift-collections tag is before auditing for Sendable -extension OrderedSet: @unchecked Sendable where Element: Sendable { } - struct ChannelStateMachine: Sendable { private struct SuspendedProducer: Hashable, Sendable { let id: UInt64