Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
dotNET Platform
fsharp
提交
8fd52dc8
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,发现更多精彩内容 >>
未验证
提交
8fd52dc8
编写于
11月 29, 2022
作者:
D
dotnet bot
提交者:
GitHub
11月 29, 2022
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #14405 from dotnet/merges/main-to-release/dev17.5
Merge main to release/dev17.5
上级
5b3d9fd9
629acc24
变更
12
显示空白变更内容
内联
并排
Showing
12 changed file
with
98 addition
and
41 deletion
+98
-41
eng/Version.Details.xml
eng/Version.Details.xml
+4
-4
eng/common/cross/toolchain.cmake
eng/common/cross/toolchain.cmake
+7
-0
eng/common/native/init-compiler.sh
eng/common/native/init-compiler.sh
+2
-2
eng/common/sdk-task.ps1
eng/common/sdk-task.ps1
+1
-1
eng/common/templates/job/publish-build-assets.yml
eng/common/templates/job/publish-build-assets.yml
+1
-6
eng/common/templates/post-build/common-variables.yml
eng/common/templates/post-build/common-variables.yml
+0
-4
eng/common/templates/post-build/post-build.yml
eng/common/templates/post-build/post-build.yml
+0
-6
eng/common/tools.ps1
eng/common/tools.ps1
+3
-2
global.json
global.json
+5
-5
tests/FSharp.Compiler.ComponentTests/FSharpChecker/SymbolUse.fs
...FSharp.Compiler.ComponentTests/FSharpChecker/SymbolUse.fs
+0
-10
vsintegration/src/FSharp.Editor/Hints/InlineTypeHints.fs
vsintegration/src/FSharp.Editor/Hints/InlineTypeHints.fs
+11
-1
vsintegration/tests/FSharp.Editor.Tests/Hints/InlineTypeHintTests.fs
...on/tests/FSharp.Editor.Tests/Hints/InlineTypeHintTests.fs
+64
-0
未找到文件。
eng/Version.Details.xml
浏览文件 @
8fd52dc8
...
...
@@ -8,14 +8,14 @@
</Dependency>
</ProductDependencies>
<ToolsetDependencies>
<Dependency
Name=
"Microsoft.DotNet.Arcade.Sdk"
Version=
"8.0.0-beta.225
54.2
"
>
<Dependency
Name=
"Microsoft.DotNet.Arcade.Sdk"
Version=
"8.0.0-beta.225
78.1
"
>
<Uri>
https://github.com/dotnet/arcade
</Uri>
<Sha>
80b6be47e1425ea90c5febffac119250043a0c9
2
</Sha>
<Sha>
3817f2b38a05c37c950715f84c95d452bcacfe5
2
</Sha>
<SourceBuild
RepoName=
"arcade"
ManagedOnly=
"true"
/>
</Dependency>
<Dependency
Name=
"Microsoft.DotNet.Helix.Sdk"
Version=
"8.0.0-beta.225
54.2
"
>
<Dependency
Name=
"Microsoft.DotNet.Helix.Sdk"
Version=
"8.0.0-beta.225
78.1
"
>
<Uri>
https://github.com/dotnet/arcade
</Uri>
<Sha>
80b6be47e1425ea90c5febffac119250043a0c9
2
</Sha>
<Sha>
3817f2b38a05c37c950715f84c95d452bcacfe5
2
</Sha>
</Dependency>
</ToolsetDependencies>
</Dependencies>
eng/common/cross/toolchain.cmake
浏览文件 @
8fd52dc8
set
(
CROSS_ROOTFS $ENV{ROOTFS_DIR}
)
# reset platform variables (e.g. cmake 3.25 sets LINUX=1)
unset
(
LINUX
)
unset
(
FREEBSD
)
unset
(
ILLUMOS
)
unset
(
ANDROID
)
unset
(
TIZEN
)
set
(
TARGET_ARCH_NAME $ENV{TARGET_BUILD_ARCH}
)
if
(
EXISTS
${
CROSS_ROOTFS
}
/bin/freebsd-version
)
set
(
CMAKE_SYSTEM_NAME FreeBSD
)
...
...
eng/common/native/init-compiler.sh
浏览文件 @
8fd52dc8
...
...
@@ -132,8 +132,8 @@ if [[ -z "$CC" ]]; then
exit
1
fi
# Only lld version >= 9 can be considered stable
if
[[
"
$compiler
"
==
"clang"
&&
"
$majorVersion
"
-ge
9
]]
;
then
# Only lld version >= 9 can be considered stable
. lld doesn't support s390x.
if
[[
"
$compiler
"
==
"clang"
&&
"
$majorVersion
"
-ge
9
&&
"
$build_arch
"
!=
"s390x"
]]
;
then
if
"
$CC
"
-fuse-ld
=
lld
-Wl
,--version
>
/dev/null 2>&1
;
then
LDFLAGS
=
"-fuse-ld=lld"
fi
...
...
eng/common/sdk-task.ps1
浏览文件 @
8fd52dc8
...
...
@@ -64,7 +64,7 @@ try {
$GlobalJson
.
tools
|
Add-Member
-Name
"vs"
-Value
(
ConvertFrom-Json
"{
`"
version
`"
:
`"
16.5
`"
}"
)
-MemberType
NoteProperty
}
if
(
-not
(
$GlobalJson
.
tools
.
PSObject
.
Properties
.
Name
-match
"xcopy-msbuild"
))
{
$GlobalJson
.
tools
|
Add-Member
-Name
"xcopy-msbuild"
-Value
"17.
3
.1"
-MemberType
NoteProperty
$GlobalJson
.
tools
|
Add-Member
-Name
"xcopy-msbuild"
-Value
"17.
4
.1"
-MemberType
NoteProperty
}
if
(
$GlobalJson
.
tools
.
"xcopy-msbuild"
.
Trim
()
-ine
"none"
)
{
$xcopyMSBuildToolsFolder
=
InitializeXCopyMSBuild
$GlobalJson
.
tools
.
"xcopy-msbuild"
-install
$true
...
...
eng/common/templates/job/publish-build-assets.yml
浏览文件 @
8fd52dc8
...
...
@@ -34,6 +34,7 @@ jobs:
-
job
:
Asset_Registry_Publish
dependsOn
:
${{ parameters.dependsOn }}
timeoutInMinutes
:
150
${{ if eq(parameters.publishAssetsImmediately, 'true') }}
:
displayName
:
Publish Assets
...
...
@@ -73,12 +74,6 @@ jobs:
-
task
:
NuGetAuthenticate@0
-
task
:
PowerShell@2
displayName
:
Enable cross-org NuGet feed authentication
inputs
:
filePath
:
$(Build.SourcesDirectory)/eng/common/enable-cross-org-publishing.ps1
arguments
:
-token $(dn-bot-all-orgs-artifact-feeds-rw)
-
task
:
PowerShell@2
displayName
:
Publish Build Assets
inputs
:
...
...
eng/common/templates/post-build/common-variables.yml
浏览文件 @
8fd52dc8
variables
:
-
group
:
AzureDevOps-Artifact-Feeds-Pats
-
group
:
DotNet-Blob-Feed
-
group
:
DotNet-DotNetCli-Storage
-
group
:
DotNet-MSRC-Storage
-
group
:
Publish-Build-Assets
# Whether the build is internal or not
...
...
eng/common/templates/post-build/post-build.yml
浏览文件 @
8fd52dc8
...
...
@@ -172,12 +172,6 @@ stages:
-
task
:
NuGetAuthenticate@0
displayName
:
'
Authenticate
to
AzDO
Feeds'
-
task
:
PowerShell@2
displayName
:
Enable cross-org publishing
inputs
:
filePath
:
eng\common\enable-cross-org-publishing.ps1
arguments
:
-token $(dn-bot-dnceng-artifact-feeds-rw)
# Signing validation will optionally work with the buildmanifest file which is downloaded from
# Azure DevOps above.
-
task
:
PowerShell@2
...
...
eng/common/tools.ps1
浏览文件 @
8fd52dc8
...
...
@@ -365,8 +365,8 @@ function InitializeVisualStudioMSBuild([bool]$install, [object]$vsRequirements =
# If the version of msbuild is going to be xcopied,
# use this version. Version matches a package here:
# https://dev.azure.com/dnceng/public/_packaging?_a=package&feed=dotnet-eng&package=RoslynTools.MSBuild&protocolType=NuGet&version=17.
3.1
view=overview
$defaultXCopyMSBuildVersion
=
'17.
3
.1'
# https://dev.azure.com/dnceng/public/_packaging?_a=package&feed=dotnet-eng&package=RoslynTools.MSBuild&protocolType=NuGet&version=17.
4.1&
view=overview
$defaultXCopyMSBuildVersion
=
'17.
4
.1'
if
(
!
$vsRequirements
)
{
if
(
Get-Member
-InputObject
$GlobalJson
.
tools
-Name
'vs'
)
{
...
...
@@ -413,6 +413,7 @@ function InitializeVisualStudioMSBuild([bool]$install, [object]$vsRequirements =
if
(
$vsMinVersion
-lt
$vsMinVersionReqd
){
Write-Host
"Using xcopy-msbuild version of
$defaultXCopyMSBuildVersion
since VS version
$vsMinVersionStr
provided in global.json is not compatible"
$xcopyMSBuildVersion
=
$defaultXCopyMSBuildVersion
$vsMajorVersion
=
$xcopyMSBuildVersion
.
Split
(
'.'
)[
0
]
}
else
{
# If the VS version IS compatible, look for an xcopy msbuild package
...
...
global.json
浏览文件 @
8fd52dc8
{
"sdk"
:
{
"version"
:
"7.0.100
-rc.2.22477.23
"
,
"version"
:
"7.0.100"
,
"allowPrerelease"
:
true
,
"rollForward"
:
"latestPatch"
},
"tools"
:
{
"dotnet"
:
"7.0.100
-rc.2.22477.23
"
,
"dotnet"
:
"7.0.100"
,
"vs"
:
{
"version"
:
"17.2"
,
"components"
:
[
"Microsoft.VisualStudio.Component.FSharp"
]
},
"xcopy-msbuild"
:
"17.
3
.1"
"xcopy-msbuild"
:
"17.
4
.1"
},
"native-tools"
:
{
"perl"
:
"5.32.1.1"
},
"msbuild-sdks"
:
{
"Microsoft.DotNet.Arcade.Sdk"
:
"8.0.0-beta.225
54.2
"
,
"Microsoft.DotNet.Helix.Sdk"
:
"8.0.0-beta.225
54.2
"
"Microsoft.DotNet.Arcade.Sdk"
:
"8.0.0-beta.225
78.1
"
,
"Microsoft.DotNet.Helix.Sdk"
:
"8.0.0-beta.225
78.1
"
}
}
\ No newline at end of file
tests/FSharp.Compiler.ComponentTests/FSharpChecker/SymbolUse.fs
浏览文件 @
8fd52dc8
...
...
@@ -67,13 +67,3 @@ val f: x: 'a -> TFirstV_1<'a>
// This should be false, because it's also in the signature file
Assert
.
True
(
symbolUse
.
IsPrivateToFile
))
}
[<
Fact
>]
let
``Private function, with signature file``
()
=
SyntheticProject
.
Create
(
{
sourceFile
"First"
[]
with
ExtraSource
=
"let private f3 x = x + 1"
}
|>
addSignatureFile
).
Workflow
{
checkFile
"First"
(
fun
(
typeCheckResult
:
FSharpCheckFileResults
)
->
let
symbolUse
=
typeCheckResult
.
GetSymbolUseAtLocation
(
6
,
14
,
"let private f3 x = x + 1"
,
[
"f3"
])
|>
Option
.
defaultWith
(
fun
()
->
failwith
"no symbol use found"
)
Assert
.
False
(
symbolUse
.
IsPrivateToFile
))
}
\ No newline at end of file
vsintegration/src/FSharp.Editor/Hints/InlineTypeHints.fs
浏览文件 @
8fd52dc8
...
...
@@ -30,6 +30,15 @@ module InlineTypeHints =
Parts
=
getHintParts
symbol
symbolUse
}
let
private
isSolved
(
symbol
:
FSharpMemberOrFunctionOrValue
)
=
if
symbol
.
GenericParameters
.
Count
>
0
then
symbol
.
GenericParameters
|>
Seq
.
forall
(
fun
p
->
p
.
IsSolveAtCompileTime
)
elif
symbol
.
FullType
.
IsGenericParameter
then
symbol
.
FullType
.
GenericParameter
.
DisplayNameCore
<>
"?"
else
true
let
isValidForHint
(
parseFileResults
:
FSharpParseFileResults
)
(
symbol
:
FSharpMemberOrFunctionOrValue
)
...
...
@@ -46,6 +55,7 @@ module InlineTypeHints =
not
symbol
.
IsConstructorThisValue
symbol
.
IsValue
// we'll be adding other stuff gradually here
&&
isSolved
symbol
&&
isNotAnnotatedManually
&&
isNotAfterDot
&&
isNotTypeAlias
...
...
vsintegration/tests/FSharp.Editor.Tests/Hints/InlineTypeHintTests.fs
浏览文件 @
8fd52dc8
...
...
@@ -183,3 +183,67 @@ let zip4 (l1: 'a list) (l2: 'b list) (l3: 'c list) (l4: 'd list) =
let
actual
=
getTypeHints
document
CollectionAssert
.
AreEquivalent
(
expected
,
actual
)
[<
Test
>]
let
``Hints are not shown for unfinished expressions``
()
=
let
code
=
"""
let x
"""
let
document
=
getFsDocument
code
let
result
=
getTypeHints
document
Assert
.
IsEmpty
(
result
)
[<
Test
>]
let
``Hints are not shown for unsolved types in _for_ expressions in collections``
()
=
let
code
=
"""
let _ = [ for x ]
"""
let
document
=
getFsDocument
code
let
result
=
getTypeHints
document
Assert
.
IsEmpty
(
result
)
[<
Test
>]
let
``Hints are not shown for unsolved types in _for_ expressions within computational expressions``
()
=
let
code
=
"""
do task {
for x
do! Task.Delay 0
}
"""
let
document
=
getFsDocument
code
let
result
=
getTypeHints
document
Assert
.
IsEmpty
(
result
)
[<
Test
>]
let
``Hints are shown for IWSAM``
()
=
let
code
=
"""
type IAddition<'T when 'T :> IAddition<'T>> =
static abstract op_Addition: 'T * 'T -> 'T
type Number<'T when IAddition<'T>>(value: 'T) =
member _.Value with get() = value
interface IAddition<Number<'T>> with
static member op_Addition(a, b) = Number(a.Value + b.Value)
"""
let
document
=
getFsDocument
code
let
expected
=
[
{
Content
=
": Number<'T>"
;
Location
=
(
7
,
36
)
}
{
Content
=
": Number<'T>"
;
Location
=
(
7
,
39
)
}
]
let
actual
=
getTypeHints
document
CollectionAssert
.
AreEquivalent
(
expected
,
actual
)
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录