@@ -23,7 +23,7 @@ import struct TSCUtility.BuildFlags
23
23
24
24
public struct XcodeprojOptions {
25
25
/// The build flags.
26
- public var flags : BuildFlags
26
+ public var flags : PackageModel . BuildFlags
27
27
28
28
/// If provided, a path to an xcconfig file to be included by the project.
29
29
///
@@ -46,7 +46,7 @@ public struct XcodeprojOptions {
46
46
public var manifestLoader : ManifestLoader ?
47
47
48
48
public init (
49
- flags: BuildFlags = BuildFlags ( ) ,
49
+ flags: PackageModel . BuildFlags = PackageModel . BuildFlags ( ) ,
50
50
xcconfigOverrides: AbsolutePath ? = nil ,
51
51
isCodeCoverageEnabled: Bool ? = nil ,
52
52
useLegacySchemeGenerator: Bool ? = nil ,
@@ -64,9 +64,9 @@ public struct XcodeprojOptions {
64
64
65
65
public enum XcodeProject {
66
66
// Determine the path of the .xcodeproj wrapper directory.
67
- public static func makePath( outputDir: AbsolutePath , projectName: String ) -> AbsolutePath {
67
+ public static func makePath( outputDir: AbsolutePath , projectName: String ) throws -> AbsolutePath {
68
68
let xcodeprojName = " \( projectName) .xcodeproj "
69
- return AbsolutePath ( xcodeprojName, relativeTo: outputDir)
69
+ return try AbsolutePath ( validating : xcodeprojName, relativeTo: outputDir)
70
70
}
71
71
72
72
/// Generates an Xcode project and all needed support files. The .xcodeproj
@@ -146,7 +146,7 @@ public enum XcodeProject {
146
146
///// For framework targets, generate target.c99Name_Info.plist files in the
147
147
///// directory that Xcode project is generated
148
148
let name = target. infoPlistFileName
149
- try open ( AbsolutePath ( name, relativeTo: xcodeprojPath) ) { print in
149
+ try open ( AbsolutePath ( validating : name, relativeTo: xcodeprojPath) ) { print in
150
150
print ( """
151
151
<?xml version= " 1.0 " encoding= " UTF-8 " ?>
152
152
<plist version= " 1.0 " >
@@ -246,7 +246,7 @@ public enum XcodeProject {
246
246
// -Package so its name doesn't collide with any products or target with
247
247
// same name.
248
248
let schemeName = " \( graph. rootPackages [ 0 ] . manifest. displayName) -Package.xcscheme " // TODO: use identity instead?
249
- try open ( AbsolutePath ( schemeName, relativeTo: schemesDir) ) { stream in
249
+ try open ( AbsolutePath ( validating : schemeName, relativeTo: schemesDir) ) { stream in
250
250
legacySchemeGenerator (
251
251
container: schemeContainer,
252
252
graph: graph,
0 commit comments