Skip to content

Commit fcc7537

Browse files
committed
Fix some errors - force .fsi files to depend on all previous .fsi files (short-term fix)
1 parent 9f83dc3 commit fcc7537

2 files changed

Lines changed: 13 additions & 0 deletions

File tree

src/Compiler/Facilities/DiagnosticsLogger.fs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -343,6 +343,7 @@ type CapturingDiagnosticsLogger(nm, ?eagerFormat) =
343343
| Some f -> f diagnostic
344344

345345
if severity = FSharpDiagnosticSeverity.Error then
346+
printfn $"\r\nERROR {diagnostic.Exception.Message}\r\n"
346347
errorCount <- errorCount + 1
347348

348349
diagnostics.Add(diagnostic, severity)

tests/ParallelTypeCheckingTests/Code/DepResolving.fs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,10 @@ module internal AutomatedDependencyResolving =
147147

148148
let trie = buildTrie nodes
149149

150+
let fsiFiles =
151+
nodes
152+
|> Array.filter (fun f -> f.File.Name.EndsWith ".fsi")
153+
150154
let processFile (node : FileData) =
151155
let deps =
152156
let fsiDep =
@@ -224,6 +228,13 @@ module internal AutomatedDependencyResolving =
224228
moduleRefs
225229
|> Array.iter processRef
226230

231+
// Force .fsi files to depend on all other (previous) .fsi files - avoids the issue of TcEnv being overriden
232+
let additionalFsiDeps =
233+
if node.File.Name.EndsWith ".fsi" then
234+
fsiFiles
235+
else
236+
[||]
237+
227238
// Collect files from all reachable TrieNodes
228239
let deps =
229240
reachable
@@ -233,6 +244,7 @@ module internal AutomatedDependencyResolving =
233244
// For starters: can module abbreviations affect other files?
234245
// If not, then the below is not necessary.
235246
|> Seq.append filesWithModuleAbbreviations
247+
|> Seq.append additionalFsiDeps
236248
|> Seq.append fsiDep
237249
|> Seq.map (fun f -> f.File)
238250
|> Seq.toArray

0 commit comments

Comments
 (0)