@@ -867,8 +867,9 @@ final class BuildPlanTests: XCTestCase {
867
867
let llbuild = LLBuildManifestBuilder ( plan, fileSystem: fs, observabilityScope: observability. topScope)
868
868
try llbuild. generateManifest ( at: yaml)
869
869
let contents : String = try fs. readFileContents ( yaml)
870
+ let swiftGetVersionFilePath = try XCTUnwrap ( llbuild. swiftGetVersionFiles. first? . value)
870
871
XCTAssertMatch ( contents, . contains( """
871
- inputs: [ " \( Pkg . appending ( components: " Sources " , " exe " , " main.swift " ) . escapedPathString ( ) ) " , " \( buildPath. appending ( components: " PkgLib.swiftmodule " ) . escapedPathString ( ) ) " , " \( buildPath. appending ( components: " exe.build " , " sources " ) . escapedPathString ( ) ) " ]
872
+ inputs: [ " \( Pkg . appending ( components: " Sources " , " exe " , " main.swift " ) . escapedPathString ( ) ) " , " \( swiftGetVersionFilePath . escapedPathString ( ) ) " , " \( buildPath. appending ( components: " PkgLib.swiftmodule " ) . escapedPathString ( ) ) " , " \( buildPath. appending ( components: " exe.build " , " sources " ) . escapedPathString ( ) ) " ]
872
873
""" ) )
873
874
874
875
}
@@ -896,8 +897,9 @@ final class BuildPlanTests: XCTestCase {
896
897
try llbuild. generateManifest ( at: yaml)
897
898
let contents : String = try fs. readFileContents ( yaml)
898
899
let buildPath = plan. buildParameters. dataPath. appending ( components: " debug " )
900
+ let swiftGetVersionFilePath = try XCTUnwrap ( llbuild. swiftGetVersionFiles. first? . value)
899
901
XCTAssertMatch ( contents, . contains( """
900
- inputs: [ " \( Pkg . appending ( components: " Sources " , " exe " , " main.swift " ) . escapedPathString ( ) ) " , " \( buildPath. appending ( components: " exe.build " , " sources " ) . escapedPathString ( ) ) " ]
902
+ inputs: [ " \( Pkg . appending ( components: " Sources " , " exe " , " main.swift " ) . escapedPathString ( ) ) " , " \( swiftGetVersionFilePath . escapedPathString ( ) ) " , " \( buildPath. appending ( components: " exe.build " , " sources " ) . escapedPathString ( ) ) " ]
901
903
""" ) )
902
904
}
903
905
}
@@ -3894,14 +3896,15 @@ final class BuildPlanTests: XCTestCase {
3894
3896
let llbuild = LLBuildManifestBuilder ( plan, fileSystem: fs, observabilityScope: observability. topScope)
3895
3897
try llbuild. generateManifest ( at: yaml)
3896
3898
let contents : String = try fs. readFileContents ( yaml)
3899
+ let swiftGetVersionFilePath = try XCTUnwrap ( llbuild. swiftGetVersionFiles. first? . value)
3897
3900
3898
3901
#if os(Windows)
3899
3902
let suffix = " .exe "
3900
3903
#else // FIXME(5472) - the suffix is dropped
3901
3904
let suffix = " "
3902
3905
#endif
3903
3906
XCTAssertMatch ( contents, . contains( """
3904
- inputs: [ " \( PkgA . appending ( components: " Sources " , " swiftlib " , " lib.swift " ) . escapedPathString ( ) ) " , " \( buildPath. appending ( components: " exe \( suffix) " ) . escapedPathString ( ) ) " , " \( buildPath. appending ( components: " swiftlib.build " , " sources " ) . escapedPathString ( ) ) " ]
3907
+ inputs: [ " \( PkgA . appending ( components: " Sources " , " swiftlib " , " lib.swift " ) . escapedPathString ( ) ) " , " \( swiftGetVersionFilePath . escapedPathString ( ) ) " , " \( buildPath. appending ( components: " exe \( suffix) " ) . escapedPathString ( ) ) " , " \( buildPath. appending ( components: " swiftlib.build " , " sources " ) . escapedPathString ( ) ) " ]
3905
3908
outputs: [ " \( buildPath. appending ( components: " swiftlib.build " , " lib.swift.o " ) . escapedPathString ( ) ) " , " \( buildPath. escapedPathString ( ) )
3906
3909
""" ) )
3907
3910
}
@@ -4804,10 +4807,11 @@ final class BuildPlanTests: XCTestCase {
4804
4807
let yaml = buildPath. appending ( " release.yaml " )
4805
4808
let llbuild = LLBuildManifestBuilder ( plan, fileSystem: fs, observabilityScope: observability. topScope)
4806
4809
try llbuild. generateManifest ( at: yaml)
4810
+ let swiftGetVersionFilePath = try XCTUnwrap ( llbuild. swiftGetVersionFiles. first? . value)
4807
4811
4808
4812
let yamlContents : String = try fs. readFileContents ( yaml)
4809
4813
let inputs : SerializedJSON = """
4810
- inputs: [ " \( AbsolutePath ( " /Pkg/Snippets/ASnippet.swift " ) ) " , " \( AbsolutePath ( " /Pkg/.build/debug/Lib.swiftmodule " ) ) "
4814
+ inputs: [ " \( AbsolutePath ( " /Pkg/Snippets/ASnippet.swift " ) ) " , " \( swiftGetVersionFilePath . escapedPathString ( ) ) " , " \( AbsolutePath ( " /Pkg/.build/debug/Lib.swiftmodule " ) ) "
4811
4815
"""
4812
4816
XCTAssertMatch ( yamlContents, . contains( inputs. underlying) )
4813
4817
}
0 commit comments