Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge main to feature/tasks #11082

Merged
merged 3 commits into from
Feb 11, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion NuGet.config
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<add key="dotnet-tools" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json" />
<add key="dotnet5" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet5/nuget/v3/index.json" />
<add key="dotnet5-transport" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet5-transport/nuget/v3/index.json" />
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" />
<add key="dotnet-public" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public/nuget/v3/index.json" />
<add key="vssdk" value="https://pkgs.dev.azure.com/azure-public/vside/_packaging/vssdk/nuget/v3/index.json" />
<add key="vs-impl" value="https://pkgs.dev.azure.com/azure-public/vside/_packaging/vs-impl/nuget/v3/index.json" />
<add key="vs-buildservices" value="https://pkgs.dev.azure.com/azure-public/vside/_packaging/vs-buildservices/nuget/v3/index.json" />
Expand Down
4 changes: 2 additions & 2 deletions eng/Version.Details.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
<ProductDependencies>
</ProductDependencies>
<ToolsetDependencies>
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="6.0.0-beta.21105.5">
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="6.0.0-beta.21105.12">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>fc83e59329203724d4a63c4f6c843be62983a35e</Sha>
<Sha>938b3e8b4edcd96ca0f0cbbae63c87b3f51f7afe</Sha>
</Dependency>
</ToolsetDependencies>
</Dependencies>
2 changes: 1 addition & 1 deletion eng/Versions.props
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
<!-- default package sources -->
<RestoreSources Condition="'$(DotNetBuildOffline)' != 'true'">
$(RestoreSources);
https://api.nuget.org/v3/index.json;
https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public/nuget/v3/index.json;
https://pkgs.dev.azure.com/azure-public/vside/_packaging/vssdk/nuget/v3/index.json;
https://pkgs.dev.azure.com/azure-public/vside/_packaging/vs-impl/nuget/v3/index.json;
<!-- https://pkgs.dev.azure.com/azure-public/vside/_packaging/vs-buildservices/nuget/v3/index.json; --></RestoreSources>
Expand Down
27 changes: 20 additions & 7 deletions eng/common/tools.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -508,7 +508,7 @@ function InitializeBuildTool() {
ExitWithExitCode 1
}
$dotnetPath = Join-Path $dotnetRoot (GetExecutableFileName 'dotnet')
$buildTool = @{ Path = $dotnetPath; Command = 'msbuild'; Tool = 'dotnet'; Framework = 'netcoreapp2.1' }
$buildTool = @{ Path = $dotnetPath; Command = 'msbuild'; Tool = 'dotnet'; Framework = 'netcoreapp3.1' }
} elseif ($msbuildEngine -eq "vs") {
try {
$msbuildPath = InitializeVisualStudioMSBuild -install:$restore
Expand Down Expand Up @@ -644,13 +644,26 @@ function MSBuild() {
}

$toolsetBuildProject = InitializeToolset
$path = Split-Path -parent $toolsetBuildProject
$path = Join-Path $path (Join-Path $buildTool.Framework 'Microsoft.DotNet.ArcadeLogging.dll')
if (-not (Test-Path $path)) {
$path = Split-Path -parent $toolsetBuildProject
$path = Join-Path $path (Join-Path $buildTool.Framework 'Microsoft.DotNet.Arcade.Sdk.dll')
$basePath = Split-Path -parent $toolsetBuildProject
$possiblePaths = @(
# new scripts need to work with old packages, so we need to look for the old names/versions
(Join-Path $basePath (Join-Path $buildTool.Framework 'Microsoft.DotNet.ArcadeLogging.dll')),
(Join-Path $basePath (Join-Path $buildTool.Framework 'Microsoft.DotNet.Arcade.Sdk.dll')),
(Join-Path $basePath (Join-Path netcoreapp2.1 'Microsoft.DotNet.ArcadeLogging.dll')),
(Join-Path $basePath (Join-Path netcoreapp2.1 'Microsoft.DotNet.Arcade.Sdk.dll'))
)
$selectedPath = $null
foreach ($path in $possiblePaths) {
if (Test-Path $path -PathType Leaf) {
$selectedPath = $path
break
}
}
if (-not $selectedPath) {
Write-PipelineTelemetryError -Category 'Build' -Message 'Unable to find arcade sdk logger assembly.'
ExitWithExitCode 1
}
$args += "/logger:$path"
$args += "/logger:$selectedPath"
}

MSBuild-Core @args
Expand Down
23 changes: 18 additions & 5 deletions eng/common/tools.sh
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ function InitializeBuildTool {
# return values
_InitializeBuildTool="$_InitializeDotNetCli/dotnet"
_InitializeBuildToolCommand="msbuild"
_InitializeBuildToolFramework="netcoreapp2.1"
_InitializeBuildToolFramework="netcoreapp3.1"
}

# Set RestoreNoCache as a workaround for https://github.com/NuGet/Home/issues/3116
Expand Down Expand Up @@ -414,11 +414,24 @@ function MSBuild {
fi

local toolset_dir="${_InitializeToolset%/*}"
local logger_path="$toolset_dir/$_InitializeBuildToolFramework/Microsoft.DotNet.ArcadeLogging.dll"
if [[ ! -f $logger_path ]]; then
logger_path="$toolset_dir/$_InitializeBuildToolFramework/Microsoft.DotNet.Arcade.Sdk.dll"
# new scripts need to work with old packages, so we need to look for the old names/versions
local selectedPath=
local possiblePaths=()
possiblePaths+=( "$toolset_dir/$_InitializeBuildToolFramework/Microsoft.DotNet.ArcadeLogging.dll" )
possiblePaths+=( "$toolset_dir/$_InitializeBuildToolFramework/Microsoft.DotNet.Arcade.Sdk.dll" )
possiblePaths+=( "$toolset_dir/netcoreapp2.1/Microsoft.DotNet.ArcadeLogging.dll" )
possiblePaths+=( "$toolset_dir/netcoreapp2.1/Microsoft.DotNet.Arcade.Sdk.dll" )
for path in "${possiblePaths[@]}"; do
if [[ -f $path ]]; then
selectedPath=$path
break
fi
done
if [[ -z "$selectedPath" ]]; then
Write-PipelineTelemetryError -category 'Build' "Unable to find arcade sdk logger assembly."
ExitWithExitCode 1
fi
args=( "${args[@]}" "-logger:$logger_path" )
args+=( "-logger:$selectedPath" )
fi

MSBuild-Core ${args[@]}
Expand Down
2 changes: 1 addition & 1 deletion global.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
}
},
"msbuild-sdks": {
"Microsoft.DotNet.Arcade.Sdk": "6.0.0-beta.21105.5",
"Microsoft.DotNet.Arcade.Sdk": "6.0.0-beta.21105.12",
"Microsoft.DotNet.Helix.Sdk": "2.0.0-beta.19069.2"
}
}
29 changes: 20 additions & 9 deletions src/fsharp/symbols/Symbols.fs
Original file line number Diff line number Diff line change
Expand Up @@ -1715,8 +1715,11 @@ type FSharpMemberOrFunctionOrValue(cenv, d:FSharpMemberOrValData, item) =
member _.IsEventAddMethod =
if isUnresolved() then false else
match d with
| M m when m.LogicalName.StartsWithOrdinal("add_") ->
let eventName = m.LogicalName.[4..]
| M m ->
let logicalName = m.LogicalName
logicalName.Length > 4 && logicalName.StartsWithOrdinal("add_") &&

let eventName = logicalName.[4..]
let entityTy = generalizedTyconRef m.DeclaringTyconRef
not (isNil (cenv.infoReader.GetImmediateIntrinsicEventsOfType (Some eventName, AccessibleFromSomeFSharpCode, range0, entityTy))) ||
let declaringTy = generalizedTyconRef m.DeclaringTyconRef
Expand All @@ -1729,8 +1732,11 @@ type FSharpMemberOrFunctionOrValue(cenv, d:FSharpMemberOrValData, item) =
member _.IsEventRemoveMethod =
if isUnresolved() then false else
match d with
| M m when m.LogicalName.StartsWithOrdinal("remove_") ->
let eventName = m.LogicalName.[7..]
| M m ->
let logicalName = m.LogicalName
logicalName.Length > 4 && logicalName.StartsWithOrdinal("remove_") &&

let eventName = logicalName.[7..]
let entityTy = generalizedTyconRef m.DeclaringTyconRef
not (isNil (cenv.infoReader.GetImmediateIntrinsicEventsOfType (Some eventName, AccessibleFromSomeFSharpCode, range0, entityTy))) ||
let declaringTy = generalizedTyconRef m.DeclaringTyconRef
Expand All @@ -1742,8 +1748,11 @@ type FSharpMemberOrFunctionOrValue(cenv, d:FSharpMemberOrValData, item) =
member _.IsPropertyGetterMethod =
if isUnresolved() then false else
match d with
| M m when m.LogicalName.StartsWithOrdinal("get_") ->
let propName = PrettyNaming.ChopPropertyName(m.LogicalName)
| M m ->
let logicalName = m.LogicalName
logicalName.Length > 4 && logicalName.StartsWithOrdinal("get_") &&

let propName = PrettyNaming.ChopPropertyName(logicalName)
let declaringTy = generalizedTyconRef m.DeclaringTyconRef
not (isNil (GetImmediateIntrinsicPropInfosOfType (Some propName, AccessibleFromSomeFSharpCode) cenv.g cenv.amap range0 declaringTy))
| V v -> v.IsPropertyGetterMethod
Expand All @@ -1752,9 +1761,11 @@ type FSharpMemberOrFunctionOrValue(cenv, d:FSharpMemberOrValData, item) =
member _.IsPropertySetterMethod =
if isUnresolved() then false else
match d with
// Look for a matching property with the right name.
| M m when m.LogicalName.StartsWithOrdinal("set_") ->
let propName = PrettyNaming.ChopPropertyName(m.LogicalName)
| M m ->
let logicalName = m.LogicalName
logicalName.Length > 4 && logicalName.StartsWithOrdinal("set_") &&

let propName = PrettyNaming.ChopPropertyName(logicalName)
let declaringTy = generalizedTyconRef m.DeclaringTyconRef
not (isNil (GetImmediateIntrinsicPropInfosOfType (Some propName, AccessibleFromSomeFSharpCode) cenv.g cenv.amap range0 declaringTy))
| V v -> v.IsPropertySetterMethod
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
<packageSources>
<clear />
<add key="artifacts" value="../artifacts" />
<add key="api.nuget.org" value="https://api.nuget.org/v3/index.json" />
<add key="dotnet-public" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public/nuget/v3/index.json" />
</packageSources>
</configuration>
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
<packageSources>
<clear />
<add key="artifacts" value="../artifacts" />
<add key="api.nuget.org" value="https://api.nuget.org/v3/index.json" />
<add key="dotnet-public" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public/nuget/v3/index.json" />
</packageSources>
</configuration>