From 5a2424781a8ae1fe8f3a8d4321ff534598a86a10 Mon Sep 17 00:00:00 2001 From: Kevin Ransom Date: Fri, 9 Jun 2023 12:56:57 -0700 Subject: [PATCH 1/2] remove support for --noframework from fsi --- src/Compiler/Driver/CompilerOptions.fs | 12 ++++++++---- .../fsc/dumpAllCommandLineOptions/dummy.fsx | 3 ++- .../fsi/help/help40-nologo.437.1033.bsl | 2 -- .../CompilerOptions/fsi/help/help40.437.1033.bsl | 2 -- 4 files changed, 10 insertions(+), 9 deletions(-) diff --git a/src/Compiler/Driver/CompilerOptions.fs b/src/Compiler/Driver/CompilerOptions.fs index 9592a660491..01632824d9a 100644 --- a/src/Compiler/Driver/CompilerOptions.fs +++ b/src/Compiler/Driver/CompilerOptions.fs @@ -1233,9 +1233,10 @@ let noFrameworkFlag isFsc tcConfigB = "noframework", tagNone, OptionUnit(fun () -> - tcConfigB.implicitlyReferenceDotNetAssemblies <- false - + // When the compilation is not fsi do nothing. + // It is just not a usefull option when running fsi on the coreclr or the desktop framework really. if isFsc then + tcConfigB.implicitlyReferenceDotNetAssemblies <- false tcConfigB.implicitlyResolveAssemblies <- false), None, Some(FSComp.SR.optsNoframework ()) @@ -1251,7 +1252,6 @@ let advancedFlagsFsi tcConfigB = None, Some(FSComp.SR.optsClearResultsCache ()) ) - noFrameworkFlag false tcConfigB ] let advancedFlagsFsc tcConfigB = @@ -1852,7 +1852,11 @@ let deprecatedFlagsBoth tcConfigB = ) ] -let deprecatedFlagsFsi tcConfigB = deprecatedFlagsBoth tcConfigB +let deprecatedFlagsFsi tcConfigB = + [ + noFrameworkFlag false tcConfigB + yield! deprecatedFlagsBoth tcConfigB + ] let deprecatedFlagsFsc tcConfigB = deprecatedFlagsBoth tcConfigB diff --git a/tests/fsharpqa/Source/CompilerOptions/fsc/dumpAllCommandLineOptions/dummy.fsx b/tests/fsharpqa/Source/CompilerOptions/fsc/dumpAllCommandLineOptions/dummy.fsx index 45ec1d3da2a..ede4b3b0dea 100644 --- a/tests/fsharpqa/Source/CompilerOptions/fsc/dumpAllCommandLineOptions/dummy.fsx +++ b/tests/fsharpqa/Source/CompilerOptions/fsc/dumpAllCommandLineOptions/dummy.fsx @@ -30,7 +30,7 @@ //section='- ADVANCED - ' ! option=utf8output kind=OptionUnit //section='- ADVANCED - ' ! option=fullpaths kind=OptionUnit //section='- ADVANCED - ' ! option=lib kind=OptionStringList -//section='- ADVANCED - ' ! option=noframework kind=OptionUnit +//section='NoSection ' ! option=noframework kind=OptionUnit //section='NoSection ' ! option=typedtree kind=OptionUnit //section='NoSection ' ! option=typedtreefile kind=OptionUnit //section='NoSection ' ! option=typedtreestamps kind=OptionUnit @@ -123,6 +123,7 @@ //section='- ADVANCED - ' ! option=standalone kind=OptionUnit //section='- ADVANCED - ' ! option=staticlink kind=OptionString //section='- ADVANCED - ' ! option=pdb kind=OptionString +//section='- ADVANCED - ' ! option=noframework kind=OptionUnit //section='NoSection ' ! option=generatehtml kind=OptionUnit //section='NoSection ' ! option=htmloutputdir kind=OptionString //section='NoSection ' ! option=htmlcss kind=OptionString diff --git a/tests/fsharpqa/Source/CompilerOptions/fsi/help/help40-nologo.437.1033.bsl b/tests/fsharpqa/Source/CompilerOptions/fsi/help/help40-nologo.437.1033.bsl index b0d97ddcd12..4d506d958dc 100644 --- a/tests/fsharpqa/Source/CompilerOptions/fsi/help/help40-nologo.437.1033.bsl +++ b/tests/fsharpqa/Source/CompilerOptions/fsi/help/help40-nologo.437.1033.bsl @@ -94,8 +94,6 @@ Usage: fsiAnyCpu [script.fsx []] Default - mscorlib --clearResultsCache Clear the package manager results cache ---noframework Do not reference the default CLI - assemblies by default --exec Exit fsi after loading the files or running the .fsx script given on the command line diff --git a/tests/fsharpqa/Source/CompilerOptions/fsi/help/help40.437.1033.bsl b/tests/fsharpqa/Source/CompilerOptions/fsi/help/help40.437.1033.bsl index e95a139b5fb..8ef52cd6466 100644 --- a/tests/fsharpqa/Source/CompilerOptions/fsi/help/help40.437.1033.bsl +++ b/tests/fsharpqa/Source/CompilerOptions/fsi/help/help40.437.1033.bsl @@ -96,8 +96,6 @@ Usage: fsiAnyCpu [script.fsx []] Default - mscorlib --clearResultsCache Clear the package manager results cache ---noframework Do not reference the default CLI - assemblies by default --exec Exit fsi after loading the files or running the .fsx script given on the command line From a18d50ab155b2efd3119348e7baf6283d0b77e91 Mon Sep 17 00:00:00 2001 From: Kevin Ransom Date: Fri, 9 Jun 2023 16:08:14 -0700 Subject: [PATCH 2/2] fantomas --- src/Compiler/Driver/CompilerOptions.fs | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/Compiler/Driver/CompilerOptions.fs b/src/Compiler/Driver/CompilerOptions.fs index 01632824d9a..9996567a97a 100644 --- a/src/Compiler/Driver/CompilerOptions.fs +++ b/src/Compiler/Driver/CompilerOptions.fs @@ -1852,11 +1852,8 @@ let deprecatedFlagsBoth tcConfigB = ) ] -let deprecatedFlagsFsi tcConfigB = - [ - noFrameworkFlag false tcConfigB - yield! deprecatedFlagsBoth tcConfigB - ] +let deprecatedFlagsFsi tcConfigB = + [ noFrameworkFlag false tcConfigB; yield! deprecatedFlagsBoth tcConfigB ] let deprecatedFlagsFsc tcConfigB = deprecatedFlagsBoth tcConfigB