Skip to content

Commit 45ffedc

Browse files
committed
remove misguided workaround
1 parent 48f0f63 commit 45ffedc

File tree

8 files changed

+8
-12
lines changed

8 files changed

+8
-12
lines changed

src/Compiler/Checking/CheckDeclarations.fs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4218,13 +4218,16 @@ module TcDeclarations =
42184218
| Result res ->
42194219
// Update resolved type parameters with the names from the source.
42204220
let _, tcref, _ = res
4221-
4222-
if (not g.deterministic) && tcref.TyparsNoRange.Length = synTypars.Length then
4221+
4222+
if tcref.TyparsNoRange.Length = synTypars.Length then
42234223
(tcref.TyparsNoRange, synTypars)
42244224
||> List.zip
42254225
|> List.iter (fun (typar, SynTyparDecl.SynTyparDecl (typar = tp)) ->
42264226
let (SynTypar(ident = untypedIdent; staticReq = sr)) = tp
42274227
if typar.StaticReq = sr then
4228+
// TODO: mutating typar here can lead to a race during parallel type checking.
4229+
// Some type extensions can end up with a wrong type argument name.
4230+
// This will break deterministic builds.
42284231
typar.SetIdent(untypedIdent)
42294232
)
42304233

src/Compiler/CodeGen/IlxGen.fs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2766,6 +2766,7 @@ let GenConstArray cenv (cgbuf: CodeGenBuffer) eenv ilElementType (data: 'a[]) (w
27662766
CG.EmitInstrs cgbuf (pop 0) (Push [ ilArrayType ]) [ mkLdcInt32 0; I_newarr(ILArrayShape.SingleDimensional, ilElementType) ]
27672767
else
27682768
let vtspec = cgbuf.mgbuf.GenerateRawDataValueType(eenv.cloc, bytes.Length)
2769+
27692770
let unique =
27702771
g.CompilerGlobalState.Value.IlxGenNiceNameGenerator.IncrementOnly("@field", eenv.cloc.Range)
27712772

src/Compiler/Driver/CompilerImports.fs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2606,7 +2606,6 @@ and [<Sealed>] TcImports
26062606
tcConfig.pathMap,
26072607
tcConfig.langVersion,
26082608
tcConfig.realsig,
2609-
tcConfig.deterministic,
26102609
tcConfig.compilationMode
26112610
)
26122611

src/Compiler/Service/IncrementalBuild.fs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -573,7 +573,6 @@ type FrameworkImportsCache(size) =
573573
tcGlobals.pathMap,
574574
tcConfig.langVersion,
575575
tcConfig.realsig,
576-
tcConfig.deterministic,
577576
tcConfig.compilationMode
578577
)
579578

src/Compiler/SyntaxTree/UnicodeLexing.fs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ open Internal.Utilities.Text.Lexing
88

99
type Lexbuf = LexBuffer<char>
1010

11-
type LexBuffer<'char> with
11+
type LexBuffer<'Char> with
1212

1313
member lexbuf.GetLocalData<'T when 'T: not null>(key: string, initializer) =
1414
match lexbuf.BufferLocalStore.TryGetValue key with

src/Compiler/SyntaxTree/UnicodeLexing.fsi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ open Internal.Utilities.Text.Lexing
99

1010
type Lexbuf = LexBuffer<char>
1111

12-
type LexBuffer<'char> with
12+
type LexBuffer<'Char> with
1313
member GetLocalData<'T when 'T: not null> : key: string * initializer: (unit -> 'T) -> 'T
1414
member TryGetLocalData<'T when 'T: not null> : key: string -> 'T option
1515

src/Compiler/TypedTree/TcGlobals.fs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,6 @@ type TcGlobals(
198198
pathMap: PathMap,
199199
langVersion: LanguageVersion,
200200
realsig: bool,
201-
deterministic: bool,
202201
compilationMode: CompilationMode) =
203202

204203
let v_langFeatureNullness = langVersion.SupportsFeature LanguageFeature.NullnessChecking
@@ -1848,8 +1847,6 @@ type TcGlobals(
18481847
/// Are we assuming all code gen is for F# interactive, with no static linking
18491848
member _.isInteractive=isInteractive
18501849

1851-
member val deterministic = deterministic
1852-
18531850
member val compilationMode = compilationMode
18541851

18551852
/// Indicates if we are generating witness arguments for SRTP constraints. Only done if the FSharp.Core

src/Compiler/TypedTree/TcGlobals.fsi

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,6 @@ type internal TcGlobals =
157157
pathMap: Internal.Utilities.PathMap *
158158
langVersion: FSharp.Compiler.Features.LanguageVersion *
159159
realsig: bool *
160-
deterministic: bool *
161160
compilationMode: CompilationMode ->
162161
TcGlobals
163162

@@ -827,8 +826,6 @@ type internal TcGlobals =
827826
/// Are we assuming all code gen is for F# interactive, with no static linking
828827
member isInteractive: bool
829828

830-
member deterministic: bool
831-
832829
member compilationMode: CompilationMode
833830

834831
member isnull_info: IntrinsicValRef

0 commit comments

Comments
 (0)