Skip to content

Commit

Permalink
make desktop fsi default to multi-emit
Browse files Browse the repository at this point in the history
  • Loading branch information
KevinRansom committed Dec 20, 2022
1 parent 19c20af commit 9f5244f
Show file tree
Hide file tree
Showing 18 changed files with 19 additions and 94 deletions.
1 change: 0 additions & 1 deletion src/Compiler/Interactive/FSIstrings.txt
Original file line number Diff line number Diff line change
Expand Up @@ -56,5 +56,4 @@ shadowCopyReferences,"Prevents references from being locked by the F# Interactiv
fsiOperationCouldNotBeCompleted,"Operation could not be completed due to earlier error"
fsiOperationFailed,"Operation failed. The error text has been printed in the error stream. To return the corresponding FSharpDiagnostic use the EvalInteractionNonThrowing, EvalScriptNonThrowing or EvalExpressionNonThrowing"
fsiMultiAssemblyEmitOption,"Emit multiple assemblies (on by default)"
fsiMultiAssemblyEmitOptionOffByDefault,"Emit multiple assemblies (off by default for .NET Framework)"
2304,fsiEntryPointWontBeInvoked,"Functions with [<EntryPoint>] are not invoked in FSI. '%s' was not invoked. Execute '%s <args>' in order to invoke '%s' with the appropriate string array of command line arguments."
35 changes: 13 additions & 22 deletions src/Compiler/Interactive/fsi.fs
Original file line number Diff line number Diff line change
Expand Up @@ -939,31 +939,22 @@ type internal FsiCommandLineOptions(fsi: FsiEvaluationSessionHostConfig,
]

/// These options follow the FsiCoreCompilerOptions in the help blocks
let fsiUsageSuffix tcConfigB =
[PublicOptions(FSComp.SR.optsHelpBannerInputFiles(),
[CompilerOption("--","", OptionRest recordExplicitArg, None,
Some (FSIstrings.SR.fsiRemaining()));
]);
PublicOptions(FSComp.SR.optsHelpBannerMisc(),
[ CompilerOption("help", tagNone,
OptionConsoleOnly (displayHelpFsi tcConfigB), None, Some (FSIstrings.SR.fsiHelp()))
]);
PrivateOptions(
[ CompilerOption("?", tagNone, OptionConsoleOnly (displayHelpFsi tcConfigB), None, None); // "Short form of --help");
let fsiUsageSuffix tcConfigB = [
PublicOptions(FSComp.SR.optsHelpBannerInputFiles(), [CompilerOption("--","", OptionRest recordExplicitArg, None, Some (FSIstrings.SR.fsiRemaining())); ]);
PublicOptions(FSComp.SR.optsHelpBannerMisc(), [ CompilerOption("help", tagNone, OptionConsoleOnly (displayHelpFsi tcConfigB), None, Some (FSIstrings.SR.fsiHelp())) ]);
PrivateOptions([
CompilerOption("?", tagNone, OptionConsoleOnly (displayHelpFsi tcConfigB), None, None); // "Short form of --help");
CompilerOption("help", tagNone, OptionConsoleOnly (displayHelpFsi tcConfigB), None, None); // "Short form of --help");
CompilerOption("full-help", tagNone, OptionConsoleOnly (displayHelpFsi tcConfigB), None, None); // "Short form of --help");
]);
PublicOptions(FSComp.SR.optsHelpBannerAdvanced(),
[CompilerOption("exec", "", OptionUnit (fun () -> interact <- false), None, Some (FSIstrings.SR.fsiExec()))
CompilerOption("gui", tagNone, OptionSwitch(fun flag -> gui <- (flag = OptionSwitch.On)),None,Some (FSIstrings.SR.fsiGui()))
CompilerOption("quiet", "", OptionUnit (fun () -> tcConfigB.noFeedback <- true), None,Some (FSIstrings.SR.fsiQuiet()));
CompilerOption("readline", tagNone, OptionSwitch(fun flag -> enableConsoleKeyProcessing <- (flag = OptionSwitch.On)), None, Some(FSIstrings.SR.fsiReadline()))
CompilerOption("quotations-debug", tagNone, OptionSwitch(fun switch -> tcConfigB.emitDebugInfoInQuotations <- switch = OptionSwitch.On),None, Some(FSIstrings.SR.fsiEmitDebugInfoInQuotations()))
CompilerOption("shadowcopyreferences", tagNone, OptionSwitch(fun flag -> tcConfigB.shadowCopyReferences <- flag = OptionSwitch.On), None, Some(FSIstrings.SR.shadowCopyReferences()))
if FSharpEnvironment.isRunningOnCoreClr then
CompilerOption("multiemit", tagNone, OptionSwitch(fun flag -> tcConfigB.fsiMultiAssemblyEmit <- flag = OptionSwitch.On), None, Some(FSIstrings.SR.fsiMultiAssemblyEmitOption()))
else
CompilerOption("multiemit", tagNone, OptionSwitch(fun flag -> tcConfigB.fsiMultiAssemblyEmit <- flag = OptionSwitch.On), None, Some(FSIstrings.SR.fsiMultiAssemblyEmitOptionOffByDefault()))
PublicOptions(FSComp.SR.optsHelpBannerAdvanced(), [
CompilerOption("exec", "", OptionUnit (fun () -> interact <- false), None, Some (FSIstrings.SR.fsiExec()))
CompilerOption("gui", tagNone, OptionSwitch(fun flag -> gui <- (flag = OptionSwitch.On)),None,Some (FSIstrings.SR.fsiGui()))
CompilerOption("quiet", "", OptionUnit (fun () -> tcConfigB.noFeedback <- true), None,Some (FSIstrings.SR.fsiQuiet()));
CompilerOption("readline", tagNone, OptionSwitch(fun flag -> enableConsoleKeyProcessing <- (flag = OptionSwitch.On)), None, Some(FSIstrings.SR.fsiReadline()))
CompilerOption("quotations-debug", tagNone, OptionSwitch(fun switch -> tcConfigB.emitDebugInfoInQuotations <- switch = OptionSwitch.On),None, Some(FSIstrings.SR.fsiEmitDebugInfoInQuotations()))
CompilerOption("shadowcopyreferences", tagNone, OptionSwitch(fun flag -> tcConfigB.shadowCopyReferences <- flag = OptionSwitch.On), None, Some(FSIstrings.SR.shadowCopyReferences()))
CompilerOption("multiemit", tagNone, OptionSwitch(fun flag -> tcConfigB.fsiMultiAssemblyEmit <- flag = OptionSwitch.On), None, Some(FSIstrings.SR.fsiMultiAssemblyEmitOption()))
]);
]

Expand Down
5 changes: 0 additions & 5 deletions src/Compiler/Interactive/xlf/FSIstrings.txt.cs.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,6 @@
<target state="translated">Vymazat obrazovku</target>
<note />
</trans-unit>
<trans-unit id="fsiMultiAssemblyEmitOptionOffByDefault">
<source>Emit multiple assemblies (off by default for .NET Framework)</source>
<target state="translated">Vygenerovat více sestavení (pro .NET Framework je to ve výchozím nastavení vypnuto)</target>
<note />
</trans-unit>
<trans-unit id="fsiOperationCouldNotBeCompleted">
<source>Operation could not be completed due to earlier error</source>
<target state="translated">Operaci nešlo dokončit z důvodu dřívější chyby.</target>
Expand Down
5 changes: 0 additions & 5 deletions src/Compiler/Interactive/xlf/FSIstrings.txt.de.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,6 @@
<target state="translated">Bildschirm löschen</target>
<note />
</trans-unit>
<trans-unit id="fsiMultiAssemblyEmitOptionOffByDefault">
<source>Emit multiple assemblies (off by default for .NET Framework)</source>
<target state="translated">Ausgeben mehrerer Assemblys (standardmäßig deaktiviert für .NET Framework)</target>
<note />
</trans-unit>
<trans-unit id="fsiOperationCouldNotBeCompleted">
<source>Operation could not be completed due to earlier error</source>
<target state="translated">Der Vorgang konnte aufgrund eines vorherigen Fehlers nicht abgeschlossen werden.</target>
Expand Down
5 changes: 0 additions & 5 deletions src/Compiler/Interactive/xlf/FSIstrings.txt.es.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,6 @@
<target state="translated">Borrar pantalla</target>
<note />
</trans-unit>
<trans-unit id="fsiMultiAssemblyEmitOptionOffByDefault">
<source>Emit multiple assemblies (off by default for .NET Framework)</source>
<target state="translated">Emitir varios ensamblados (desactivado de forma predeterminada para .NET Framework)</target>
<note />
</trans-unit>
<trans-unit id="fsiOperationCouldNotBeCompleted">
<source>Operation could not be completed due to earlier error</source>
<target state="translated">La operación no se pudo completar debido a un error anterior</target>
Expand Down
5 changes: 0 additions & 5 deletions src/Compiler/Interactive/xlf/FSIstrings.txt.fr.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,6 @@
<target state="translated">Effacer l'écran</target>
<note />
</trans-unit>
<trans-unit id="fsiMultiAssemblyEmitOptionOffByDefault">
<source>Emit multiple assemblies (off by default for .NET Framework)</source>
<target state="translated">Émettre plusieurs assemblées (désactivé par défaut pour .NET Framework)</target>
<note />
</trans-unit>
<trans-unit id="fsiOperationCouldNotBeCompleted">
<source>Operation could not be completed due to earlier error</source>
<target state="translated">Impossible d'exécuter l'opération en raison d'une erreur antérieure</target>
Expand Down
5 changes: 0 additions & 5 deletions src/Compiler/Interactive/xlf/FSIstrings.txt.it.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,6 @@
<target state="translated">Cancella schermata</target>
<note />
</trans-unit>
<trans-unit id="fsiMultiAssemblyEmitOptionOffByDefault">
<source>Emit multiple assemblies (off by default for .NET Framework)</source>
<target state="translated">Creare più assembly (disattivato per impostazione predefinita per .NET Framework)</target>
<note />
</trans-unit>
<trans-unit id="fsiOperationCouldNotBeCompleted">
<source>Operation could not be completed due to earlier error</source>
<target state="translated">Non è stato possibile completare l'operazione a causa di un errore precedente</target>
Expand Down
5 changes: 0 additions & 5 deletions src/Compiler/Interactive/xlf/FSIstrings.txt.ja.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,6 @@
<target state="translated">画面をクリアする</target>
<note />
</trans-unit>
<trans-unit id="fsiMultiAssemblyEmitOptionOffByDefault">
<source>Emit multiple assemblies (off by default for .NET Framework)</source>
<target state="translated">複数のアセンブリを出力する (.NET Frameworkの場合は既定でオフ)</target>
<note />
</trans-unit>
<trans-unit id="fsiOperationCouldNotBeCompleted">
<source>Operation could not be completed due to earlier error</source>
<target state="translated">以前のエラーが原因で操作を完了できませんでした</target>
Expand Down
5 changes: 0 additions & 5 deletions src/Compiler/Interactive/xlf/FSIstrings.txt.ko.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,6 @@
<target state="translated">화면 지우기</target>
<note />
</trans-unit>
<trans-unit id="fsiMultiAssemblyEmitOptionOffByDefault">
<source>Emit multiple assemblies (off by default for .NET Framework)</source>
<target state="translated">여러 어셈블리 내보내기(기본적으로 .NET Framework 해제)</target>
<note />
</trans-unit>
<trans-unit id="fsiOperationCouldNotBeCompleted">
<source>Operation could not be completed due to earlier error</source>
<target state="translated">이전 오류로 인해 작업을 완료할 수 없습니다.</target>
Expand Down
5 changes: 0 additions & 5 deletions src/Compiler/Interactive/xlf/FSIstrings.txt.pl.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,6 @@
<target state="translated">Wyczyść ekran</target>
<note />
</trans-unit>
<trans-unit id="fsiMultiAssemblyEmitOptionOffByDefault">
<source>Emit multiple assemblies (off by default for .NET Framework)</source>
<target state="translated">Emituj wiele zestawów (domyślnie wyłączone dla programu .NET Framework)</target>
<note />
</trans-unit>
<trans-unit id="fsiOperationCouldNotBeCompleted">
<source>Operation could not be completed due to earlier error</source>
<target state="translated">Nie udało się ukończyć operacji z powodu wcześniejszego błędu</target>
Expand Down
5 changes: 0 additions & 5 deletions src/Compiler/Interactive/xlf/FSIstrings.txt.pt-BR.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,6 @@
<target state="translated">Limpar tela</target>
<note />
</trans-unit>
<trans-unit id="fsiMultiAssemblyEmitOptionOffByDefault">
<source>Emit multiple assemblies (off by default for .NET Framework)</source>
<target state="translated">Emitir várias montagens (desligadas por padrão para .NET Framework)</target>
<note />
</trans-unit>
<trans-unit id="fsiOperationCouldNotBeCompleted">
<source>Operation could not be completed due to earlier error</source>
<target state="translated">Não foi possível concluir a operação devido a um erro anterior</target>
Expand Down
5 changes: 0 additions & 5 deletions src/Compiler/Interactive/xlf/FSIstrings.txt.ru.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,6 @@
<target state="translated">Очистить экран</target>
<note />
</trans-unit>
<trans-unit id="fsiMultiAssemblyEmitOptionOffByDefault">
<source>Emit multiple assemblies (off by default for .NET Framework)</source>
<target state="translated">Выпуск нескольких сборок (отключено по умолчанию для .NET Framework)</target>
<note />
</trans-unit>
<trans-unit id="fsiOperationCouldNotBeCompleted">
<source>Operation could not be completed due to earlier error</source>
<target state="translated">Операция не может быть завершена из-за предыдущей ошибки</target>
Expand Down
5 changes: 0 additions & 5 deletions src/Compiler/Interactive/xlf/FSIstrings.txt.tr.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,6 @@
<target state="translated">Ekranı temizle</target>
<note />
</trans-unit>
<trans-unit id="fsiMultiAssemblyEmitOptionOffByDefault">
<source>Emit multiple assemblies (off by default for .NET Framework)</source>
<target state="translated">Birden çok bütünleştirilmiş kod göster (.NET Framework için varsayılan olarak kapalı)</target>
<note />
</trans-unit>
<trans-unit id="fsiOperationCouldNotBeCompleted">
<source>Operation could not be completed due to earlier error</source>
<target state="translated">Önceki hata nedeniyle işlem tamamlanamadı</target>
Expand Down
5 changes: 0 additions & 5 deletions src/Compiler/Interactive/xlf/FSIstrings.txt.zh-Hans.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,6 @@
<target state="translated">清除屏幕</target>
<note />
</trans-unit>
<trans-unit id="fsiMultiAssemblyEmitOptionOffByDefault">
<source>Emit multiple assemblies (off by default for .NET Framework)</source>
<target state="translated">发出多个程序集(默认情况下为 .NET Framework 关闭)</target>
<note />
</trans-unit>
<trans-unit id="fsiOperationCouldNotBeCompleted">
<source>Operation could not be completed due to earlier error</source>
<target state="translated">由于早期错误,无法完成操作</target>
Expand Down
5 changes: 0 additions & 5 deletions src/Compiler/Interactive/xlf/FSIstrings.txt.zh-Hant.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,6 @@
<target state="translated">清空螢幕</target>
<note />
</trans-unit>
<trans-unit id="fsiMultiAssemblyEmitOptionOffByDefault">
<source>Emit multiple assemblies (off by default for .NET Framework)</source>
<target state="translated">發出多組件 (.NET Framework 預設為關閉)</target>
<note />
</trans-unit>
<trans-unit id="fsiOperationCouldNotBeCompleted">
<source>Operation could not be completed due to earlier error</source>
<target state="translated">因為先前發生錯誤,所以無法完成作業</target>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,5 +107,5 @@ Usage: fsharpi <options> [script.fsx [<arguments>]]
--quotations-debug[+|-] Emit debug information in quotations
--shadowcopyreferences[+|-] Prevents references from being
locked by the F# Interactive process
--multiemit[+|-] Emit multiple assemblies (off by
default for .NET Framework)
--multiemit[+|-] Emit multiple assemblies (on by
default)
Original file line number Diff line number Diff line change
Expand Up @@ -107,5 +107,5 @@ Usage: fsiAnyCpu <options> [script.fsx [<arguments>]]
--quotations-debug[+|-] Emit debug information in quotations
--shadowcopyreferences[+|-] Prevents references from being
locked by the F# Interactive process
--multiemit[+|-] Emit multiple assemblies (off by
default for .NET Framework)
--multiemit[+|-] Emit multiple assemblies (on by
default)
Original file line number Diff line number Diff line change
Expand Up @@ -109,5 +109,5 @@ Usage: fsiAnyCpu <options> [script.fsx [<arguments>]]
--quotations-debug[+|-] Emit debug information in quotations
--shadowcopyreferences[+|-] Prevents references from being
locked by the F# Interactive process
--multiemit[+|-] Emit multiple assemblies (off by
default for .NET Framework)
--multiemit[+|-] Emit multiple assemblies (on by
default)

0 comments on commit 9f5244f

Please sign in to comment.