Skip to content

Commit 9566bbf

Browse files
committed
Fixed merge issues
1 parent 48821cf commit 9566bbf

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
@@ -1399,6 +1399,8 @@ let CheckMultipleInputsSequential (ctok, checkForErrors, tcConfig, tcImports, tc
13991399
(tcState, inputs)
14001400
||> List.mapFold (CheckOneInputEntry(ctok, checkForErrors, tcConfig, tcImports, tcGlobals, prefixPathOpt, false))
14011401

1402+
#if !FABLE_COMPILER
1403+
14021404
/// Use parallel checking of implementation files that have signature files
14031405
let CheckMultipleInputsInParallel
14041406
(
@@ -1511,12 +1513,19 @@ let CheckMultipleInputsInParallel
15111513

15121514
results, tcState)
15131515

1514-
let CheckClosedInputSet (ctok, checkForErrors, tcConfig: TcConfig, tcImports, tcGlobals, prefixPathOpt, tcState, eagerFormat, inputs) =
1516+
#endif //!FABLE_COMPILER
1517+
1518+
let CheckClosedInputSet (ctok, checkForErrors, tcConfig: TcConfig, tcImports, tcGlobals, prefixPathOpt, tcState, eagerFormat: (PhasedDiagnostic -> PhasedDiagnostic), inputs) =
15151519
// tcEnvAtEndOfLastFile is the environment required by fsi.exe when incrementally adding definitions
1520+
#if FABLE_COMPILER
1521+
ignore eagerFormat
1522+
#endif
15161523
let results, tcState =
1524+
#if !FABLE_COMPILER
15171525
if tcConfig.parallelCheckingWithSignatureFiles then
15181526
CheckMultipleInputsInParallel(ctok, checkForErrors, tcConfig, tcImports, tcGlobals, prefixPathOpt, tcState, eagerFormat, inputs)
15191527
else
1528+
#endif //!FABLE_COMPILER
15201529
CheckMultipleInputsSequential(ctok, checkForErrors, tcConfig, tcImports, tcGlobals, prefixPathOpt, tcState, inputs)
15211530

15221531
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
@@ -2845,7 +2845,11 @@ type FSharpCheckFileResults
28452845

28462846
match pageWidth with
28472847
| None -> layout
2848+
#if FABLE_COMPILER
2849+
| Some _pageWidth -> layout
2850+
#else
28482851
| Some pageWidth -> Display.squashTo pageWidth layout
2852+
#endif
28492853
|> LayoutRender.showL
28502854
|> SourceText.ofString)
28512855

src/Compiler/Service/FSharpCheckerResults.fsi

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

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

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

0 commit comments

Comments
 (0)