Skip to content
Open
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
24 changes: 0 additions & 24 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ let package = Package(
.target(
name: "SwiftDocC",
dependencies: [
.target(name: "DocCCommon"),
.product(name: "Markdown", package: "swift-markdown"),
.product(name: "SymbolKit", package: "swift-docc-symbolkit"),
.product(name: "CLMDB", package: "swift-lmdb"),
Expand All @@ -56,7 +55,6 @@ let package = Package(
name: "SwiftDocCTests",
dependencies: [
.target(name: "SwiftDocC"),
.target(name: "DocCCommon"),
.target(name: "SwiftDocCTestUtilities"),
],
resources: [
Expand All @@ -72,7 +70,6 @@ let package = Package(
name: "SwiftDocCUtilities",
dependencies: [
.target(name: "SwiftDocC"),
.target(name: "DocCCommon"),
.product(name: "NIOHTTP1", package: "swift-nio", condition: .when(platforms: [.macOS, .iOS, .linux, .android])),
.product(name: "ArgumentParser", package: "swift-argument-parser")
],
Expand All @@ -84,7 +81,6 @@ let package = Package(
dependencies: [
.target(name: "SwiftDocCUtilities"),
.target(name: "SwiftDocC"),
.target(name: "DocCCommon"),
.target(name: "SwiftDocCTestUtilities"),
],
resources: [
Expand All @@ -99,7 +95,6 @@ let package = Package(
name: "SwiftDocCTestUtilities",
dependencies: [
.target(name: "SwiftDocC"),
.target(name: "DocCCommon"),
.product(name: "SymbolKit", package: "swift-docc-symbolkit"),
],
swiftSettings: swiftSettings
Expand All @@ -114,25 +109,6 @@ let package = Package(
exclude: ["CMakeLists.txt"],
swiftSettings: swiftSettings
),

// A few common types and core functionality that's useable by all other targets.
.target(
name: "DocCCommon",
dependencies: [
// This target shouldn't have any local dependencies so that all other targets can depend on it.
// We can add dependencies on SymbolKit and Markdown here but they're not needed yet.
],
swiftSettings: [.swiftLanguageMode(.v6)]
),

.testTarget(
name: "DocCCommonTests",
dependencies: [
.target(name: "DocCCommon"),
.target(name: "SwiftDocCTestUtilities"),
],
swiftSettings: [.swiftLanguageMode(.v6)]
),

// Test app for SwiftDocCUtilities
.executableTarget(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
/*
This source file is part of the Swift.org open source project

Copyright (c) 2021-2025 Apple Inc. and the Swift project authors
Copyright (c) 2021-2023 Apple Inc. and the Swift project authors
Licensed under Apache License v2.0 with Runtime Library Exception

See https://swift.org/LICENSE.txt for license information
See https://swift.org/CONTRIBUTORS.txt for Swift project authors
*/

/// A programming language.
public struct SourceLanguage: Hashable, Codable, Comparable, Sendable {
public struct SourceLanguage: Hashable, Codable, Comparable {
/// The display name of the programming language.
public var name: String
/// A globally unique identifier for the language.
Expand Down Expand Up @@ -132,7 +132,7 @@ public struct SourceLanguage: Hashable, Codable, Comparable, Sendable {
public static let metal = SourceLanguage(name: "Metal", id: "metal")

/// The list of programming languages that are known to DocC.
public static let knownLanguages: [SourceLanguage] = [.swift, .objectiveC, .javaScript, .data, .metal]
public static var knownLanguages: [SourceLanguage] = [.swift, .objectiveC, .javaScript, .data, .metal]

enum CodingKeys: CodingKey {
case name
Expand All @@ -157,9 +157,7 @@ public struct SourceLanguage: Hashable, Codable, Comparable, Sendable {

try container.encode(self.name, forKey: SourceLanguage.CodingKeys.name)
try container.encode(self.id, forKey: SourceLanguage.CodingKeys.id)
if !self.idAliases.isEmpty {
try container.encode(self.idAliases, forKey: SourceLanguage.CodingKeys.idAliases)
}
try container.encodeIfNotEmpty(self.idAliases, forKey: SourceLanguage.CodingKeys.idAliases)
try container.encode(self.linkDisambiguationID, forKey: SourceLanguage.CodingKeys.linkDisambiguationID)
}

Expand Down
13 changes: 0 additions & 13 deletions Sources/SwiftDocC/Utility/CommonTypeExports.swift

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
See https://swift.org/CONTRIBUTORS.txt for Swift project authors
*/

import DocCCommon
@testable import SwiftDocC
import XCTest

class SourceLanguageTests: XCTestCase {
Expand Down