Skip to content

Commit a3cc837

Browse files
committed
Sink ProductType into ProductDescription
1 parent 96f01d3 commit a3cc837

File tree

3 files changed

+33
-47
lines changed

3 files changed

+33
-47
lines changed

Sources/SwiftRefactor/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ add_swift_syntax_library(SwiftRefactor
3535
PackageManifest/PackageEdit.swift
3636
PackageManifest/PackageIdentity.swift
3737
PackageManifest/ProductDescription.swift
38-
PackageManifest/ProductType.swift
3938
PackageManifest/RelativePath.swift
4039
PackageManifest/SemanticVersion.swift
4140
PackageManifest/SourceControlURL.swift

Sources/SwiftRefactor/PackageManifest/ProductDescription.swift

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,39 @@ public struct ProductDescription {
2424
/// The type of product.
2525
public let type: ProductType
2626

27+
public enum ProductType {
28+
/// The type of library.
29+
public enum LibraryType: String, Codable, Sendable {
30+
31+
/// Static library.
32+
case `static`
33+
34+
/// Dynamic library.
35+
case `dynamic`
36+
37+
/// The type of library is unspecified and should be decided by package manager.
38+
case automatic
39+
}
40+
41+
/// A library product.
42+
case library(LibraryType)
43+
44+
/// An executable product.
45+
case executable
46+
47+
/// An executable code snippet.
48+
case snippet
49+
50+
/// An plugin product.
51+
case plugin
52+
53+
/// A test product.
54+
case test
55+
56+
/// A macro product.
57+
case `macro`
58+
}
59+
2760
public init(
2861
name: String,
2962
type: ProductType,

Sources/SwiftRefactor/PackageManifest/ProductType.swift

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

0 commit comments

Comments
 (0)