Skip to content

Commit d89080d

Browse files
committed
Fixed merge issues
1 parent c58fd57 commit d89080d

File tree

9 files changed

+26
-24
lines changed

9 files changed

+26
-24
lines changed

fcs/fcs-fable/service_slim.fs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -113,10 +113,9 @@ type internal CompilerStateCache(readAllBytes: string -> byte[], projectOptions:
113113
)
114114
#endif
115115

116-
let niceNameGen = NiceNameGenerator()
117116
let assemblyName = projectOptions.ProjectFileName |> Path.GetFileNameWithoutExtension
118117
let tcInitial, openDecls0 = GetInitialTcEnv (assemblyName, rangeStartup, tcConfig, tcImports, tcGlobals)
119-
let tcInitialState = GetInitialTcState (rangeStartup, assemblyName, tcConfig, tcGlobals, tcImports, niceNameGen, tcInitial, openDecls0)
118+
let tcInitialState = GetInitialTcState (rangeStartup, assemblyName, tcConfig, tcGlobals, tcImports, tcInitial, openDecls0)
120119

121120
// parse cache, keyed on file name and source hash
122121
let parseCache = ConcurrentDictionary<string * int, FSharpParseFileResults>(HashIdentity.Structural)
@@ -190,7 +189,7 @@ module internal ParseAndCheck =
190189
let input = parseResults.ParseTree
191190
let diagnosticsOptions = compilerState.tcConfig.diagnosticsOptions
192191
let capturingLogger = CompilationDiagnosticLogger("TypeCheckFile", diagnosticsOptions)
193-
let diagnosticsLogger = GetDiagnosticsLoggerFilteringByScopedPragmas(false, GetScopedPragmasForInput(input), diagnosticsOptions, capturingLogger)
192+
let diagnosticsLogger = GetDiagnosticsLoggerFilteringByScopedPragmas(false, input.ScopedPragmas, diagnosticsOptions, capturingLogger)
194193
use _scope = new CompilationGlobalsScope (diagnosticsLogger, BuildPhase.TypeCheck)
195194

196195
let checkForErrors () = parseResults.ParseHadErrors || diagnosticsLogger.ErrorCount > 0

src/Compiler/AbstractIL/ilread.fs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1333,14 +1333,14 @@ let seekReadIndexedRowsRange numRows binaryChop (reader: ISeekReadIndexedRowRead
13331333

13341334
startRid, endRid
13351335

1336-
let seekReadIndexedRowsByInterface numRows binaryChop (reader: ISeekReadIndexedRowReader<'RowT, _, _>) =
1336+
let seekReadIndexedRowsByInterface numRows binaryChop (reader: ISeekReadIndexedRowReader<CustomAttributeRow, 'KeyT, 'T>) =
13371337
let startRid, endRid = seekReadIndexedRowsRange numRows binaryChop reader
13381338

13391339
if startRid <= 0 || endRid < startRid then
13401340
[||]
13411341
else
13421342
Array.init (endRid - startRid + 1) (fun i ->
1343-
let mutable row = Unchecked.defaultof<'RowT>
1343+
let mutable row = ref Unchecked.defaultof<CustomAttributeRow>
13441344
reader.GetRow(startRid + i, row)
13451345
reader.ConvertRow(row))
13461346

src/Compiler/Driver/CompilerConfig.fs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1230,6 +1230,8 @@ type TcConfig private (data: TcConfigBuilder, validate: bool) =
12301230
errorRecovery e range0
12311231
[]
12321232

1233+
#endif //!FABLE_COMPILER
1234+
12331235
member _.bufferWidth = data.bufferWidth
12341236
member _.fsiMultiAssemblyEmit = data.fsiMultiAssemblyEmit
12351237
member _.FxResolver = data.FxResolver

src/Compiler/Driver/CompilerConfig.fsi

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -867,9 +867,11 @@ type TcConfig =
867867

868868
/// Check if the primary assembly is mscorlib
869869
member assumeDotNetFramework: bool
870+
#endif //!FABLE_COMPILER
870871

871872
member exiter: Exiter
872873

874+
#if !FABLE_COMPILER
873875
member parallelReferenceResolution: ParallelReferenceResolution
874876

875877
/// Represents a computation to return a TcConfig. Normally this is just a constant immutable TcConfig,

src/Compiler/Driver/CompilerDiagnostics.fsi

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ type PhasedDiagnostic with
7070
/// Indicates if a diagnostic should be reported as an error
7171
member ReportAsError: FSharpDiagnosticOptions * FSharpDiagnosticSeverity -> bool
7272

73+
#if !FABLE_COMPILER
7374
/// Output all of a diagnostic to a buffer, including range
7475
member Output: buf: StringBuilder * tcConfig: TcConfig * severity: FSharpDiagnosticSeverity -> unit
7576

@@ -81,6 +82,7 @@ type PhasedDiagnostic with
8182
tcConfig: TcConfig *
8283
severity: FSharpDiagnosticSeverity ->
8384
unit
85+
#endif //!FABLE_COMPILER
8486

8587
/// Get a diagnostics logger that filters the reporting of warnings based on scoped pragma information
8688
val GetDiagnosticsLoggerFilteringByScopedPragmas:

src/Compiler/Driver/ParseAndCheckInputs.fs

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1433,6 +1433,8 @@ let CheckMultipleInputsSequential (ctok, checkForErrors, tcConfig, tcImports, tc
14331433
(tcState, inputs)
14341434
||> List.mapFold (CheckOneInputEntry(ctok, checkForErrors, tcConfig, tcImports, tcGlobals, prefixPathOpt, false))
14351435

1436+
#if !FABLE_COMPILER
1437+
14361438
/// Use parallel checking of implementation files that have signature files
14371439
let CheckMultipleInputsInParallel
14381440
(
@@ -1545,12 +1547,19 @@ let CheckMultipleInputsInParallel
15451547

15461548
results, tcState)
15471549

1548-
let CheckClosedInputSet (ctok, checkForErrors, tcConfig: TcConfig, tcImports, tcGlobals, prefixPathOpt, tcState, eagerFormat, inputs) =
1550+
#endif //!FABLE_COMPILER
1551+
1552+
let CheckClosedInputSet (ctok, checkForErrors, tcConfig: TcConfig, tcImports, tcGlobals, prefixPathOpt, tcState, eagerFormat: (PhasedDiagnostic -> PhasedDiagnostic), inputs) =
15491553
// tcEnvAtEndOfLastFile is the environment required by fsi.exe when incrementally adding definitions
1554+
#if FABLE_COMPILER
1555+
ignore eagerFormat
1556+
#endif
15501557
let results, tcState =
1558+
#if !FABLE_COMPILER
15511559
if tcConfig.parallelCheckingWithSignatureFiles then
15521560
CheckMultipleInputsInParallel(ctok, checkForErrors, tcConfig, tcImports, tcGlobals, prefixPathOpt, tcState, eagerFormat, inputs)
15531561
else
1562+
#endif //!FABLE_COMPILER
15541563
CheckMultipleInputsSequential(ctok, checkForErrors, tcConfig, tcImports, tcGlobals, prefixPathOpt, tcState, inputs)
15551564

15561565
let (tcEnvAtEndOfLastFile, topAttrs, implFiles, _), tcState =

src/Compiler/Facilities/DiagnosticsLogger.fs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,7 @@ let rec AttachRange m (exn: exn) =
162162
| Failure msg -> InternalError(msg + " (Failure)", m)
163163
#if !FABLE_COMPILER
164164
| :? ArgumentException as exn -> InternalError(exn.Message + " (ArgumentException)", m)
165+
#endif
165166
| _ -> exn
166167

167168
type Exiter =
@@ -859,6 +860,7 @@ type StackGuard(maxDepth: int, name: string) =
859860
#if FABLE_COMPILER
860861
ignore depth
861862
ignore maxDepth
863+
ignore name
862864
f ()
863865
#else //!FABLE_COMPILER
864866
depth <- depth + 1

src/Compiler/Service/FSharpCheckerResults.fs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2841,7 +2841,11 @@ type FSharpCheckFileResults
28412841

28422842
match pageWidth with
28432843
| None -> layout
2844+
#if FABLE_COMPILER
2845+
| Some _pageWidth -> layout
2846+
#else
28442847
| Some pageWidth -> Display.squashTo pageWidth layout
2848+
#endif
28452849
|> LayoutRender.showL
28462850
|> SourceText.ofString)
28472851

src/Compiler/Service/FSharpCheckerResults.fsi

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -584,24 +584,6 @@ module internal ParseAndCheckFile =
584584
suggestNamesForErrors: bool ->
585585
(range * range)[]
586586

587-
// #if FABLE_COMPILER
588-
// val CheckOneFile:
589-
// parseResults: FSharpParseFileResults *
590-
// sourceText: ISourceText *
591-
// mainInputFileName: string *
592-
// projectOptions: FSharpProjectOptions *
593-
// projectFileName: string *
594-
// tcConfig: TcConfig *
595-
// tcGlobals: TcGlobals *
596-
// tcImports: TcImports *
597-
// tcState: TcState *
598-
// moduleNamesDict: ModuleNamesDict *
599-
// loadClosure: LoadClosure option *
600-
// backgroundDiagnostics: (PhasedDiagnostic * FSharpDiagnosticSeverity)[] *
601-
// suggestNamesForErrors: bool
602-
// -> Cancellable<FSharpDiagnostic[] * TypeCheckInfo>
603-
// #endif
604-
605587
#if !FABLE_COMPILER
606588

607589
// An object to typecheck source in a given typechecking environment.

0 commit comments

Comments
 (0)