Skip to content

Commit

Permalink
Merge pull request #296 from tayloraswift/publicize-unidoc-build
Browse files Browse the repository at this point in the history
publicize unidoc-build
  • Loading branch information
tayloraswift authored Jul 2, 2024
2 parents a026021 + f48c289 commit 7fb4164
Show file tree
Hide file tree
Showing 31 changed files with 409 additions and 643 deletions.
23 changes: 16 additions & 7 deletions Package.resolved
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"originHash" : "99ef0d4c9db5561696172060b15fe663b4b56d448bd190a6e0b4f464d4359377",
"originHash" : "f6af9095b75964aee9fd27e7a2e21c4a0bd2cca32c73d4eda71359fa56065992",
"pins" : [
{
"identity" : "indexstore-db",
Expand All @@ -10,6 +10,15 @@
"revision" : "da980455bf2bbbffeffe1946dfc3665eb03c3bcd"
}
},
{
"identity" : "swift-argument-parser",
"kind" : "remoteSourceControl",
"location" : "https://github.com/apple/swift-argument-parser",
"state" : {
"revision" : "0fbc8848e389af3bb55c182bc19ca9d5dc2f255b",
"version" : "1.4.0"
}
},
{
"identity" : "swift-atomics",
"kind" : "remoteSourceControl",
Expand Down Expand Up @@ -60,8 +69,8 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/tayloraswift/swift-hash",
"state" : {
"revision" : "7798c344afd5a96b689fa9904ad52242a85b5068",
"version" : "0.6.0"
"revision" : "7a3fbb75ec4c88421796faaf0b47f16ffc21b348",
"version" : "0.6.2"
}
},
{
Expand Down Expand Up @@ -96,17 +105,17 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/apple/swift-nio",
"state" : {
"revision" : "e5a216ba89deba84356bad9d4c2eab99071c745b",
"version" : "2.67.0"
"revision" : "fc79798d5a150d61361a27ce0c51169b889e23de",
"version" : "2.68.0"
}
},
{
"identity" : "swift-nio-http2",
"kind" : "remoteSourceControl",
"location" : "https://github.com/apple/swift-nio-http2",
"state" : {
"revision" : "8d8eb609929aee75336a0a3d2417280786265868",
"version" : "1.32.0"
"revision" : "a0224f3d20438635dd59c9fcc593520d80d131d0",
"version" : "1.33.0"
}
},
{
Expand Down
24 changes: 16 additions & 8 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ let package:Package = .init(
.library(name: "UnidocAPI", targets: ["UnidocAPI"]),
.library(name: "UnidocAssets", targets: ["UnidocAssets"]),
.library(name: "UnidocAssets_System", targets: ["UnidocAssets_System"]),
.library(name: "UnidocClient", targets: ["UnidocClient"]),
.library(name: "UnidocDB", targets: ["UnidocDB"]),
.library(name: "UnidocLinker", targets: ["UnidocLinker"]),
.library(name: "UnidocQueries", targets: ["UnidocQueries"]),
Expand Down Expand Up @@ -104,18 +105,20 @@ let package:Package = .init(
.package(url: "https://github.com/tayloraswift/swift-png", .upToNextMinor(
from: "4.4.3")),

.package(url: "https://github.com/apple/swift-argument-parser", .upToNextMinor(
from: "1.4.0")),
.package(url: "https://github.com/apple/swift-atomics", .upToNextMinor(
from: "1.2.0")),
.package(url: "https://github.com/apple/swift-collections", .upToNextMinor(
from: "1.1.1")),

.package(url: "https://github.com/apple/swift-nio",
from: "2.67.0"),
from: "2.68.0"),
.package(url: "https://github.com/apple/swift-nio-ssl",
from: "2.27.0"),

.package(url: "https://github.com/apple/swift-nio-http2", .upToNextMinor(
from: "1.32.0")),
from: "1.33.0")),
.package(url: "https://github.com/apple/swift-markdown", .upToNextMinor(
from: "0.4.0")),
.package(url: "https://github.com/apple/swift-system", .upToNextMinor(
Expand Down Expand Up @@ -146,11 +149,8 @@ let package:Package = .init(

.executableTarget(name: "unidoc-build",
dependencies: [
.target(name: "ArgumentParsing"),
.target(name: "HTTPClient"),
.target(name: "SymbolGraphBuilder"),
.target(name: "UnidocRecords_LZ77"),
.target(name: "UnidocRecords"),
.product(name: "ArgumentParser", package: "swift-argument-parser"),
.target(name: "UnidocClient"),
]),

.executableTarget(name: "unidoc-preview",
Expand Down Expand Up @@ -390,7 +390,7 @@ let package:Package = .init(

.target(name: "SymbolGraphBuilder",
dependencies: [
.target(name: "ArgumentParsing"),
.product(name: "ArgumentParser", package: "swift-argument-parser"),
.target(name: "MarkdownPluginSwift"),
.target(name: "MarkdownPluginSwift_IndexStoreDB"),
.target(name: "PackageMetadata"),
Expand Down Expand Up @@ -497,6 +497,14 @@ let package:Package = .init(
.target(name: "UnidocAssets"),
]),

.target(name: "UnidocClient",
dependencies: [
.target(name: "HTTPClient"),
.target(name: "SymbolGraphBuilder"),
.target(name: "UnidocRecords_LZ77"),
.target(name: "UnidocRecords"),
]),

.target(name: "UnidocDB",
dependencies: [
.target(name: "GitHubAPI"),
Expand Down
25 changes: 25 additions & 0 deletions Sources/GitHubAPI/GitHub.InstallationAccessToken.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
extension GitHub
{
@frozen public
struct InstallationAccessToken:Sendable
{
public
let value:String

@inlinable public
init(value:String)
{
self.value = value
}
}
}
extension GitHub.InstallationAccessToken:ExpressibleByStringLiteral
{
@inlinable public
init(stringLiteral:String) { self.init(value: stringLiteral) }
}
extension GitHub.InstallationAccessToken:CustomStringConvertible
{
@inlinable public
var description:String { self.value }
}
27 changes: 24 additions & 3 deletions Sources/SymbolGraphBuilder/Builds/SSGC.ProjectType.swift
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import ArgumentParser

extension SSGC
{
@frozen public
enum ProjectType:String, Equatable, Sendable
enum ProjectType:CaseIterable, Equatable, Sendable
{
case package
case book
Expand All @@ -10,10 +12,29 @@ extension SSGC
extension SSGC.ProjectType:CustomStringConvertible
{
@inlinable public
var description:String { self.rawValue }
var description:String
{
switch self
{
case .package: "package"
case .book: "book"
}

}
}
extension SSGC.ProjectType:LosslessStringConvertible
{
@inlinable public
init?(_ description:String) { self.init(rawValue: description) }
init?(_ description:String)
{
switch description
{
case "package": self = .package
case "book": self = .book
default: return nil
}
}
}
extension SSGC.ProjectType:ExpressibleByArgument
{
}
8 changes: 8 additions & 0 deletions Sources/SymbolGraphBuilder/FilePath (ext).swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import ArgumentParser
import System

extension FilePath:ExpressibleByArgument
{
@inlinable public
init?(argument:String) { self.init(argument) }
}
8 changes: 8 additions & 0 deletions Sources/SymbolGraphBuilder/FilePath.Directory (ext).swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import ArgumentParser
import System

extension FilePath.Directory:ExpressibleByArgument
{
@inlinable public
init?(argument:String) { self.init(argument) }
}
22 changes: 0 additions & 22 deletions Sources/SymbolGraphBuilder/SSGC (ext).swift

This file was deleted.

74 changes: 0 additions & 74 deletions Sources/SymbolGraphBuilder/SSGC.Main.Option.swift

This file was deleted.

Loading

0 comments on commit 7fb4164

Please sign in to comment.