Skip to content

[SourceKit] Don’t set DisableModulesValidateSystemDependencies to true #74213

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions lib/IDETool/CompilerInvocation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -254,8 +254,6 @@ bool ide::initCompilerInvocation(
std::to_string(sessionTimestamp - 1));
ImporterOpts.ExtraArgs.push_back(
"-fmodules-validate-once-per-build-session");

SearchPathOpts.DisableModulesValidateSystemDependencies = true;
}

// Disable expensive SIL options to reduce time spent in SILGen.
Expand Down
25 changes: 25 additions & 0 deletions test/SourceKit/test-change-modulemap-of-system-module.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
// RUN: %empty-directory(%t)
// RUN: split-file %s %t
// RUN: %sourcekitd-test -req=diags %t/test.swift -- %t/test.swift -Xcc -fmodule-map-file=%t/module.modulemap -module-cache-path %t/module-cache | %FileCheck %s
// Sleep for 1 second so that touching the modulemap modifies its timestamp on the second level.
// RUN: sleep 1
// RUN: touch %t/module.modulemap
// RUN: %sourcekitd-test -req=diags %t/test.swift -- %t/test.swift -Xcc -fmodule-map-file=%t/module.modulemap -module-cache-path %t/module-cache | %FileCheck %s

// CHECK: 'guard' body must not fall through

//--- test.swift

import Lib

func test(value: Bool) {
guard value else {

}
}

//--- module.modulemap

module Lib [system] {
export *
}