Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
dotNET Platform
fsharp
提交
d3fafb8c
F
fsharp
项目概览
dotNET Platform
/
fsharp
12 个月 前同步成功
通知
0
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
F
fsharp
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
d3fafb8c
编写于
11月 09, 2022
作者:
K
Kevin Ransom (msft)
提交者:
GitHub
11月 09, 2022
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Even more compileroptions (#14253)
* checked * net7.0 * tweak * cliversion * foo
上级
558cca1a
变更
14
隐藏空白更改
内联
并排
Showing
14 changed file
with
213 addition
and
44 deletion
+213
-44
tests/FSharp.Compiler.ComponentTests/CompilerOptions/fsc/checked/UncheckedDefaultOf01.fs
...Tests/CompilerOptions/fsc/checked/UncheckedDefaultOf01.fs
+0
-0
tests/FSharp.Compiler.ComponentTests/CompilerOptions/fsc/checked/checked.fs
...ler.ComponentTests/CompilerOptions/fsc/checked/checked.fs
+171
-0
tests/FSharp.Compiler.ComponentTests/CompilerOptions/fsc/checked/checked01.fs
...r.ComponentTests/CompilerOptions/fsc/checked/checked01.fs
+0
-0
tests/FSharp.Compiler.ComponentTests/CompilerOptions/fsc/checked/unchecked01.fs
...ComponentTests/CompilerOptions/fsc/checked/unchecked01.fs
+0
-0
tests/FSharp.Compiler.ComponentTests/CompilerOptions/fsc/checked/unrecogarg.fs
....ComponentTests/CompilerOptions/fsc/checked/unrecogarg.fs
+0
-0
tests/FSharp.Compiler.ComponentTests/CompilerOptions/fsc/cliversion.fs
...Compiler.ComponentTests/CompilerOptions/fsc/cliversion.fs
+36
-0
tests/FSharp.Compiler.ComponentTests/FSharp.Compiler.ComponentTests.fsproj
...iler.ComponentTests/FSharp.Compiler.ComponentTests.fsproj
+2
-0
tests/FSharp.Test.Utilities/CompilerAssert.fs
tests/FSharp.Test.Utilities/CompilerAssert.fs
+1
-1
tests/FSharp.Test.Utilities/FSharp.Test.Utilities.fsproj
tests/FSharp.Test.Utilities/FSharp.Test.Utilities.fsproj
+1
-1
tests/FSharp.Test.Utilities/Utilities.fs
tests/FSharp.Test.Utilities/Utilities.fs
+2
-4
tests/fsharpqa/Source/CompilerOptions/fsc/checked/env.lst
tests/fsharpqa/Source/CompilerOptions/fsc/checked/env.lst
+0
-29
tests/fsharpqa/Source/CompilerOptions/fsc/cliversion/E_fsc_cliversion.fs
...Source/CompilerOptions/fsc/cliversion/E_fsc_cliversion.fs
+0
-3
tests/fsharpqa/Source/CompilerOptions/fsc/cliversion/E_fsi_cliversion.fs
...Source/CompilerOptions/fsc/cliversion/E_fsi_cliversion.fs
+0
-3
tests/fsharpqa/Source/CompilerOptions/fsc/cliversion/env.lst
tests/fsharpqa/Source/CompilerOptions/fsc/cliversion/env.lst
+0
-3
未找到文件。
tests/
fsharpqa/Source
/CompilerOptions/fsc/checked/UncheckedDefaultOf01.fs
→
tests/
FSharp.Compiler.ComponentTests
/CompilerOptions/fsc/checked/UncheckedDefaultOf01.fs
浏览文件 @
d3fafb8c
文件已移动
tests/FSharp.Compiler.ComponentTests/CompilerOptions/fsc/checked/checked.fs
0 → 100644
浏览文件 @
d3fafb8c
// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information.
namespace
FSharp
.
Compiler
.
ComponentTests
.
CompilerOptions
open
FSharp
.
Test
open
FSharp
.
Test
.
Compiler
open
Xunit
module
Checked
=
// SOURCE=unchecked01.fs # fsc-default
[<
Theory
;
Directory
(__
SOURCE_DIRECTORY__
,
Includes
=[|
"unchecked01.fs"
|])>]
let
``fsc-unchecked - unchecked01.fs``
compilation
=
compilation
|>
asFs
|>
compile
|>
shouldSucceed
// SOURCE=checked01.fs SCFLAGS="--checked" # fsc-checked
[<
Theory
;
Directory
(__
SOURCE_DIRECTORY__
,
Includes
=[|
"unchecked01.fs"
|])>]
let
``fsc-unchecked - unchecked01.fs --checked``
compilation
=
compilation
|>
asFs
|>
withOptions
[
"--checked"
]
|>
compile
|>
shouldSucceed
// SOURCE=checked01.fs SCFLAGS="--checked+" # fsc-checked+
[<
Theory
;
Directory
(__
SOURCE_DIRECTORY__
,
Includes
=[|
"unchecked01.fs"
|])>]
let
``fsc-unchecked - unchecked01.fs --checked+``
compilation
=
compilation
|>
asFs
|>
withOptions
[
"--checked+"
]
|>
compile
|>
shouldSucceed
// SOURCE=unchecked01.fs SCFLAGS="--checked-" # fsc-checked-
[<
Theory
;
Directory
(__
SOURCE_DIRECTORY__
,
Includes
=[|
"unchecked01.fs"
|])>]
let
``fsc-unchecked - unchecked01.fs --checked-``
compilation
=
compilation
|>
asFs
|>
withOptions
[
"--checked-"
]
|>
compile
|>
shouldSucceed
// SOURCE=unchecked01.fs SCFLAGS="--checked-" # fsc-checked-
[<
Theory
;
Directory
(__
SOURCE_DIRECTORY__
,
Includes
=[|
"unchecked01.fs"
|])>]
let
``fsi-unchecked - unchecked01.fs --checked-``
compilation
=
compilation
|>
asFsx
|>
withOptions
[
"--checked-"
]
|>
compile
|>
shouldSucceed
// SOURCE=checked01.fs SCFLAGS="--checked" FSIMODE=EXEC COMPILE_ONLY=1 # fsi-checked
[<
Theory
;
Directory
(__
SOURCE_DIRECTORY__
,
Includes
=[|
"checked01.fs"
|])>]
let
``fsi-checked - checked01.fs --checked``
compilation
=
compilation
|>
asFsx
|>
withOptions
[
"--checked"
]
|>
compile
|>
shouldSucceed
// SOURCE=checked01.fs SCFLAGS="--checked+" FSIMODE=EXEC COMPILE_ONLY=1 # fsi-checked+
[<
Theory
;
Directory
(__
SOURCE_DIRECTORY__
,
Includes
=[|
"checked01.fs"
|])>]
let
``fsi-checked - checked01.fs --checked+``
compilation
=
compilation
|>
asFsx
|>
withOptions
[
"--checked+"
]
|>
compile
|>
shouldSucceed
// SOURCE=checked01.fs SCFLAGS="--checked-" FSIMODE=EXEC COMPILE_ONLY=1 # fsi-checked+
[<
Theory
;
Directory
(__
SOURCE_DIRECTORY__
,
Includes
=[|
"checked01.fs"
|])>]
let
``fsi-checked - checked01.fs --checked-``
compilation
=
compilation
|>
asFsx
|>
withOptions
[
"--checked-"
]
|>
compile
|>
shouldSucceed
//# Last one wins
// SOURCE=checked01.fs SCFLAGS="--checked --checked+" # fsc-checkedchecked+
[<
Theory
;
Directory
(__
SOURCE_DIRECTORY__
,
Includes
=[|
"checked01.fs"
|])>]
let
``fsc-checked - checked01.fs --checked --checked+``
compilation
=
compilation
|>
asFs
|>
withOptions
[
"--checked"
;
"--checked+"
]
|>
compile
|>
shouldSucceed
// SOURCE=checked01.fs SCFLAGS="--checked- --checked+" # fsc-checked-checked+
[<
Theory
;
Directory
(__
SOURCE_DIRECTORY__
,
Includes
=[|
"checked01.fs"
|])>]
let
``fsc-checked - checked01.fs --checked- --checked+``
compilation
=
compilation
|>
asFs
|>
withOptions
[
"--checked-"
;
"--checked+"
]
|>
compile
|>
shouldSucceed
// SOURCE=unchecked01.fs SCFLAGS="--checked+ --checked-" # fsc-checked+checked-
[<
Theory
;
Directory
(__
SOURCE_DIRECTORY__
,
Includes
=[|
"unchecked01.fs"
|])>]
let
``fsc-checked - unchecked01.fs --checked+ --checked-``
compilation
=
compilation
|>
asFs
|>
withOptions
[
"--checked+"
;
"--checked-"
]
|>
compile
|>
shouldSucceed
// SOURCE=checked01.fs SCFLAGS="--checked --checked+" # fsc-checkedchecked+
[<
Theory
;
Directory
(__
SOURCE_DIRECTORY__
,
Includes
=[|
"checked01.fs"
|])>]
let
``fsi-checked - checked01.fs --checked --checked+``
compilation
=
compilation
|>
asFsx
|>
withOptions
[
"--checked"
;
"--checked+"
]
|>
compile
|>
shouldSucceed
// SOURCE=checked01.fs SCFLAGS="--checked- --checked+" # fsc-checked-checked+
[<
Theory
;
Directory
(__
SOURCE_DIRECTORY__
,
Includes
=[|
"checked01.fs"
|])>]
let
``fsi-checked - checked01.fs --checked- --checked+``
compilation
=
compilation
|>
asFsx
|>
withOptions
[
"--checked-"
;
"--checked+"
]
|>
compile
|>
shouldSucceed
// SOURCE=unchecked01.fs SCFLAGS="--checked+ --checked-" # fsc-checked+checked-
[<
Theory
;
Directory
(__
SOURCE_DIRECTORY__
,
Includes
=[|
"unchecked01.fs"
|])>]
let
``fsi-checked - unchecked01.fs --checked+ --checked-``
compilation
=
compilation
|>
asFsx
|>
withOptions
[
"--checked+"
;
"--checked-"
]
|>
compile
|>
shouldSucceed
//# Unrecognized argument
// SOURCE=unrecogarg.fs SCFLAGS="--Checked" # fsc--Checked
[<
Theory
;
Directory
(__
SOURCE_DIRECTORY__
,
Includes
=[|
"unrecogarg.fs"
|])>]
let
``fsc-checked - unchecked01.fs Checked``
compilation
=
compilation
|>
asFs
|>
withOptions
[
"--Checked"
]
|>
compile
|>
shouldFail
|>
withDiagnostics
[
(
Error
243
,
Line
0
,
Col
1
,
Line
0
,
Col
1
,
"Unrecognized option: '--Checked'"
)
]
// SOURCE=unrecogarg.fs SCFLAGS="--checked*" # fsc--checked*
[<
Theory
;
Directory
(__
SOURCE_DIRECTORY__
,
Includes
=[|
"unrecogarg.fs"
|])>]
let
``fsc-checked - unchecked01.fs --checked-star``
compilation
=
compilation
|>
asFs
|>
withOptions
[
"--checked*"
]
|>
compile
|>
shouldFail
|>
withDiagnostics
[
(
Error
243
,
Line
0
,
Col
1
,
Line
0
,
Col
1
,
"Unrecognized option: '--checked*'"
)
]
// SOURCE=unrecogarg.fs SCFLAGS="--checked*" # fsc--checked*
[<
Theory
;
Directory
(__
SOURCE_DIRECTORY__
,
Includes
=[|
"UncheckedDefaultOf01.fs"
|])>]
let
``fsc-checked - UncheckedDefaultOf01``
compilation
=
compilation
|>
asFs
|>
asExe
|>
compile
|>
shouldSucceed
tests/
fsharpqa/Source
/CompilerOptions/fsc/checked/checked01.fs
→
tests/
FSharp.Compiler.ComponentTests
/CompilerOptions/fsc/checked/checked01.fs
浏览文件 @
d3fafb8c
文件已移动
tests/
fsharpqa/Source
/CompilerOptions/fsc/checked/unchecked01.fs
→
tests/
FSharp.Compiler.ComponentTests
/CompilerOptions/fsc/checked/unchecked01.fs
浏览文件 @
d3fafb8c
文件已移动
tests/
fsharpqa/Source
/CompilerOptions/fsc/checked/unrecogarg.fs
→
tests/
FSharp.Compiler.ComponentTests
/CompilerOptions/fsc/checked/unrecogarg.fs
浏览文件 @
d3fafb8c
文件已移动
tests/FSharp.Compiler.ComponentTests/CompilerOptions/fsc/cliversion.fs
0 → 100644
浏览文件 @
d3fafb8c
// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information.
namespace
FSharp
.
Compiler
.
ComponentTests
.
CompilerOptions
open
Xunit
open
FSharp
.
Test
open
FSharp
.
Test
.
Compiler
module
cliversion
=
//# SOURCE=E_fsc_cliversion.fs SCFLAGS="--cliversion:2.0" # fsc --cliversion:2.0
[<
Fact
>]
let
``fsc --cliversion:2.0``
()
=
FSharp
"""
"""
|>
asExe
|>
withOptions
[
"--cliversion:2.0"
]
|>
compile
|>
shouldFail
|>
withDiagnostics
[
(
Error
243
,
Line
0
,
Col
1
,
Line
0
,
Col
1
,
"Unrecognized option: '--cliversion'"
)
]
//# SOURCE=E_fsi_cliversion.fs SCFLAGS="--cliversion:2.0" FSIMODE=EXEC COMPILE_ONLY=1 # fsi --cliversion:2.0
[<
Fact
>]
let
``fsi --cliversion:2.0``
()
=
FSharp
"""
"""
|>
asFsx
|>
withOptions
[
"--cliversion:2.0"
]
|>
compile
|>
shouldFail
|>
withDiagnostics
[
(
Error
243
,
Line
0
,
Col
1
,
Line
0
,
Col
1
,
"Unrecognized option: '--cliversion'"
)
]
tests/FSharp.Compiler.ComponentTests/FSharp.Compiler.ComponentTests.fsproj
浏览文件 @
d3fafb8c
...
...
@@ -185,6 +185,8 @@
<Compile
Include=
"Scripting\Interactive.fs"
/>
<Compile
Include=
"TypeChecks\CheckDeclarationsTests.fs"
/>
<Compile
Include=
"TypeChecks\ParallelCheckingWithSignatureFilesTests.fs"
/>
<Compile
Include=
"CompilerOptions\fsc\checked\checked.fs"
/>
<Compile
Include=
"CompilerOptions\fsc\cliversion.fs"
/>
<Compile
Include=
"CompilerOptions\fsc\langversion.fs"
/>
<Compile
Include=
"CompilerOptions\fsc\noframework\noframework.fs"
/>
<Compile
Include=
"CompilerOptions\fsc\platform\platform.fs"
/>
...
...
tests/FSharp.Test.Utilities/CompilerAssert.fs
浏览文件 @
d3fafb8c
...
...
@@ -565,7 +565,7 @@ module rec CompilerAssertHelpers =
"
tfm
": "
net7
.
0
",
"
framework
": {
"
name
": "
Microsoft
.
NETCore
.
App
",
"
version
": "
6
.
0
"
"
version
": "
7
.
0
"
}
}
}"""
...
...
tests/FSharp.Test.Utilities/FSharp.Test.Utilities.fsproj
浏览文件 @
d3fafb8c
...
...
@@ -87,5 +87,5 @@
<CopyToOutputDirectory>
Always
</CopyToOutputDirectory>
</EmbeddedResource>
</ItemGroup>
<ItemGroup
/>
</Project>
tests/FSharp.Test.Utilities/Utilities.fs
浏览文件 @
d3fafb8c
...
...
@@ -120,7 +120,6 @@ module Utilities =
<TargetFramework>$TARGETFRAMEWORK</TargetFramework>
<UseFSharpPreview>true</UseFSharpPreview>
<DisableImplicitFSharpCoreReference>true</DisableImplicitFSharpCoreReference>
<DotnetFscCompilerPath>$DOTNETFSCCOMPILERPATH</DotnetFscCompilerPath>
</PropertyGroup>
<ItemGroup><Compile Include="
Program
.
fs
" /></ItemGroup>
...
...
@@ -171,7 +170,6 @@ let main argv = 0"""
let
pathToTemp
=
Path
.
Combine
(
pathToArtifacts
,
"Temp"
)
let
projectDirectory
=
Path
.
Combine
(
pathToTemp
,
Guid
.
NewGuid
()
.
ToString
()
+
".tmp"
)
let
pathToFSharpCore
=
typeof
<
RequireQualifiedAccessAttribute
>.
Assembly
.
Location
let
dotNetFscCompilerPath
=
config
.
DOTNETFSCCOMPILERPATH
try
try
Directory
.
CreateDirectory
(
projectDirectory
)
|>
ignore
...
...
@@ -181,9 +179,9 @@ let main argv = 0"""
let
directoryBuildTargetsFileName
=
Path
.
Combine
(
projectDirectory
,
"Directory.Build.targets"
)
let
frameworkReferencesFileName
=
Path
.
Combine
(
projectDirectory
,
"FrameworkReferences.txt"
)
#
if
NETCOREAPP
File
.
WriteAllText
(
projectFileName
,
projectFile
.
Replace
(
"$TARGETFRAMEWORK"
,
"net7.0"
).
Replace
(
"$FSHARPCORELOCATION"
,
pathToFSharpCore
)
.
Replace
(
"$DOTNETFSCCOMPILERPATH"
,
dotNetFscCompilerPath
)
)
File
.
WriteAllText
(
projectFileName
,
projectFile
.
Replace
(
"$TARGETFRAMEWORK"
,
"net7.0"
).
Replace
(
"$FSHARPCORELOCATION"
,
pathToFSharpCore
))
#
else
File
.
WriteAllText
(
projectFileName
,
projectFile
.
Replace
(
"$TARGETFRAMEWORK"
,
"net472"
).
Replace
(
"$FSHARPCORELOCATION"
,
pathToFSharpCore
)
.
Replace
(
"$DOTNETFSCCOMPILERPATH"
,
dotNetFscCompilerPath
)
)
File
.
WriteAllText
(
projectFileName
,
projectFile
.
Replace
(
"$TARGETFRAMEWORK"
,
"net472"
).
Replace
(
"$FSHARPCORELOCATION"
,
pathToFSharpCore
))
#
endif
File
.
WriteAllText
(
programFsFileName
,
programFs
)
File
.
WriteAllText
(
directoryBuildPropsFileName
,
directoryBuildProps
)
...
...
tests/fsharpqa/Source/CompilerOptions/fsc/checked/env.lst
已删除
100644 → 0
浏览文件 @
558cca1a
# Functional:
SOURCE=unchecked01.fs # fsc-default
SOURCE=checked01.fs SCFLAGS="--checked" # fsc-checked
SOURCE=checked01.fs SCFLAGS="--checked+" # fsc-checked+
SOURCE=unchecked01.fs SCFLAGS="--checked-" # fsc-checked-
SOURCE=unchecked01.fs FSIMODE=EXEC COMPILE_ONLY=1 # fsi-default
SOURCE=checked01.fs SCFLAGS="--checked" FSIMODE=EXEC COMPILE_ONLY=1 # fsi-checked
SOURCE=checked01.fs SCFLAGS="--checked+" FSIMODE=EXEC COMPILE_ONLY=1 # fsi-checked+
SOURCE=unchecked01.fs SCFLAGS="--checked-" FSIMODE=EXEC COMPILE_ONLY=1 # fsi-checked-
# Last one wins
SOURCE=checked01.fs SCFLAGS="--checked --checked+" # fsc-checkedchecked+
SOURCE=checked01.fs SCFLAGS="--checked- --checked+" # fsc-checked-checked+
SOURCE=unchecked01.fs SCFLAGS="--checked+ --checked-" # fsc-checked+checked-
SOURCE=checked01.fs SCFLAGS="--checked --checked+" FSIMODE=EXEC COMPILE_ONLY=1 # fsi-checkedchecked+
SOURCE=checked01.fs SCFLAGS="--checked- --checked+" FSIMODE=EXEC COMPILE_ONLY=1 # fsi-checked-checked+
SOURCE=unchecked01.fs SCFLAGS="--checked+ --checked-" FSIMODE=EXEC COMPILE_ONLY=1 # fsi-checked+checked-
# Unrecognized argument
SOURCE=unrecogarg.fs SCFLAGS="--Checked" # fsc--Checked
SOURCE=unrecogarg.fs SCFLAGS="--checked*" # fsc--checked*
SOURCE=unrecogarg.fs SCFLAGS="--Checked" FSIMODE=EXEC COMPILE_ONLY=1 # fsi--Checked
SOURCE=unrecogarg.fs SCFLAGS="--checked*" FSIMODE=EXEC COMPILE_ONLY=1 # fsi--checked*
SOURCE=UncheckedDefaultOf01.fs # UncheckedDefaultOf01
tests/fsharpqa/Source/CompilerOptions/fsc/cliversion/E_fsc_cliversion.fs
已删除
100644 → 0
浏览文件 @
558cca1a
// #Regression #NoMT #CompilerOptions
//<Expects id="FS0243" status="error">Unrecognized option: '--cliversion'</Expects>
exit
0
tests/fsharpqa/Source/CompilerOptions/fsc/cliversion/E_fsi_cliversion.fs
已删除
100644 → 0
浏览文件 @
558cca1a
// #Regression #NoMT #CompilerOptions
//<Expects id="FS0243" status="error">Unrecognized option: '--cliversion'</Expects>
#
q
;;
tests/fsharpqa/Source/CompilerOptions/fsc/cliversion/env.lst
已删除
100644 → 0
浏览文件 @
558cca1a
SOURCE=E_fsc_cliversion.fs SCFLAGS="--cliversion:2.0" # fsc --cliversion:2.0
SOURCE=E_fsi_cliversion.fs SCFLAGS="--cliversion:2.0" FSIMODE=EXEC COMPILE_ONLY=1 # fsi --cliversion:2.0
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录