Skip to content

Commit c9847c1

Browse files
authored
Merge pull request #1330 from dsyme/fix-311
fix help text - 311
2 parents e2eb573 + a7ba7c2 commit c9847c1

File tree

9 files changed

+41
-129
lines changed

9 files changed

+41
-129
lines changed

src/fsharp/CompileOptions.fs

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -656,13 +656,13 @@ let resourcesFlagsFsc (tcConfigB : TcConfigBuilder) =
656656
// OptionBlock: Code generation
657657
//-----------------------------
658658

659-
let codeGenerationFlags (tcConfigB : TcConfigBuilder) =
659+
let codeGenerationFlags isFsi (tcConfigB : TcConfigBuilder) =
660660
[
661661
CompilerOption("debug", tagNone, OptionSwitch (SetDebugSwitch tcConfigB None), None,
662662
Some (FSComp.SR.optsDebugPM()))
663663

664664
CompilerOption("debug", tagFullPDBOnlyPortable, OptionString (fun s -> SetDebugSwitch tcConfigB (Some(s)) OptionSwitch.On), None,
665-
Some (FSComp.SR.optsDebug()))
665+
Some (FSComp.SR.optsDebug(if isFsi then "pdbonly" else "full")))
666666

667667
CompilerOption("optimize", tagNone, OptionSwitch (SetOptimizeSwitch tcConfigB) , None,
668668
Some (FSComp.SR.optsOptimize()))
@@ -1057,14 +1057,14 @@ let testingAndQAFlags _tcConfigB =
10571057

10581058
/// The core/common options used by fsc.exe. [not currently extended by fsc.fs].
10591059
let GetCoreFscCompilerOptions (tcConfigB: TcConfigBuilder) =
1060-
[ PublicOptions(FSComp.SR.optsHelpBannerOutputFiles(), outputFileFlagsFsc tcConfigB)
1061-
PublicOptions(FSComp.SR.optsHelpBannerInputFiles(), inputFileFlagsFsc tcConfigB)
1062-
PublicOptions(FSComp.SR.optsHelpBannerResources(), resourcesFlagsFsc tcConfigB)
1063-
PublicOptions(FSComp.SR.optsHelpBannerCodeGen(), codeGenerationFlags tcConfigB)
1064-
PublicOptions(FSComp.SR.optsHelpBannerErrsAndWarns(), errorsAndWarningsFlags tcConfigB)
1065-
PublicOptions(FSComp.SR.optsHelpBannerLanguage(), languageFlags tcConfigB)
1066-
PublicOptions(FSComp.SR.optsHelpBannerMisc(), miscFlagsFsc tcConfigB)
1067-
PublicOptions(FSComp.SR.optsHelpBannerAdvanced(), advancedFlagsFsc tcConfigB)
1060+
[ PublicOptions(FSComp.SR.optsHelpBannerOutputFiles(), outputFileFlagsFsc tcConfigB)
1061+
PublicOptions(FSComp.SR.optsHelpBannerInputFiles(), inputFileFlagsFsc tcConfigB)
1062+
PublicOptions(FSComp.SR.optsHelpBannerResources(), resourcesFlagsFsc tcConfigB)
1063+
PublicOptions(FSComp.SR.optsHelpBannerCodeGen(), codeGenerationFlags false tcConfigB)
1064+
PublicOptions(FSComp.SR.optsHelpBannerErrsAndWarns(), errorsAndWarningsFlags tcConfigB)
1065+
PublicOptions(FSComp.SR.optsHelpBannerLanguage(), languageFlags tcConfigB)
1066+
PublicOptions(FSComp.SR.optsHelpBannerMisc(), miscFlagsFsc tcConfigB)
1067+
PublicOptions(FSComp.SR.optsHelpBannerAdvanced(), advancedFlagsFsc tcConfigB)
10681068
PrivateOptions(List.concat [ internalFlags tcConfigB
10691069
abbreviatedFlagsFsc tcConfigB
10701070
deprecatedFlagsFsc tcConfigB
@@ -1079,12 +1079,12 @@ let GetCoreServiceCompilerOptions (tcConfigB:TcConfigBuilder) =
10791079

10801080
/// The core/common options used by fsi.exe. [note, some additional options are added in fsi.fs].
10811081
let GetCoreFsiCompilerOptions (tcConfigB: TcConfigBuilder) =
1082-
[ PublicOptions(FSComp.SR.optsHelpBannerOutputFiles() , outputFileFlagsFsi tcConfigB)
1083-
PublicOptions(FSComp.SR.optsHelpBannerInputFiles() , inputFileFlagsFsi tcConfigB)
1084-
PublicOptions(FSComp.SR.optsHelpBannerResources() , resourcesFlagsFsi tcConfigB)
1085-
PublicOptions(FSComp.SR.optsHelpBannerCodeGen() , codeGenerationFlags tcConfigB)
1086-
PublicOptions(FSComp.SR.optsHelpBannerErrsAndWarns() , errorsAndWarningsFlags tcConfigB)
1087-
PublicOptions(FSComp.SR.optsHelpBannerLanguage() , languageFlags tcConfigB)
1082+
[ PublicOptions(FSComp.SR.optsHelpBannerOutputFiles() , outputFileFlagsFsi tcConfigB)
1083+
PublicOptions(FSComp.SR.optsHelpBannerInputFiles() , inputFileFlagsFsi tcConfigB)
1084+
PublicOptions(FSComp.SR.optsHelpBannerResources() , resourcesFlagsFsi tcConfigB)
1085+
PublicOptions(FSComp.SR.optsHelpBannerCodeGen() , codeGenerationFlags true tcConfigB)
1086+
PublicOptions(FSComp.SR.optsHelpBannerErrsAndWarns() , errorsAndWarningsFlags tcConfigB)
1087+
PublicOptions(FSComp.SR.optsHelpBannerLanguage() , languageFlags tcConfigB)
10881088
// Note: no HTML block for fsi.exe
10891089
PublicOptions(FSComp.SR.optsHelpBannerMisc() , miscFlagsFsi tcConfigB)
10901090
PublicOptions(FSComp.SR.optsHelpBannerAdvanced() , advancedFlagsFsi tcConfigB)

src/fsharp/FSComp.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -835,7 +835,7 @@ optsNowin32manifest,"Do not include the default Win32 manifest"
835835
optsResource,"Embed the specified managed resource"
836836
optsLinkresource,"Link the specified resource to this assembly where the resinfo format is <file>[,<string name>[,public|private]]"
837837
optsDebugPM,"Emit debug information (Short form: -g)"
838-
optsDebug,"Specify debugging type: full, portable, pdbonly. ('full' is the default and enables attaching a debugger to a running program. 'portable' is a cross-platform format)."
838+
optsDebug,"Specify debugging type: full, portable, pdbonly. ('%s' is the default if no debuggging type specified and enables attaching a debugger to a running program. 'portable' is a cross-platform format)."
839839
optsOptimize,"Enable optimizations (Short form: -O)"
840840
optsTailcalls,"Enable or disable tailcalls"
841841
optsCrossoptimize,"Enable or disable cross-module optimizations"

tests/fsharpqa/Source/CompilerOptions/fsc/help/help20.437.1033.bsl

Lines changed: 0 additions & 94 deletions
This file was deleted.

tests/fsharpqa/Source/CompilerOptions/fsc/help/help40.437.1033.bsl

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,10 @@ Copyright (c) Microsoft Corporation. All Rights Reserved.
5050
- CODE GENERATION -
5151
--debug[+|-] Emit debug information (Short form: -g)
5252
--debug:{full|pdbonly|portable} Specify debugging type: full, portable, pdbonly.
53-
('full' is the default and enables attaching a
54-
debugger to a running program. 'portable' is a
55-
cross-platform format).
53+
('full' is the default if no debuggging type
54+
specified and enables attaching a debugger to a
55+
running program. 'portable' is a cross-platform
56+
format).
5657
--optimize[+|-] Enable optimizations (Short form: -O)
5758
--tailcalls[+|-] Enable or disable tailcalls
5859
--crossoptimize[+|-] Enable or disable cross-module optimizations

tests/fsharpqa/Source/CompilerOptions/fsi/exename/help40.437.1033.bsl

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,10 @@ Usage: fsharpi <options> [script.fsx [<arguments>]]
1313
- CODE GENERATION -
1414
--debug[+|-] Emit debug information (Short form: -g)
1515
--debug:{full|pdbonly|portable} Specify debugging type: full, portable, pdbonly.
16-
('full' is the default and enables attaching a
17-
debugger to a running program. 'portable' is a
18-
cross-platform format).
16+
('pdbonly' is the default if no debuggging type
17+
specified and enables attaching a debugger to a
18+
running program. 'portable' is a cross-platform
19+
format).
1920
--optimize[+|-] Enable optimizations (Short form: -O)
2021
--tailcalls[+|-] Enable or disable tailcalls
2122
--crossoptimize[+|-] Enable or disable cross-module optimizations

tests/fsharpqa/Source/CompilerOptions/fsi/help/help-nologo.437.1033.bsl

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,10 @@ Usage: fsi.exe <options> [script.fsx [<arguments>]]
1313
- CODE GENERATION -
1414
--debug[+|-] Emit debug information (Short form: -g)
1515
--debug:{full|pdbonly|portable} Specify debugging type: full, portable, pdbonly.
16-
('full' is the default and enables attaching a
17-
debugger to a running program. 'portable' is a
18-
cross-platform format).
16+
('pdbonly' is the default if no debuggging type
17+
specified and enables attaching a debugger to a
18+
running program. 'portable' is a cross-platform
19+
format).
1920
--optimize[+|-] Enable optimizations (Short form: -O)
2021
--tailcalls[+|-] Enable or disable tailcalls
2122
--crossoptimize[+|-] Enable or disable cross-module optimizations

tests/fsharpqa/Source/CompilerOptions/fsi/help/help.437.1033.bsl

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,10 @@ Usage: fsi.exe <options> [script.fsx [<arguments>]]
1515
- CODE GENERATION -
1616
--debug[+|-] Emit debug information (Short form: -g)
1717
--debug:{full|pdbonly|portable} Specify debugging type: full, portable, pdbonly.
18-
('full' is the default and enables attaching a
19-
debugger to a running program. 'portable' is a
20-
cross-platform format).
18+
('pdbonly' is the default if no debuggging type
19+
specified and enables attaching a debugger to a
20+
running program. 'portable' is a cross-platform
21+
format).
2122
--optimize[+|-] Enable optimizations (Short form: -O)
2223
--tailcalls[+|-] Enable or disable tailcalls
2324
--crossoptimize[+|-] Enable or disable cross-module optimizations

tests/fsharpqa/Source/CompilerOptions/fsi/help/help40-nologo.437.1033.bsl

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,10 @@ Usage: Fsi.exe <options> [script.fsx [<arguments>]]
1313
- CODE GENERATION -
1414
--debug[+|-] Emit debug information (Short form: -g)
1515
--debug:{full|pdbonly|portable} Specify debugging type: full, portable, pdbonly.
16-
('full' is the default and enables attaching a
17-
debugger to a running program. 'portable' is a
18-
cross-platform format).
16+
('pdbonly' is the default if no debuggging type
17+
specified and enables attaching a debugger to a
18+
running program. 'portable' is a cross-platform
19+
format).
1920
--optimize[+|-] Enable optimizations (Short form: -O)
2021
--tailcalls[+|-] Enable or disable tailcalls
2122
--crossoptimize[+|-] Enable or disable cross-module optimizations

tests/fsharpqa/Source/CompilerOptions/fsi/help/help40.437.1033.bsl

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,10 @@ Usage: Fsi.exe <options> [script.fsx [<arguments>]]
1515
- CODE GENERATION -
1616
--debug[+|-] Emit debug information (Short form: -g)
1717
--debug:{full|pdbonly|portable} Specify debugging type: full, portable, pdbonly.
18-
('full' is the default and enables attaching a
19-
debugger to a running program. 'portable' is a
20-
cross-platform format).
18+
('pdbonly' is the default if no debuggging type
19+
specified and enables attaching a debugger to a
20+
running program. 'portable' is a cross-platform
21+
format).
2122
--optimize[+|-] Enable optimizations (Short form: -O)
2223
--tailcalls[+|-] Enable or disable tailcalls
2324
--crossoptimize[+|-] Enable or disable cross-module optimizations

0 commit comments

Comments
 (0)