Skip to content

Commit 87a9fd0

Browse files
committed
don’t name library types 'Main' if we can help it
1 parent 6591272 commit 87a9fd0

File tree

7 files changed

+19
-22
lines changed

7 files changed

+19
-22
lines changed

Sources/SymbolGraphBuilder/SSGC.Main.swift renamed to Sources/SymbolGraphBuilder/SSGC.Compile.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import System
77
extension SSGC
88
{
99
public
10-
struct Main:Decodable
10+
struct Compile:Decodable
1111
{
1212
@Option(
1313
name: [.customLong("workspace-name"), .customShort("w")],
@@ -19,7 +19,7 @@ extension SSGC
1919

2020
@Option(
2121
name: [.customLong("workspace"), .customShort("W")],
22-
help: "A path to the workspace directory — SSGC will assume this workspace exists.",
22+
help: "A path to the workspace directory — SSGC will assume this workspace exists",
2323
completion: .directory)
2424
var workspacePath:FilePath.Directory? = nil
2525

@@ -120,7 +120,7 @@ extension SSGC
120120
}
121121
}
122122
}
123-
extension SSGC.Main
123+
extension SSGC.Compile
124124
{
125125
public
126126
func launch() throws

Sources/ssgc/SSGC.Main (ext).swift renamed to Sources/ssgc/SSGC.Compile (ext).swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import ArgumentParser
22
import SymbolGraphBuilder
33

44
@main
5-
extension SSGC.Main:ParsableCommand
5+
extension SSGC.Compile:ParsableCommand
66
{
77
public
88
func run() throws

Sources/unidoc-build/Unidoc.Build.Local.swift renamed to Sources/unidoc-build/Main.Local.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import SymbolGraphCompiler
44
import Symbols
55
import System
66

7-
extension Unidoc.Build
7+
extension Main
88
{
99
struct Local
1010
{
@@ -56,7 +56,7 @@ extension Unidoc.Build
5656
var book:Bool = false
5757
}
5858
}
59-
extension Unidoc.Build.Local:AsyncParsableCommand
59+
extension Main.Local:AsyncParsableCommand
6060
{
6161
static let configuration:CommandConfiguration = .init(commandName: "local")
6262

Sources/unidoc-build/Main.swift

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import ArgumentParser
2+
import SymbolGraphCompiler
3+
4+
@main
5+
struct Main:AsyncParsableCommand
6+
{
7+
static let configuration:CommandConfiguration = .init(subcommands: [
8+
SSGC.Compile.self,
9+
Local.self
10+
])
11+
}

Sources/unidoc-build/SSGC.Main (ext).swift renamed to Sources/unidoc-build/SSGC.Compile (ext).swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import ArgumentParser
22
import SymbolGraphBuilder
33

4-
extension SSGC.Main:AsyncParsableCommand
4+
extension SSGC.Compile:AsyncParsableCommand
55
{
66
public
77
static let configuration:CommandConfiguration = .init(commandName: "compile")

Sources/unidoc-build/Unidoc.Build.swift

Lines changed: 0 additions & 14 deletions
This file was deleted.

Sources/unidoc-build/Unidoc.Client (ext).swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import UnidocClient
44

55
extension Unidoc.Client<HTTP.Client1>
66
{
7-
init(from options:Unidoc.Build.Local) throws
7+
init(from options:Main.Local) throws
88
{
99
let threads:MultiThreadedEventLoopGroup = .init(numberOfThreads: 2)
1010

0 commit comments

Comments
 (0)