@@ -806,28 +806,21 @@ final class SwiftPMBuildSystemTests: XCTestCase {
806806 fallbackAfterTimeout: false
807807 )
808808 ) . compilerArguments
809- let argumentsFromReal = try await unwrap (
810- buildSystemManager. buildSettingsInferredFromMainFile (
811- for: DocumentURI ( aswiftReal) ,
812- language: . swift,
813- fallbackAfterTimeout: false
814- )
815- ) . compilerArguments
816809
817- // The arguments retrieved from the symlink and the real document should be the same, except that both should
818- // contain they file the build settings were created.
819- // FIXME: Or should the build settings always reference the main file?
820- XCTAssertEqual (
821- try argumentsFromSymlink. filter { try $0 != aswiftSymlink. filePath && $0 != aswiftReal. filePath } ,
822- try argumentsFromReal. filter { try $0 != aswiftSymlink. filePath && $0 != aswiftReal. filePath }
810+ // We opened the project from a symlink. The realpath isn't part of the project and we should thus not receive
811+ // build settings for it.
812+ assertTrue (
813+ try await unwrap (
814+ buildSystemManager. buildSettingsInferredFromMainFile (
815+ for: DocumentURI ( aswiftReal) ,
816+ language: . swift,
817+ fallbackAfterTimeout: false
818+ )
819+ ) . isFallback
823820 )
824-
825821 assertArgumentsContain ( try aswiftSymlink. filePath, arguments: argumentsFromSymlink)
826822 assertArgumentsDoNotContain ( try aswiftReal. filePath, arguments: argumentsFromSymlink)
827823
828- assertArgumentsContain ( try aswiftReal. filePath, arguments: argumentsFromReal)
829- assertArgumentsDoNotContain ( try aswiftSymlink. filePath, arguments: argumentsFromReal)
830-
831824 let argsManifest = try await unwrap (
832825 buildSystemManager. buildSettingsInferredFromMainFile (
833826 for: DocumentURI ( manifest) ,
0 commit comments