Skip to content
Open
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
8 changes: 8 additions & 0 deletions azure-pipelines-PR.yml
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,7 @@ stages:
DOTNET_DbgMiniDumpType: 3 # Triage dump, 1 for mini, 2 for Heap, 3 for triage, 4 for full. Don't use 4 unless you know what you're doing.
DOTNET_DbgMiniDumpName: $(Build.SourcesDirectory)\artifacts\log\Release\$(Build.BuildId)-%e-%p-%t.dmp
NativeToolsOnMachine: true
SKIP_VERSION_SUPPORTED_CHECK: 1
displayName: Build

- task: PublishTestResults@2
Expand Down Expand Up @@ -316,6 +317,7 @@ stages:
DOTNET_DbgMiniDumpType: 3 # Triage dump, 1 for mini, 2 for Heap, 3 for triage, 4 for full. Don't use 4 unless you know what you're doing.
DOTNET_DbgMiniDumpName: $(Build.SourcesDirectory)\artifacts\log\Release\$(Build.BuildId)-%e-%p-%t.dmp
NativeToolsOnMachine: true
SKIP_VERSION_SUPPORTED_CHECK: 1
displayName: Build

- task: PublishTestResults@2
Expand Down Expand Up @@ -470,6 +472,7 @@ stages:
DOTNET_DbgMiniDumpType: 3 # Triage dump, 1 for mini, 2 for Heap, 3 for triage, 4 for full. Don't use 4 unless you know what you're doing.
DOTNET_DbgMiniDumpName: $(Build.SourcesDirectory)\artifacts\log\$(_configuration)\$(Build.BuildId)-%e-%p-%t.dmp
NativeToolsOnMachine: true
SKIP_VERSION_SUPPORTED_CHECK: 1
displayName: Build and Test $(_testKind) $(transparentCompiler)

- task: PublishTestResults@2
Expand Down Expand Up @@ -545,6 +548,7 @@ stages:
DOTNET_DbgMiniDumpType: 3 # Triage dump, 1 for mini, 2 for Heap, 3 for triage, 4 for full. Don't use 4 unless you know what you're doing.
DOTNET_DbgMiniDumpName: $(Build.SourcesDirectory)\artifacts\log\Release\$(Build.BuildId)-%e-%p-%t.dmp
NativeToolsOnMachine: true
SKIP_VERSION_SUPPORTED_CHECK: 1
displayName: Build / Test

- task: PublishTestResults@2
Expand Down Expand Up @@ -619,6 +623,8 @@ stages:
- checkout: self
clean: true
- script: ./eng/cibuild.sh --configuration $(_BuildConfig) --testcoreclr
env:
SKIP_VERSION_SUPPORTED_CHECK: 1
displayName: Build / Test
- task: PublishTestResults@2
displayName: Publish Test Results
Expand Down Expand Up @@ -664,6 +670,7 @@ stages:
- script: ./eng/cibuild.sh --configuration $(_BuildConfig) --testcoreclr
env:
COMPlus_DefaultStackSize: 1000000
SKIP_VERSION_SUPPORTED_CHECK: 1
displayName: Build / Test
- task: PublishTestResults@2
displayName: Publish Test Results
Expand Down Expand Up @@ -706,6 +713,7 @@ stages:
- script: .\Build.cmd -c Release -pack
env:
NativeToolsOnMachine: true
SKIP_VERSION_SUPPORTED_CHECK: 1
- script: .\tests\EndToEndBuildTests\EndToEndBuildTests.cmd -c Release
displayName: End to end build tests

Expand Down
1 change: 1 addition & 0 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ extends:
NativeToolsOnMachine: true
FSHARP_CACHE_OVERRIDE: 256
FSharp_CacheEvictionImmediate: true
SKIP_VERSION_SUPPORTED_CHECK: 1
- task: PublishTestResults@2
displayName: Publish Test Results
inputs:
Expand Down
9 changes: 3 additions & 6 deletions buildtools/fsyacc/fsyaccast.fs
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@

module FsLexYacc.FsYacc.AST

#nowarn "62" // This construct is for ML compatibility.


open System
open System.Collections.Generic
open Printf
Expand Down Expand Up @@ -38,7 +35,7 @@ type Symbols = Symbol list
//---------------------------------------------------------------------
// Output Raw Parser Spec AST

let StringOfSym sym = match sym with Terminal s -> "'" ^ s ^ "'" | NonTerminal s -> s
let StringOfSym sym = match sym with Terminal s -> String.Concat("'", s, "'") | NonTerminal s -> s

let OutputSym os sym = fprintf os "%s" (StringOfSym sym)

Expand Down Expand Up @@ -367,7 +364,7 @@ let CompilerLalrParserSpec logf (spec : ProcessedParserSpec): CompiledSpec =
stopWatch.Start()

// Augment the grammar
let fakeStartNonTerminals = spec.StartSymbols |> List.map(fun nt -> "_start"^nt)
let fakeStartNonTerminals = spec.StartSymbols |> List.map(fun nt -> String.Concat("_start", nt))
let nonTerminals = fakeStartNonTerminals@spec.NonTerminals
let endOfInputTerminal = "$$"
let dummyLookahead = "#"
Expand Down Expand Up @@ -480,7 +477,7 @@ let CompilerLalrParserSpec logf (spec : ProcessedParserSpec): CompiledSpec =
let IsStartItem item0 = fakeStartNonTerminalsSet.Contains(ntIdx_of_item0 item0)
let IsKernelItem item0 = (IsStartItem item0 || dotIdx_of_item0 item0 <> 0)

let StringOfSym sym = match sym with PTerminal s -> "'" ^ termTab.OfIndex s ^ "'" | PNonTerminal s -> ntTab.OfIndex s
let StringOfSym sym = match sym with PTerminal s -> String.Concat("'", termTab.OfIndex s, "'") | PNonTerminal s -> ntTab.OfIndex s

let OutputSym os sym = fprintf os "%s" (StringOfSym sym)

Expand Down
3 changes: 0 additions & 3 deletions buildtools/fsyacc/fsyaccpars.fs
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,6 @@ open FSharp.Text.Parsing.ParseHelpers
open FsLexYacc.FsYacc
open FsLexYacc.FsYacc.AST

#nowarn "62" // This construct is for ML compatibility


# 18 "fsyaccpars.fs"
// This type is the type of tokens accepted by the parser
type token =
Expand Down
4 changes: 4 additions & 0 deletions docs/release-notes/.FSharp.Compiler.Service/10.0.200.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,7 @@
* `SynExprLetOrUseTrivia` is now `SynLetOrUseTrivia`. ([PR #19090](https://github.com/dotnet/fsharp/pull/19090))
* `SynMemberDefn.LetBindings` has trivia. ([PR #19090](https://github.com/dotnet/fsharp/pull/19090))
* `SynModuleDecl.Let` has trivia. ([PR #19090](https://github.com/dotnet/fsharp/pull/19090))
* Removed support for `.ml` and `.mli` source files. ([PR #19143](https://github.com/dotnet/fsharp/pull/19143))
* Removed `#light` and `#indent` directives (they are now a no-op; combined with `off` they give an error). ([PR #19143](https://github.com/dotnet/fsharp/pull/19143))
* Removed `--light`, `--indentation-syntax`, `--no-indendation-syntax`, `--ml-keywords` and `--mlcompatibility` compiler/fsi flags. ([PR #19143](https://github.com/dotnet/fsharp/pull/19143))
* Removed parsing support for long-deprecated ML (non-light) constructs. ([PR #19143](https://github.com/dotnet/fsharp/pull/19143))
4 changes: 4 additions & 0 deletions docs/release-notes/.FSharp.Core/10.0.200.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
### Fixed

* Fix IL2091 trimming warning in `LazyExtensions.Create` by adding `DynamicallyAccessedMembers` attribute to the generic type parameter. ([Issue #17356](https://github.com/dotnet/fsharp/issues/17356), [PR #18302](https://github.com/dotnet/fsharp/pull/18302))

### Changed

* Renamed deprecated `or` and `&` operators, but keeping the original compiled names for binary compatibility. ([PR #19143](https://github.com/dotnet/fsharp/pull/19143))
3 changes: 3 additions & 0 deletions docs/release-notes/.Language/preview.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,6 @@
* Fix type erasure logic for `nativeptr<'T>` overloads to properly preserve element type differences during duplicate member checking. ([Issue #<ISSUE_NUMBER>](https://github.com/dotnet/fsharp/issues/<ISSUE_NUMBER>), [PR #<PR_NUMBER>](https://github.com/dotnet/fsharp/pull/<PR_NUMBER>))

### Changed

* Removed parsing support for long-deprecated ML constructs and non-light syntax. ([PR #19143](https://github.com/dotnet/fsharp/pull/19143))
* Released `asr`, `land`, `lor`, `lsl`, `lsr` and `lxor` as usable keywords (note: `mod` continues to be reserved). ([PR #19143](https://github.com/dotnet/fsharp/pull/19143))
6 changes: 1 addition & 5 deletions src/Compiler/Checking/AttributeChecking.fs
Original file line number Diff line number Diff line change
Expand Up @@ -458,11 +458,7 @@ let CheckILAttributesForUnseen (g: TcGlobals) cattrs _m =
let CheckFSharpAttributesForHidden g attribs =
not (isNil attribs) &&
(match TryFindFSharpAttribute g g.attrib_CompilerMessageAttribute attribs with
| Some(Attrib(_, _, [AttribStringArg _; AttribInt32Arg messageNumber],
ExtractAttribNamedArg "IsHidden" (AttribBoolArg v), _, _, _)) ->
// Message number 62 is for "ML Compatibility". Items labelled with this are visible in intellisense
// when mlCompatibility is set.
v && not (messageNumber = 62 && g.mlCompatibility)
| Some(Attrib(_, _, _, ExtractAttribNamedArg "IsHidden" (AttribBoolArg v), _, _, _)) -> v
| _ -> false)
||
(match TryFindFSharpAttribute g g.attrib_ComponentModelEditorBrowsableAttribute attribs with
Expand Down
10 changes: 3 additions & 7 deletions src/Compiler/Checking/Expressions/CheckExpressions.fs
Original file line number Diff line number Diff line change
Expand Up @@ -3789,14 +3789,12 @@ let buildApp (cenv: cenv) expr resultTy arg m =

// Special rule for building applications of the 'x && y' operator
| ApplicableExpr(expr=Expr.App (Expr.Val (vref, _, _), _, _, [x0], _)), _
when valRefEq g vref g.and_vref
|| valRefEq g vref g.and2_vref ->
when valRefEq g vref g.and2_vref ->
MakeApplicableExprNoFlex cenv (mkLazyAnd g m x0 arg), resultTy

// Special rule for building applications of the 'x || y' operator
| ApplicableExpr(expr=Expr.App (Expr.Val (vref, _, _), _, _, [x0], _)), _
when valRefEq g vref g.or_vref
|| valRefEq g vref g.or2_vref ->
when valRefEq g vref g.or2_vref ->
MakeApplicableExprNoFlex cenv (mkLazyOr g m x0 arg ), resultTy

// Special rule for building applications of the 'reraise' operator
Expand Down Expand Up @@ -8608,9 +8606,7 @@ and TcApplicationThen (cenv: cenv) (overallTy: OverallTy) env tpenv mExprAndArg
match leftExpr with
| ApplicableExpr(expr=Expr.Val (vref, _, _))
| ApplicableExpr(expr=Expr.App (Expr.Val (vref, _, _), _, _, [_], _))
when valRefEq g vref g.and_vref
|| valRefEq g vref g.and2_vref
|| valRefEq g vref g.or_vref
when valRefEq g vref g.and2_vref
|| valRefEq g vref g.or2_vref -> { env with eIsControlFlow = true }
| _ -> env

Expand Down
34 changes: 2 additions & 32 deletions src/Compiler/Driver/CompilerConfig.fs
Original file line number Diff line number Diff line change
Expand Up @@ -37,17 +37,12 @@ let (++) x s = x @ [ s ]
// Some Globals
//--------------------------------------------------------------------------

let FSharpSigFileSuffixes = [ ".mli"; ".fsi" ]
let FSharpSigFileSuffixes = [ ".fsi" ]

let FSharpMLCompatFileSuffixes = [ ".mli"; ".ml" ]

let FSharpImplFileSuffixes = [ ".ml"; ".fs"; ".fsscript"; ".fsx" ]
let FSharpImplFileSuffixes = [ ".fs"; ".fsscript"; ".fsx" ]

let FSharpScriptFileSuffixes = [ ".fsscript"; ".fsx" ]

let FSharpIndentationAwareSyntaxFileSuffixes =
[ ".fs"; ".fsscript"; ".fsx"; ".fsi" ]

let FSharpExperimentalFeaturesEnabledAutomatically =
String.IsNullOrWhiteSpace(Environment.GetEnvironmentVariable("FSHARP_EXPERIMENTAL_FEATURES"))
|> not
Expand Down Expand Up @@ -467,7 +462,6 @@ type TcConfigBuilder =
mutable implicitlyReferenceDotNetAssemblies: bool
mutable resolutionEnvironment: LegacyResolutionEnvironment
mutable implicitlyResolveAssemblies: bool
mutable indentationAwareSyntax: bool option
mutable conditionalDefines: string list
mutable loadedSources: (range * string * string) list
mutable compilerToolPaths: string list
Expand All @@ -482,7 +476,6 @@ type TcConfigBuilder =
mutable clearResultsCache: bool
mutable embedResources: string list
mutable diagnosticsOptions: FSharpDiagnosticOptions
mutable mlCompatibility: bool
mutable checkNullness: bool
mutable checkOverflow: bool
mutable showReferenceResolutions: bool
Expand Down Expand Up @@ -701,7 +694,6 @@ type TcConfigBuilder =
// These are all default values, many can be overridden using the command line switch
{
primaryAssembly = PrimaryAssembly.Mscorlib
indentationAwareSyntax = None
noFeedback = false
stackReserveSize = None
conditionalDefines = []
Expand All @@ -725,7 +717,6 @@ type TcConfigBuilder =
clearResultsCache = false
subsystemVersion = 4, 0 // per spec for 357994
useHighEntropyVA = false
mlCompatibility = false
checkNullness = false
checkOverflow = false
showReferenceResolutions = false
Expand Down Expand Up @@ -960,10 +951,6 @@ type TcConfigBuilder =
match GetWarningNumber(m, WarningDescription.String s, tcConfigB.langVersion, WarningNumberSource.CommandLineOption) with
| None -> ()
| Some n ->
// nowarn:62 turns on mlCompatibility, e.g. shows ML compat items in intellisense menus
if n = 62 then
tcConfigB.mlCompatibility <- true

tcConfigB.diagnosticsOptions <-
{ tcConfigB.diagnosticsOptions with
WarnOff = ListSet.insert (=) n tcConfigB.diagnosticsOptions.WarnOff
Expand All @@ -975,10 +962,6 @@ type TcConfigBuilder =
match GetWarningNumber(m, WarningDescription.String s, tcConfigB.langVersion, WarningNumberSource.CommandLineOption) with
| None -> ()
| Some n ->
// warnon 62 turns on mlCompatibility, e.g. shows ML compat items in intellisense menus
if n = 62 then
tcConfigB.mlCompatibility <- false

tcConfigB.diagnosticsOptions <-
{ tcConfigB.diagnosticsOptions with
WarnOn = ListSet.insert (=) n tcConfigB.diagnosticsOptions.WarnOn
Expand Down Expand Up @@ -1284,7 +1267,6 @@ type TcConfig private (data: TcConfigBuilder, validate: bool) =
member _.implicitlyReferenceDotNetAssemblies = data.implicitlyReferenceDotNetAssemblies
member _.implicitlyResolveAssemblies = data.implicitlyResolveAssemblies
member _.resolutionEnvironment = data.resolutionEnvironment
member _.indentationAwareSyntax = data.indentationAwareSyntax
member _.conditionalDefines = data.conditionalDefines
member _.loadedSources = data.loadedSources
member _.compilerToolPaths = data.compilerToolPaths
Expand All @@ -1298,7 +1280,6 @@ type TcConfig private (data: TcConfigBuilder, validate: bool) =
member _.clearResultsCache = data.clearResultsCache
member _.embedResources = data.embedResources
member _.diagnosticsOptions = data.diagnosticsOptions
member _.mlCompatibility = data.mlCompatibility
member _.checkNullness = data.checkNullness
member _.checkOverflow = data.checkOverflow
member _.showReferenceResolutions = data.showReferenceResolutions
Expand Down Expand Up @@ -1429,17 +1410,6 @@ type TcConfig private (data: TcConfigBuilder, validate: bool) =
// This call can fail if no CLR is found (this is the path to mscorlib)
member _.GetTargetFrameworkDirectories() = targetFrameworkDirectories

member tcConfig.ComputeIndentationAwareSyntaxInitialStatus fileName =
use _unwindBuildPhase = UseBuildPhase BuildPhase.Parameter

let indentationAwareSyntaxOnByDefault =
List.exists (FileSystemUtils.checkSuffix fileName) FSharpIndentationAwareSyntaxFileSuffixes

if indentationAwareSyntaxOnByDefault then
(tcConfig.indentationAwareSyntax <> Some false)
else
(tcConfig.indentationAwareSyntax = Some true)

member tcConfig.GetAvailableLoadedSources() =
use _unwindBuildPhase = UseBuildPhase BuildPhase.Parameter

Expand Down
17 changes: 0 additions & 17 deletions src/Compiler/Driver/CompilerConfig.fsi
Original file line number Diff line number Diff line change
Expand Up @@ -256,9 +256,6 @@ type TcConfigBuilder =

mutable implicitlyResolveAssemblies: bool

/// Set if the user has explicitly turned indentation-aware syntax on/off
mutable indentationAwareSyntax: bool option

mutable conditionalDefines: string list

/// Sources added into the build with #load
Expand Down Expand Up @@ -288,8 +285,6 @@ type TcConfigBuilder =

mutable diagnosticsOptions: FSharpDiagnosticOptions

mutable mlCompatibility: bool

mutable checkNullness: bool

mutable checkOverflow: bool
Expand Down Expand Up @@ -607,9 +602,6 @@ type TcConfig =

member implicitlyResolveAssemblies: bool

/// Set if the user has explicitly turned indentation-aware syntax on/off
member indentationAwareSyntax: bool option

member conditionalDefines: string list

member subsystemVersion: int * int
Expand All @@ -630,8 +622,6 @@ type TcConfig =

member diagnosticsOptions: FSharpDiagnosticOptions

member mlCompatibility: bool

member checkNullness: bool

member checkOverflow: bool
Expand Down Expand Up @@ -822,8 +812,6 @@ type TcConfig =

member strictIndentation: bool option

member ComputeIndentationAwareSyntaxInitialStatus: string -> bool

member GetTargetFrameworkDirectories: unit -> string list

/// Get the loaded sources that exist and issue a warning for the ones that don't
Expand Down Expand Up @@ -953,10 +941,5 @@ val FSharpImplFileSuffixes: string list
/// Script file suffixes
val FSharpScriptFileSuffixes: string list

/// File suffixes where #light is the default
val FSharpIndentationAwareSyntaxFileSuffixes: string list

val FSharpMLCompatFileSuffixes: string list

/// Indicates whether experimental features should be enabled automatically
val FSharpExperimentalFeaturesEnabledAutomatically: bool
1 change: 0 additions & 1 deletion src/Compiler/Driver/CompilerDiagnostics.fs
Original file line number Diff line number Diff line change
Expand Up @@ -1280,7 +1280,6 @@ type Exception with
| Parser.TOKEN_HIGH_PRECEDENCE_BRACK_APP -> SR.GetString("Parser.TOKEN.HIGH.PRECEDENCE.BRACK.APP")
| Parser.TOKEN_BEGIN -> SR.GetString("Parser.TOKEN.BEGIN")
| Parser.TOKEN_END -> SR.GetString("Parser.TOKEN.END")
| Parser.TOKEN_HASH_LIGHT
| Parser.TOKEN_HASH_LINE
| Parser.TOKEN_HASH_IF
| Parser.TOKEN_HASH_ELSE
Expand Down
1 change: 0 additions & 1 deletion src/Compiler/Driver/CompilerImports.fs
Original file line number Diff line number Diff line change
Expand Up @@ -2593,7 +2593,6 @@ and [<Sealed>] TcImports
ilGlobals,
fslibCcu,
tcConfig.implicitIncludeDir,
tcConfig.mlCompatibility,
tcConfig.isInteractive,
tcConfig.checkNullness,
tcConfig.useReflectionFreeCodeGen,
Expand Down
Loading
Loading