diff --git a/FSharp.sln b/FSharp.sln
index 094d4302e5c..83933b62da3 100644
--- a/FSharp.sln
+++ b/FSharp.sln
@@ -1,7 +1,7 @@
Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio Version 17
-VisualStudioVersion = 17.1.32113.165
+# Visual Studio Version 18
+VisualStudioVersion = 18.0.11104.47 d18.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "FSharp.Core", "src\FSharp.Core\FSharp.Core.fsproj", "{DED3BBD7-53F4-428A-8C9F-27968E768605}"
EndProject
@@ -166,6 +166,13 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".VisualStudio", ".VisualStu
docs\release-notes\.VisualStudio\17.9.md = docs\release-notes\.VisualStudio\17.9.md
EndProjectSection
EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "eng", "eng", "{79E058E4-79E9-4178-AFA4-A87C45373379}"
+ ProjectSection(SolutionItems) = preProject
+ eng\Version.Details.props = eng\Version.Details.props
+ eng\Version.Details.xml = eng\Version.Details.xml
+ eng\Versions.props = eng\Versions.props
+ EndProjectSection
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
diff --git a/azure-pipelines.yml b/azure-pipelines.yml
index 403f7373f1f..09783884c3f 100644
--- a/azure-pipelines.yml
+++ b/azure-pipelines.yml
@@ -29,11 +29,11 @@ variables:
# The future "product" gets developed in main, so should be main in main.
# When servicing branch gets created, this should maintain the mapping between F# servicing and VS servicing branches
- name: FSharpReleaseBranchName
- value: main
+ value: release/dev18.0
# VS Insertion branch name (NOT the same as F# branch)
# ( for main we insert into VS main and for all *previous* releases we insert into corresponding VS release),
- name: VSInsertionTargetBranchName
- value: main
+ value: rel/d18.0
- name: _TeamName
value: FSharp
- name: TeamName
diff --git a/docs/release-notes/.FSharp.Compiler.Service/11.0.0.md b/docs/release-notes/.FSharp.Compiler.Service/11.0.0.md
new file mode 100644
index 00000000000..8b137891791
--- /dev/null
+++ b/docs/release-notes/.FSharp.Compiler.Service/11.0.0.md
@@ -0,0 +1 @@
+
diff --git a/eng/Version.Details.props b/eng/Version.Details.props
index e0f3350befd..2c5ef89f26d 100644
--- a/eng/Version.Details.props
+++ b/eng/Version.Details.props
@@ -18,7 +18,7 @@ This file should be imported by eng/Versions.props
9.0.0
9.0.0
- 10.0.0-beta.25426.3
+ 10.0.0-beta.25513.2
1.0.0-prerelease.25467.1
1.0.0-prerelease.25467.1
diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml
index 4c2103c42d6..c1f25fac382 100644
--- a/eng/Version.Details.xml
+++ b/eng/Version.Details.xml
@@ -1,6 +1,6 @@
-
+
https://github.com/dotnet/msbuild
@@ -42,11 +42,43 @@
https://github.com/dotnet/runtime
9d5a6a9aa463d6d10b0b0ba6d5982cc82f363dc3
+
+ https://github.com/dotnet/roslyn
+ ebf60fd9876294d15a47407b468709db1b31cc91
+
+
+ https://github.com/dotnet/roslyn
+ ebf60fd9876294d15a47407b468709db1b31cc91
+
+
+ https://github.com/dotnet/roslyn
+ ebf60fd9876294d15a47407b468709db1b31cc91
+
+
+ https://github.com/dotnet/roslyn
+ ebf60fd9876294d15a47407b468709db1b31cc91
+
+
+ https://github.com/dotnet/roslyn
+ ebf60fd9876294d15a47407b468709db1b31cc91
+
+
+ https://github.com/dotnet/roslyn
+ ebf60fd9876294d15a47407b468709db1b31cc91
+
+
+ https://github.com/dotnet/roslyn
+ ebf60fd9876294d15a47407b468709db1b31cc91
+
+
+ https://github.com/dotnet/roslyn
+ ebf60fd9876294d15a47407b468709db1b31cc91
+
-
+
https://github.com/dotnet/arcade
- 5db998e02282e63bc375948a237bcdfef534a5c5
+ e8ca69398033dd1eea35e9667bf857234465de2b
https://dev.azure.com/dnceng/internal/_git/dotnet-optimization
diff --git a/eng/Versions.props b/eng/Versions.props
index 1af06f79f5d..1b84f68b3cd 100644
--- a/eng/Versions.props
+++ b/eng/Versions.props
@@ -94,105 +94,77 @@
4.7.0
1.6.0
- 5.0.0-1.25276.102
- 17.14.188
- 17.14.40268
- 17.14.79
- 17.14.40254
- 17.14.15
+ 18.0.332-preview
+ 18.0.2101-preview.1
+ 18.0.1237-pre
+ 18.0.2077-preview.1
+ 18.0.5
+
- $(RoslynVersion)
- $(RoslynVersion)
- $(RoslynVersion)
- 5.0.0-1.25275.2
- $(RoslynVersion)
- $(RoslynVersion)
- $(RoslynVersion)
- $(RoslynVersion)
+ 5.0.0-2.25480.7
+ 5.0.0-2.25480.7
+ 5.0.0-2.25480.7
+ 5.0.0-2.25480.7
+ 5.0.0-2.25480.7
2.0.28
- $(RoslynVersion)
+
+ 4.14.0
$(MicrosoftVisualStudioShellPackagesVersion)
- $(MicrosoftVisualStudioShellPackagesVersion)
$(VisualStudioShellProjectsPackages)
- $(MicrosoftVisualStudioShellPackagesVersion)
$(MicrosoftVisualStudioShellPackagesVersion)
$(MicrosoftVisualStudioShellPackagesVersion)
$(MicrosoftVisualStudioShellPackagesVersion)
- $(MicrosoftVisualStudioShellPackagesVersion)
$(MicrosoftVisualStudioShellPackagesVersion)
- $(MicrosoftVisualStudioShellPackagesVersion)
$(MicrosoftVisualStudioShellPackagesVersion)
$(MicrosoftVisualStudioShellPackagesVersion)
$(VisualStudioShellProjectsPackages)
- $(VisualStudioShellProjectsPackages)
- $(MicrosoftVisualStudioShellPackagesVersion)
- 17.14.40270
$(MicrosoftVisualStudioShellPackagesVersion)
- 17.14.40270
10.0.30319
11.0.50727
15.0.25123-Dev15Preview
+
- $(VisualStudioEditorPackagesVersion)
$(VisualStudioEditorPackagesVersion)
$(VisualStudioEditorPackagesVersion)
- $(VisualStudioEditorPackagesVersion)
$(VisualStudioEditorPackagesVersion)
$(VisualStudioEditorPackagesVersion)
- $(VisualStudioEditorPackagesVersion)
$(VisualStudioEditorPackagesVersion)
- $(VisualStudioEditorPackagesVersion)
- $(VisualStudioEditorPackagesVersion)
- 17.14.106
5.6.0
- 0.1.169-beta
+ 0.1.800-beta
$(MicrosoftVisualStudioExtensibilityTestingVersion)
- $(MicrosoftVisualStudioExtensibilityTestingVersion)
-
-
+
+
$(MicrosoftVisualStudioThreadingPackagesVersion)
-
+
$(VisualStudioProjectSystemPackagesVersion)
2.3.6152103
-
+
- 17.10.2179
- 17.14.20
+ 17.14.2120
17.0.0
- 17.8.8
- 12.0.4
- 7.0.4
- 8.0.4
- 11.0.4
- 7.0.4
0.2.0
1.0.0
- 1.1.33
+ 1.1.87
0.13.10
2.16.5
- 4.3.0.0
1.0.31
4.3.0-1.22220.8
- 3.1.0
+
5.0.0-preview.7.20364.11
5.0.0-preview.7.20364.11
- 17.11.1
+ 17.14.1
13.0.3
- 1.0.0-beta2-dev3
- 2.22.11
- 2.12.87
2.9.0
- 2.8.2
+ 3.1.4
3.1.17
- 2.2.0
diff --git a/eng/common/SetupNugetSources.ps1 b/eng/common/SetupNugetSources.ps1
index 792b60b49d4..fc8d618014e 100644
--- a/eng/common/SetupNugetSources.ps1
+++ b/eng/common/SetupNugetSources.ps1
@@ -7,7 +7,7 @@
# See example call for this script below.
#
# - task: PowerShell@2
-# displayName: Setup Private Feeds Credentials
+# displayName: Setup internal Feeds Credentials
# condition: eq(variables['Agent.OS'], 'Windows_NT')
# inputs:
# filePath: $(System.DefaultWorkingDirectory)/eng/common/SetupNugetSources.ps1
@@ -34,19 +34,28 @@ Set-StrictMode -Version 2.0
. $PSScriptRoot\tools.ps1
+# Adds or enables the package source with the given name
+function AddOrEnablePackageSource($sources, $disabledPackageSources, $SourceName, $SourceEndPoint, $creds, $Username, $pwd) {
+ if ($disabledPackageSources -eq $null -or -not (EnableInternalPackageSource -DisabledPackageSources $disabledPackageSources -Creds $creds -PackageSourceName $SourceName)) {
+ AddPackageSource -Sources $sources -SourceName $SourceName -SourceEndPoint $SourceEndPoint -Creds $creds -Username $userName -pwd $Password
+ }
+}
+
# Add source entry to PackageSources
function AddPackageSource($sources, $SourceName, $SourceEndPoint, $creds, $Username, $pwd) {
$packageSource = $sources.SelectSingleNode("add[@key='$SourceName']")
if ($packageSource -eq $null)
{
+ Write-Host "Adding package source $SourceName"
+
$packageSource = $doc.CreateElement("add")
$packageSource.SetAttribute("key", $SourceName)
$packageSource.SetAttribute("value", $SourceEndPoint)
$sources.AppendChild($packageSource) | Out-Null
}
else {
- Write-Host "Package source $SourceName already present."
+ Write-Host "Package source $SourceName already present and enabled."
}
AddCredential -Creds $creds -Source $SourceName -Username $Username -pwd $pwd
@@ -59,6 +68,8 @@ function AddCredential($creds, $source, $username, $pwd) {
return;
}
+ Write-Host "Inserting credential for feed: " $source
+
# Looks for credential configuration for the given SourceName. Create it if none is found.
$sourceElement = $creds.SelectSingleNode($Source)
if ($sourceElement -eq $null)
@@ -91,24 +102,27 @@ function AddCredential($creds, $source, $username, $pwd) {
$passwordElement.SetAttribute("value", $pwd)
}
-function InsertMaestroPrivateFeedCredentials($Sources, $Creds, $Username, $pwd) {
- $maestroPrivateSources = $Sources.SelectNodes("add[contains(@key,'darc-int')]")
-
- Write-Host "Inserting credentials for $($maestroPrivateSources.Count) Maestro's private feeds."
-
- ForEach ($PackageSource in $maestroPrivateSources) {
- Write-Host "`tInserting credential for Maestro's feed:" $PackageSource.Key
- AddCredential -Creds $creds -Source $PackageSource.Key -Username $Username -pwd $pwd
+# Enable all darc-int package sources.
+function EnableMaestroInternalPackageSources($DisabledPackageSources, $Creds) {
+ $maestroInternalSources = $DisabledPackageSources.SelectNodes("add[contains(@key,'darc-int')]")
+ ForEach ($DisabledPackageSource in $maestroInternalSources) {
+ EnableInternalPackageSource -DisabledPackageSources $DisabledPackageSources -Creds $Creds -PackageSourceName $DisabledPackageSource.key
}
}
-function EnablePrivatePackageSources($DisabledPackageSources) {
- $maestroPrivateSources = $DisabledPackageSources.SelectNodes("add[contains(@key,'darc-int')]")
- ForEach ($DisabledPackageSource in $maestroPrivateSources) {
- Write-Host "`tEnsuring private source '$($DisabledPackageSource.key)' is enabled by deleting it from disabledPackageSource"
+# Enables an internal package source by name, if found. Returns true if the package source was found and enabled, false otherwise.
+function EnableInternalPackageSource($DisabledPackageSources, $Creds, $PackageSourceName) {
+ $DisabledPackageSource = $DisabledPackageSources.SelectSingleNode("add[@key='$PackageSourceName']")
+ if ($DisabledPackageSource) {
+ Write-Host "Enabling internal source '$($DisabledPackageSource.key)'."
+
# Due to https://github.com/NuGet/Home/issues/10291, we must actually remove the disabled entries
$DisabledPackageSources.RemoveChild($DisabledPackageSource)
+
+ AddCredential -Creds $creds -Source $DisabledPackageSource.Key -Username $userName -pwd $Password
+ return $true
}
+ return $false
}
if (!(Test-Path $ConfigFile -PathType Leaf)) {
@@ -121,15 +135,17 @@ $doc = New-Object System.Xml.XmlDocument
$filename = (Get-Item $ConfigFile).FullName
$doc.Load($filename)
-# Get reference to or create one if none exist already
+# Get reference to - fail if none exist
$sources = $doc.DocumentElement.SelectSingleNode("packageSources")
if ($sources -eq $null) {
- $sources = $doc.CreateElement("packageSources")
- $doc.DocumentElement.AppendChild($sources) | Out-Null
+ Write-PipelineTelemetryError -Category 'Build' -Message "Eng/common/SetupNugetSources.ps1 returned a non-zero exit code. NuGet config file must contain a packageSources section: $ConfigFile"
+ ExitWithExitCode 1
}
$creds = $null
+$feedSuffix = "v3/index.json"
if ($Password) {
+ $feedSuffix = "v2"
# Looks for a node. Create it if none is found.
$creds = $doc.DocumentElement.SelectSingleNode("packageSourceCredentials")
if ($creds -eq $null) {
@@ -138,33 +154,22 @@ if ($Password) {
}
}
+$userName = "dn-bot"
+
# Check for disabledPackageSources; we'll enable any darc-int ones we find there
$disabledSources = $doc.DocumentElement.SelectSingleNode("disabledPackageSources")
if ($disabledSources -ne $null) {
Write-Host "Checking for any darc-int disabled package sources in the disabledPackageSources node"
- EnablePrivatePackageSources -DisabledPackageSources $disabledSources
-}
-
-$userName = "dn-bot"
-
-# Insert credential nodes for Maestro's private feeds
-InsertMaestroPrivateFeedCredentials -Sources $sources -Creds $creds -Username $userName -pwd $Password
-
-# 3.1 uses a different feed url format so it's handled differently here
-$dotnet31Source = $sources.SelectSingleNode("add[@key='dotnet3.1']")
-if ($dotnet31Source -ne $null) {
- AddPackageSource -Sources $sources -SourceName "dotnet3.1-internal" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3.1-internal/nuget/v2" -Creds $creds -Username $userName -pwd $Password
- AddPackageSource -Sources $sources -SourceName "dotnet3.1-internal-transport" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3.1-internal-transport/nuget/v2" -Creds $creds -Username $userName -pwd $Password
+ EnableMaestroInternalPackageSources -DisabledPackageSources $disabledSources -Creds $creds
}
-
-$dotnetVersions = @('5','6','7','8','9')
+$dotnetVersions = @('5','6','7','8','9','10')
foreach ($dotnetVersion in $dotnetVersions) {
$feedPrefix = "dotnet" + $dotnetVersion;
$dotnetSource = $sources.SelectSingleNode("add[@key='$feedPrefix']")
if ($dotnetSource -ne $null) {
- AddPackageSource -Sources $sources -SourceName "$feedPrefix-internal" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/internal/_packaging/$feedPrefix-internal/nuget/v2" -Creds $creds -Username $userName -pwd $Password
- AddPackageSource -Sources $sources -SourceName "$feedPrefix-internal-transport" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/internal/_packaging/$feedPrefix-internal-transport/nuget/v2" -Creds $creds -Username $userName -pwd $Password
+ AddOrEnablePackageSource -Sources $sources -DisabledPackageSources $disabledSources -SourceName "$feedPrefix-internal" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/internal/_packaging/$feedPrefix-internal/nuget/$feedSuffix" -Creds $creds -Username $userName -pwd $Password
+ AddOrEnablePackageSource -Sources $sources -DisabledPackageSources $disabledSources -SourceName "$feedPrefix-internal-transport" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/internal/_packaging/$feedPrefix-internal-transport/nuget/$feedSuffix" -Creds $creds -Username $userName -pwd $Password
}
}
diff --git a/eng/common/SetupNugetSources.sh b/eng/common/SetupNugetSources.sh
index facb415ca6f..b97cc536379 100755
--- a/eng/common/SetupNugetSources.sh
+++ b/eng/common/SetupNugetSources.sh
@@ -52,78 +52,124 @@ if [[ `uname -s` == "Darwin" ]]; then
TB=''
fi
-# Ensure there is a ... section.
-grep -i "" $ConfigFile
-if [ "$?" != "0" ]; then
- echo "Adding ... section."
- ConfigNodeHeader=""
- PackageSourcesTemplate="${TB}${NL}${TB}"
+# Enables an internal package source by name, if found. Returns 0 if found and enabled, 1 if not found.
+EnableInternalPackageSource() {
+ local PackageSourceName="$1"
+
+ # Check if disabledPackageSources section exists
+ grep -i "" "$ConfigFile" > /dev/null
+ if [ "$?" != "0" ]; then
+ return 1 # No disabled sources section
+ fi
+
+ # Check if this source name is disabled
+ grep -i " /dev/null
+ if [ "$?" == "0" ]; then
+ echo "Enabling internal source '$PackageSourceName'."
+ # Remove the disabled entry (including any surrounding comments or whitespace on the same line)
+ sed -i.bak "//d" "$ConfigFile"
+
+ # Add the source name to PackageSources for credential handling
+ PackageSources+=("$PackageSourceName")
+ return 0 # Found and enabled
+ fi
+
+ return 1 # Not found in disabled sources
+}
+
+# Add source entry to PackageSources
+AddPackageSource() {
+ local SourceName="$1"
+ local SourceEndPoint="$2"
+
+ # Check if source already exists
+ grep -i " /dev/null
+ if [ "$?" == "0" ]; then
+ echo "Package source $SourceName already present and enabled."
+ PackageSources+=("$SourceName")
+ return
+ fi
+
+ echo "Adding package source $SourceName"
+ PackageSourcesNodeFooter=""
+ PackageSourceTemplate="${TB}"
+
+ sed -i.bak "s|$PackageSourcesNodeFooter|$PackageSourceTemplate${NL}$PackageSourcesNodeFooter|" "$ConfigFile"
+ PackageSources+=("$SourceName")
+}
+
+# Adds or enables the package source with the given name
+AddOrEnablePackageSource() {
+ local SourceName="$1"
+ local SourceEndPoint="$2"
+
+ # Try to enable if disabled, if not found then add new source
+ EnableInternalPackageSource "$SourceName"
+ if [ "$?" != "0" ]; then
+ AddPackageSource "$SourceName" "$SourceEndPoint"
+ fi
+}
- sed -i.bak "s|$ConfigNodeHeader|$ConfigNodeHeader${NL}$PackageSourcesTemplate|" $ConfigFile
-fi
+# Enable all darc-int package sources
+EnableMaestroInternalPackageSources() {
+ # Check if disabledPackageSources section exists
+ grep -i "" "$ConfigFile" > /dev/null
+ if [ "$?" != "0" ]; then
+ return # No disabled sources section
+ fi
+
+ # Find all darc-int disabled sources
+ local DisabledDarcIntSources=()
+ DisabledDarcIntSources+=$(grep -oh '"darc-int-[^"]*" value="true"' "$ConfigFile" | tr -d '"')
+
+ for DisabledSourceName in ${DisabledDarcIntSources[@]} ; do
+ if [[ $DisabledSourceName == darc-int* ]]; then
+ EnableInternalPackageSource "$DisabledSourceName"
+ fi
+ done
+}
-# Ensure there is a ... section.
-grep -i "" $ConfigFile
+# Ensure there is a ... section.
+grep -i "" $ConfigFile
if [ "$?" != "0" ]; then
- echo "Adding ... section."
-
- PackageSourcesNodeFooter=""
- PackageSourceCredentialsTemplate="${TB}${NL}${TB}"
-
- sed -i.bak "s|$PackageSourcesNodeFooter|$PackageSourcesNodeFooter${NL}$PackageSourceCredentialsTemplate|" $ConfigFile
+ Write-PipelineTelemetryError -Category 'Build' "Error: Eng/common/SetupNugetSources.sh returned a non-zero exit code. NuGet config file must contain a packageSources section: $ConfigFile"
+ ExitWithExitCode 1
fi
PackageSources=()
-# Ensure dotnet3.1-internal and dotnet3.1-internal-transport are in the packageSources if the public dotnet3.1 feeds are present
-grep -i "... section.
+ grep -i "" $ConfigFile
if [ "$?" != "0" ]; then
- echo "Adding dotnet3.1-internal to the packageSources."
- PackageSourcesNodeFooter=""
- PackageSourceTemplate="${TB}"
+ echo "Adding ... section."
- sed -i.bak "s|$PackageSourcesNodeFooter|$PackageSourceTemplate${NL}$PackageSourcesNodeFooter|" $ConfigFile
- fi
- PackageSources+=('dotnet3.1-internal')
-
- grep -i "" $ConfigFile
- if [ "$?" != "0" ]; then
- echo "Adding dotnet3.1-internal-transport to the packageSources."
PackageSourcesNodeFooter=""
- PackageSourceTemplate="${TB}"
+ PackageSourceCredentialsTemplate="${TB}${NL}${TB}"
- sed -i.bak "s|$PackageSourcesNodeFooter|$PackageSourceTemplate${NL}$PackageSourcesNodeFooter|" $ConfigFile
+ sed -i.bak "s|$PackageSourcesNodeFooter|$PackageSourcesNodeFooter${NL}$PackageSourceCredentialsTemplate|" $ConfigFile
fi
- PackageSources+=('dotnet3.1-internal-transport')
fi
-DotNetVersions=('5' '6' '7' '8' '9')
+# Check for disabledPackageSources; we'll enable any darc-int ones we find there
+grep -i "" $ConfigFile > /dev/null
+if [ "$?" == "0" ]; then
+ echo "Checking for any darc-int disabled package sources in the disabledPackageSources node"
+ EnableMaestroInternalPackageSources
+fi
+
+DotNetVersions=('5' '6' '7' '8' '9' '10')
for DotNetVersion in ${DotNetVersions[@]} ; do
FeedPrefix="dotnet${DotNetVersion}";
- grep -i " /dev/null
if [ "$?" == "0" ]; then
- grep -i ""
-
- sed -i.bak "s|$PackageSourcesNodeFooter|$PackageSourceTemplate${NL}$PackageSourcesNodeFooter|" $ConfigFile
- fi
- PackageSources+=("$FeedPrefix-internal")
-
- grep -i "" $ConfigFile
- if [ "$?" != "0" ]; then
- echo "Adding $FeedPrefix-internal-transport to the packageSources."
- PackageSourcesNodeFooter=""
- PackageSourceTemplate="${TB}"
-
- sed -i.bak "s|$PackageSourcesNodeFooter|$PackageSourceTemplate${NL}$PackageSourcesNodeFooter|" $ConfigFile
- fi
- PackageSources+=("$FeedPrefix-internal-transport")
+ AddOrEnablePackageSource "$FeedPrefix-internal" "https://pkgs.dev.azure.com/dnceng/internal/_packaging/$FeedPrefix-internal/nuget/$FeedSuffix"
+ AddOrEnablePackageSource "$FeedPrefix-internal-transport" "https://pkgs.dev.azure.com/dnceng/internal/_packaging/$FeedPrefix-internal-transport/nuget/$FeedSuffix"
fi
done
@@ -139,29 +185,12 @@ if [ "$CredToken" ]; then
# Check if there is no existing credential for this FeedName
grep -i "<$FeedName>" $ConfigFile
if [ "$?" != "0" ]; then
- echo "Adding credentials for $FeedName."
+ echo " Inserting credential for feed: $FeedName"
PackageSourceCredentialsNodeFooter=""
- NewCredential="${TB}${TB}<$FeedName>${NL}${NL}${NL}$FeedName>"
+ NewCredential="${TB}${TB}<$FeedName>${NL}${TB}${NL}${TB}${TB}${NL}${TB}${TB}$FeedName>"
sed -i.bak "s|$PackageSourceCredentialsNodeFooter|$NewCredential${NL}$PackageSourceCredentialsNodeFooter|" $ConfigFile
fi
done
fi
-
-# Re-enable any entries in disabledPackageSources where the feed name contains darc-int
-grep -i "" $ConfigFile
-if [ "$?" == "0" ]; then
- DisabledDarcIntSources=()
- echo "Re-enabling any disabled \"darc-int\" package sources in $ConfigFile"
- DisabledDarcIntSources+=$(grep -oh '"darc-int-[^"]*" value="true"' $ConfigFile | tr -d '"')
- for DisabledSourceName in ${DisabledDarcIntSources[@]} ; do
- if [[ $DisabledSourceName == darc-int* ]]
- then
- OldDisableValue=""
- NewDisableValue=""
- sed -i.bak "s|$OldDisableValue|$NewDisableValue|" $ConfigFile
- echo "Neutralized disablePackageSources entry for '$DisabledSourceName'"
- fi
- done
-fi
diff --git a/eng/common/core-templates/job/publish-build-assets.yml b/eng/common/core-templates/job/publish-build-assets.yml
index 348cd16376f..37dff559fc1 100644
--- a/eng/common/core-templates/job/publish-build-assets.yml
+++ b/eng/common/core-templates/job/publish-build-assets.yml
@@ -40,6 +40,8 @@ parameters:
repositoryAlias: self
+ officialBuildId: ''
+
jobs:
- job: Asset_Registry_Publish
@@ -62,6 +64,11 @@ jobs:
value: false
# unconditional - needed for logs publishing (redactor tool version)
- template: /eng/common/core-templates/post-build/common-variables.yml
+ - name: OfficialBuildId
+ ${{ if ne(parameters.officialBuildId, '') }}:
+ value: ${{ parameters.officialBuildId }}
+ ${{ else }}:
+ value: $(Build.BuildNumber)
pool:
# We don't use the collection uri here because it might vary (.visualstudio.com vs. dev.azure.com)
@@ -124,7 +131,7 @@ jobs:
/p:ManifestsPath='$(Build.StagingDirectory)/AssetManifests'
/p:IsAssetlessBuild=${{ parameters.isAssetlessBuild }}
/p:MaestroApiEndpoint=https://maestro.dot.net
- /p:OfficialBuildId=$(Build.BuildNumber)
+ /p:OfficialBuildId=$(OfficialBuildId)
condition: ${{ parameters.condition }}
continueOnError: ${{ parameters.continueOnError }}
diff --git a/eng/common/core-templates/jobs/jobs.yml b/eng/common/core-templates/jobs/jobs.yml
index b637cb6e948..01ada747665 100644
--- a/eng/common/core-templates/jobs/jobs.yml
+++ b/eng/common/core-templates/jobs/jobs.yml
@@ -44,6 +44,7 @@ parameters:
artifacts: {}
is1ESPipeline: ''
repositoryAlias: self
+ officialBuildId: ''
# Internal resources (telemetry, microbuild) can only be accessed from non-public projects,
# and some (Microbuild) should only be applied to non-PR cases for internal builds.
@@ -116,3 +117,4 @@ jobs:
artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }}
signingValidationAdditionalParameters: ${{ parameters.signingValidationAdditionalParameters }}
repositoryAlias: ${{ parameters.repositoryAlias }}
+ officialBuildId: ${{ parameters.officialBuildId }}
diff --git a/eng/common/post-build/nuget-verification.ps1 b/eng/common/post-build/nuget-verification.ps1
index a365194a938..ac5c69ffcac 100644
--- a/eng/common/post-build/nuget-verification.ps1
+++ b/eng/common/post-build/nuget-verification.ps1
@@ -30,7 +30,7 @@
[CmdletBinding(PositionalBinding = $false)]
param(
[string]$NuGetExePath,
- [string]$PackageSource = "https://api.nuget.org/v3/index.json",
+ [string]$PackageSource = "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public/nuget/v3/index.json",
[string]$DownloadPath,
[Parameter(ValueFromRemainingArguments = $true)]
[string[]]$args
diff --git a/es-metadata.yml b/es-metadata.yml
new file mode 100644
index 00000000000..bcceb48d06c
--- /dev/null
+++ b/es-metadata.yml
@@ -0,0 +1,8 @@
+schemaVersion: 0.0.1
+isProduction: true
+accountableOwners:
+ service: d9a8fd77-4e88-45be-abfa-45268ca1de62
+routing:
+ defaultAreaPath:
+ org: devdiv
+ path: DevDiv\FSharp
diff --git a/global.json b/global.json
index 9904c9b734c..fcfaa76410a 100644
--- a/global.json
+++ b/global.json
@@ -1,6 +1,6 @@
{
"sdk": {
- "version": "10.0.100-rc.1.25411.109",
+ "version": "10.0.100-rc.1.25451.107",
"allowPrerelease": true,
"paths": [
".dotnet",
@@ -9,7 +9,7 @@
"errorMessage": "The .NET SDK could not be found, please run ./eng/common/dotnet.sh."
},
"tools": {
- "dotnet": "10.0.100-rc.1.25411.109",
+ "dotnet": "10.0.100-rc.1.25451.107",
"vs": {
"version": "17.8",
"components": [
@@ -22,7 +22,7 @@
"perl": "5.38.2.2"
},
"msbuild-sdks": {
- "Microsoft.DotNet.Arcade.Sdk": "10.0.0-beta.25426.3",
+ "Microsoft.DotNet.Arcade.Sdk": "10.0.0-beta.25513.2",
"Microsoft.DotNet.Helix.Sdk": "8.0.0-beta.23255.2"
}
}
diff --git a/src/Compiler/Checking/TypeRelations.fs b/src/Compiler/Checking/TypeRelations.fs
index 27274f7ebda..cb71ea87de8 100644
--- a/src/Compiler/Checking/TypeRelations.fs
+++ b/src/Compiler/Checking/TypeRelations.fs
@@ -28,8 +28,12 @@ type CanCoerce =
[]
type TTypeCacheKey =
| TTypeCacheKey of TypeStructure * TypeStructure * CanCoerce
- static member FromStrippedTypes(ty1, ty2, canCoerce) =
- TTypeCacheKey(getTypeStructure ty1, getTypeStructure ty2, canCoerce)
+ static member TryGetFromStrippedTypes(ty1, ty2, canCoerce) =
+ let t1, t2 = getTypeStructure ty1, getTypeStructure ty2
+ if t1.IsPossiblyInfinite || t2.IsPossiblyInfinite then
+ ValueNone
+ else
+ ValueSome (TTypeCacheKey(t1, t2, canCoerce))
let getTypeSubsumptionCache =
let factory (g: TcGlobals) =
@@ -157,8 +161,10 @@ let rec TypeFeasiblySubsumesType ndeep (g: TcGlobals) (amap: ImportMap) m (ty1:
List.exists (TypeFeasiblySubsumesType (ndeep + 1) g amap m ty1 NoCoerce) interfaces
if g.langVersion.SupportsFeature LanguageFeature.UseTypeSubsumptionCache then
- let key = TTypeCacheKey.FromStrippedTypes(ty1, ty2, canCoerce)
- (getTypeSubsumptionCache g).GetOrAdd(key, fun _ -> checkSubsumes ty1 ty2)
+ match TTypeCacheKey.TryGetFromStrippedTypes(ty1, ty2, canCoerce) with
+ | ValueSome key ->
+ (getTypeSubsumptionCache g).GetOrAdd(key, fun _ -> checkSubsumes ty1 ty2)
+ | _ -> checkSubsumes ty1 ty2
else
checkSubsumes ty1 ty2
diff --git a/src/Compiler/Driver/fsc.fs b/src/Compiler/Driver/fsc.fs
index 2bea066e427..89f196c810f 100644
--- a/src/Compiler/Driver/fsc.fs
+++ b/src/Compiler/Driver/fsc.fs
@@ -569,6 +569,7 @@ let main1
exiter.Exit 1
if tcConfig.showTimes then
+ StackGuardMetrics.CaptureStatsAndWriteToConsole() |> disposables.Register
Caches.CacheMetrics.CaptureStatsAndWriteToConsole() |> disposables.Register
Activity.Profiling.addConsoleListener () |> disposables.Register
diff --git a/src/Compiler/Facilities/DiagnosticsLogger.fs b/src/Compiler/Facilities/DiagnosticsLogger.fs
index eb96a5f6e0b..2a087283468 100644
--- a/src/Compiler/Facilities/DiagnosticsLogger.fs
+++ b/src/Compiler/Facilities/DiagnosticsLogger.fs
@@ -16,6 +16,7 @@ open System.Runtime.InteropServices
open Internal.Utilities.Library
open Internal.Utilities.Library.Extras
open System.Threading.Tasks
+open System.Collections.Concurrent
/// Represents the style being used to format errors
[]
@@ -868,6 +869,66 @@ let internal languageFeatureNotSupportedInLibraryError (langFeature: LanguageFea
let suggestedVersionStr = LanguageVersion.GetFeatureVersionString langFeature
error (Error(FSComp.SR.chkFeatureNotSupportedInLibrary (featureStr, suggestedVersionStr), m))
+module StackGuardMetrics =
+
+ let meter = FSharp.Compiler.Diagnostics.Metrics.Meter
+
+ let jumpCounter =
+ meter.CreateCounter(
+ "stackguard-jumps",
+ description = "Tracks the number of times the stack guard has jumped to a new thread"
+ )
+
+ let countJump memberName location =
+ let tags =
+ let mutable tags = TagList()
+ tags.Add(Activity.Tags.callerMemberName, memberName)
+ tags.Add("source", location)
+ tags
+
+ jumpCounter.Add(1L, &tags)
+
+ // Used by the self-listener.
+ let jumpsByFunctionName = ConcurrentDictionary<_, int64 ref>()
+
+ let Listen () =
+ let listener = new Metrics.MeterListener()
+
+ listener.EnableMeasurementEvents jumpCounter
+
+ listener.SetMeasurementEventCallback(fun _ v tags _ ->
+ let memberName = nonNull tags[0].Value :?> string
+ let source = nonNull tags[1].Value :?> string
+ let counter = jumpsByFunctionName.GetOrAdd((memberName, source), fun _ -> ref 0L)
+ Interlocked.Add(counter, v) |> ignore)
+
+ listener.Start()
+ listener :> IDisposable
+
+ let StatsToString () =
+ let headers = [ "caller"; "source"; "jumps" ]
+
+ let data =
+ [
+ for kvp in jumpsByFunctionName do
+ let (memberName, source) = kvp.Key
+ [ memberName; source; string kvp.Value.Value ]
+ ]
+
+ if List.isEmpty data then
+ ""
+ else
+ $"StackGuard jumps:\n{Metrics.printTable headers data}"
+
+ let CaptureStatsAndWriteToConsole () =
+ let listener = Listen()
+
+ { new IDisposable with
+ member _.Dispose() =
+ listener.Dispose()
+ StatsToString() |> printfn "%s"
+ }
+
/// Guard against depth of expression nesting, by moving to new stack when a maximum depth is reached
type StackGuard(maxDepth: int, name: string) =
@@ -882,22 +943,15 @@ type StackGuard(maxDepth: int, name: string) =
[] line: int
) =
- Activity.addEventWithTags
- "DiagnosticsLogger.StackGuard.Guard"
- (seq {
- Activity.Tags.stackGuardName, box name
- Activity.Tags.stackGuardCurrentDepth, depth
- Activity.Tags.stackGuardMaxDepth, maxDepth
- Activity.Tags.callerMemberName, memberName
- Activity.Tags.callerFilePath, path
- Activity.Tags.callerLineNumber, line
- })
-
depth <- depth + 1
try
if depth % maxDepth = 0 then
+ let fileName = System.IO.Path.GetFileName(path)
+
+ StackGuardMetrics.countJump memberName $"{fileName}:{line}"
+
async {
do! Async.SwitchToNewThread()
Thread.CurrentThread.Name <- $"F# Extra Compilation Thread for {name} (depth {depth})"
diff --git a/src/Compiler/Facilities/DiagnosticsLogger.fsi b/src/Compiler/Facilities/DiagnosticsLogger.fsi
index 02471dd383b..7bef3d3a15a 100644
--- a/src/Compiler/Facilities/DiagnosticsLogger.fsi
+++ b/src/Compiler/Facilities/DiagnosticsLogger.fsi
@@ -459,6 +459,11 @@ val tryLanguageFeatureErrorOption:
val languageFeatureNotSupportedInLibraryError: langFeature: LanguageFeature -> m: range -> 'T
+module internal StackGuardMetrics =
+ val Listen: unit -> IDisposable
+ val StatsToString: unit -> string
+ val CaptureStatsAndWriteToConsole: unit -> IDisposable
+
type StackGuard =
new: maxDepth: int * name: string -> StackGuard
diff --git a/src/Compiler/Utilities/Activity.fs b/src/Compiler/Utilities/Activity.fs
index 818d22e6f81..1995e94ad6b 100644
--- a/src/Compiler/Utilities/Activity.fs
+++ b/src/Compiler/Utilities/Activity.fs
@@ -18,6 +18,54 @@ module ActivityNames =
let AllRelevantNames = [| FscSourceName; ProfiledSourceName |]
+module Metrics =
+ let Meter = new Metrics.Meter(ActivityNames.FscSourceName)
+
+ let formatTable headers rows =
+ let columnWidths =
+ headers :: rows
+ |> List.transpose
+ |> List.map (List.map String.length >> List.max)
+
+ let center width (cell: string) =
+ String.replicate ((width - cell.Length) / 2) " " + cell |> _.PadRight(width)
+
+ let headers = (columnWidths, headers) ||> List.map2 center
+
+ let printRow (row: string list) =
+ row
+ |> List.mapi (fun i (cell: string) ->
+ if i = 0 then
+ cell.PadRight(columnWidths[i])
+ else
+ cell.PadLeft(columnWidths[i]))
+ |> String.concat " | "
+ |> sprintf "| %s |"
+
+ let headerRow = printRow headers
+
+ let divider = headerRow |> String.map (fun c -> if c = '|' then c else '-')
+ let hl = String.replicate divider.Length "-"
+
+ use sw = new StringWriter()
+
+ sw.WriteLine hl
+ sw.WriteLine headerRow
+ sw.WriteLine divider
+
+ for row in rows do
+ sw.WriteLine(printRow row)
+
+ sw.WriteLine hl
+
+ string sw
+
+ let printTable headers rows =
+ try
+ formatTable headers rows
+ with exn ->
+ $"Error formatting table: {exn}"
+
[]
module internal Activity =
diff --git a/src/Compiler/Utilities/Activity.fsi b/src/Compiler/Utilities/Activity.fsi
index 83d4b2772ec..8ff0a4c3494 100644
--- a/src/Compiler/Utilities/Activity.fsi
+++ b/src/Compiler/Utilities/Activity.fsi
@@ -2,7 +2,7 @@
namespace FSharp.Compiler.Diagnostics
open System
-open Internal.Utilities.Library
+open System.Diagnostics.Metrics
/// For activities following the dotnet distributed tracing concept
/// https://learn.microsoft.com/dotnet/core/diagnostics/distributed-tracing-concepts?source=recommendations
@@ -16,6 +16,11 @@ module ActivityNames =
val AllRelevantNames: string[]
+module internal Metrics =
+ val Meter: Meter
+
+ val printTable: headers: string list -> rows: string list list -> string
+
/// For activities following the dotnet distributed tracing concept
/// https://learn.microsoft.com/dotnet/core/diagnostics/distributed-tracing-concepts?source=recommendations
[]
diff --git a/src/Compiler/Utilities/Caches.fs b/src/Compiler/Utilities/Caches.fs
index aedc7f7b8e4..cae35a93015 100644
--- a/src/Compiler/Utilities/Caches.fs
+++ b/src/Compiler/Utilities/Caches.fs
@@ -10,7 +10,7 @@ open System.Diagnostics.Metrics
open System.IO
module CacheMetrics =
- let Meter = new Meter("FSharp.Compiler.Cache")
+ let Meter = FSharp.Compiler.Diagnostics.Metrics.Meter
let adds = Meter.CreateCounter("adds", "count")
let updates = Meter.CreateCounter("updates", "count")
let hits = Meter.CreateCounter("hits", "count")
@@ -96,43 +96,24 @@ module CacheMetrics =
listener :> IDisposable
let StatsToString () =
- use sw = new StringWriter()
-
- let nameColumnWidth =
- [ yield! statsByName.Keys; "Cache name" ] |> Seq.map String.length |> Seq.max
-
- let columns = allCounters |> List.map _.Name
- let columnWidths = columns |> List.map String.length |> List.map (max 8)
-
- let header =
- "| "
- + String.concat
- " | "
- [
- "Cache name".PadRight nameColumnWidth
- "hit-ratio"
- for w, c in (columnWidths, columns) ||> List.zip do
- $"{c.PadLeft w}"
- ]
- + " |"
-
- sw.WriteLine(String('-', header.Length))
- sw.WriteLine(header)
- sw.WriteLine(header |> String.map (fun c -> if c = '|' then '|' else '-'))
-
- for kv in statsByName do
- let name = kv.Key
- let stats = kv.Value
- let totals = stats.GetTotals()
- sw.Write $"| {name.PadLeft nameColumnWidth} | {stats.Ratio, 9:P2} |"
-
- for w, c in (columnWidths, columns) ||> List.zip do
- sw.Write $" {totals[c].ToString().PadLeft(w)} |"
-
- sw.WriteLine()
-
- sw.WriteLine(String('-', header.Length))
- string sw
+ let headers = [ "Cache name"; "hit-ratio" ] @ (allCounters |> List.map _.Name)
+
+ let rows =
+ [
+ for kv in statsByName do
+ let name = kv.Key
+ let stats = kv.Value
+ let totals = stats.GetTotals()
+
+ [
+ yield name
+ yield $"{stats.Ratio:P2}"
+ for c in allCounters do
+ yield $"{totals[c.Name]}"
+ ]
+ ]
+
+ FSharp.Compiler.Diagnostics.Metrics.printTable headers rows
let CaptureStatsAndWriteToConsole () =
let listener = ListenToAll()
diff --git a/src/Compiler/Utilities/TypeHashing.fs b/src/Compiler/Utilities/TypeHashing.fs
index af536a9d2b6..8e3752d5d33 100644
--- a/src/Compiler/Utilities/TypeHashing.fs
+++ b/src/Compiler/Utilities/TypeHashing.fs
@@ -401,7 +401,9 @@ module StructuralUtilities =
| MeasureRational of int * int
| NeverEqual of never: NeverEqual
- type TypeStructure = TypeStructure of ImmutableArray
+ type TypeStructure =
+ | TypeStructure of TypeToken[]
+ | PossiblyInfinite of never: NeverEqual
let inline toNullnessToken (n: Nullness) =
match n.TryEvaluate() with
@@ -464,6 +466,15 @@ module StructuralUtilities =
| TType_measure m -> yield! accumulateMeasure m
}
+ // If the sequence got too long, just drop it, we could be dealing with an infinite type.
+ let private toTypeStructure tokens =
+ let tokens = tokens |> Seq.truncate 256 |> Array.ofSeq
+
+ if tokens.Length = 256 then
+ PossiblyInfinite NeverEqual.Singleton
+ else
+ TypeStructure tokens
+
/// Get the full structure of a type as a sequence of tokens, suitable for equality
let getTypeStructure =
- Extras.WeakMap.getOrCreate (fun ty -> accumulateTType ty |> ImmutableArray.ofSeq |> TypeStructure)
+ Extras.WeakMap.getOrCreate (fun ty -> accumulateTType ty |> toTypeStructure)
diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TryCatch/StackOverflowRepro.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TryCatch/StackOverflowRepro.fs
index 310a6615aba..22f501c4f85 100644
--- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TryCatch/StackOverflowRepro.fs
+++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TryCatch/StackOverflowRepro.fs
@@ -31,4 +31,4 @@ let main (args:string[]) =
with
| ex ->
printf "%s" (ex.GetType().ToString())
- 0
\ No newline at end of file
+ 0
diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TryCatch/TryCatch.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TryCatch/TryCatch.fs
index bc3efb3cae2..b13739fa603 100644
--- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TryCatch/TryCatch.fs
+++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TryCatch/TryCatch.fs
@@ -63,8 +63,9 @@ module TryCatch =
let fsharpCoreFile = typeof>.Assembly.Location
File.Copy(fsharpCoreFile, Path.Combine(Path.GetDirectoryName(dllFile), Path.GetFileName(fsharpCoreFile)), true)
let result = CompilerAssert.ExecuteAndReturnResult (dllFile, isFsx=false, deps = s.Dependencies, newProcess=true)
+ printfn "%A" result
- Assert.True(result.StdErr.Contains "stack overflow" || result.StdErr.Contains "StackOverflow")
+ Assert.True(result.StdErr.Contains "stack overflow" || result.StdErr.Contains "StackOverflow", result.StdErr)
| _ -> failwith (sprintf "%A" compilationResult)
diff --git a/tests/FSharp.Test.Utilities/FSharp.Test.Utilities.fsproj b/tests/FSharp.Test.Utilities/FSharp.Test.Utilities.fsproj
index 484f8acfbb0..c1aebde1ed3 100644
--- a/tests/FSharp.Test.Utilities/FSharp.Test.Utilities.fsproj
+++ b/tests/FSharp.Test.Utilities/FSharp.Test.Utilities.fsproj
@@ -5,7 +5,6 @@
$(FSharpNetCoreProductTargetFramework)
win-x86;win-x64;linux-x64;osx-x64
$(AssetTargetFallback);portable-net45+win8+wp8+wpa81
- true
Library
true
xunit
@@ -69,8 +68,22 @@
-
-
+
+ runtime; native
+ all
+
+
+ runtime; native
+ all
+
+
+ runtime; native
+ all
+
+
+ all
+ runtime; build; native; contentfiles; analyzers; buildtransitive
+
@@ -83,8 +96,6 @@
-
-
@@ -92,17 +103,10 @@
$(NoWarn);NU1510
-
-
-
-
- all
- runtime; build; native; contentfiles; analyzers; buildtransitive
-
-
-
+
+
+
-
diff --git a/tests/FSharp.Test.Utilities/TestFramework.fs b/tests/FSharp.Test.Utilities/TestFramework.fs
index bbb1b556746..72dbfa46f3d 100644
--- a/tests/FSharp.Test.Utilities/TestFramework.fs
+++ b/tests/FSharp.Test.Utilities/TestFramework.fs
@@ -6,6 +6,7 @@ open System
open System.IO
open System.Diagnostics
open System.Reflection
+open System.Xml.Linq
open Scripting
open Xunit
open FSharp.Compiler.IO
@@ -269,8 +270,31 @@ let requireFile dir path =
| Some _ -> fullPathLower
| None -> failwith (sprintf "Couldn't find \"%s\" on the following paths: \"%s\", \"%s\". Running 'build test' once might solve this issue" path fullPath fullPathLower)
+let SCRIPT_ROOT = __SOURCE_DIRECTORY__
+let repoRoot = SCRIPT_ROOT ++ ".." ++ ".."
+
+let loadVersionsProps () =
+ let versionsPropsPath = repoRoot ++ "eng" ++ "Versions.props"
+ if not (File.Exists versionsPropsPath) then
+ failwithf "Versions.props file not found at %s" versionsPropsPath
+ XDocument.Load(versionsPropsPath)
+
+let getMsbuildPropValue (xdoc: XDocument) (propName: string) =
+ xdoc.Descendants "PropertyGroup"
+ |> Seq.collect (fun pg -> pg.Elements())
+ |> Seq.tryFind (fun el -> el.Name.LocalName = propName)
+ |> function
+ | Some el -> el.Value
+ | None -> failwithf "Property '%s' not found in Versions.props" propName
+
+// Usage example:
+let versionsPropsDoc = loadVersionsProps ()
+let cscVersion = getMsbuildPropValue versionsPropsDoc "MicrosoftNetCompilersVersion"
+let ildasmVersion = getMsbuildPropValue versionsPropsDoc "MicrosoftNETCoreILDAsmVersion"
+let ilasmVersion = getMsbuildPropValue versionsPropsDoc "MicrosoftNETCoreILAsmVersion"
+
let config configurationName envVars =
- let SCRIPT_ROOT = __SOURCE_DIRECTORY__
+
let fsharpCoreArchitecture = "netstandard2.0"
let fsharpBuildArchitecture = "netstandard2.0"
let fsharpCompilerInteractiveSettingsArchitecture = "netstandard2.0"
@@ -284,10 +308,8 @@ let config configurationName envVars =
let fsiArchitecture = dotnetArchitecture
//let peverifyArchitecture = dotnetArchitecture
#endif
- let repoRoot = SCRIPT_ROOT ++ ".." ++ ".."
let artifactsPath = repoRoot ++ "artifacts"
let artifactsBinPath = artifactsPath ++ "bin"
- let coreClrRuntimePackageVersion = "5.0.0-preview.7.20364.11"
let csc_flags = "/nologo"
let vbc_flags = "/nologo"
let fsc_flags = "-r:System.Core.dll --nowarn:20 --define:COMPILED --preferreduilang:en-US"
@@ -298,12 +320,12 @@ let config configurationName envVars =
let packagesDir = getPackagesDir ()
let requirePackage = requireFile packagesDir
let requireArtifact = requireFile artifactsBinPath
- let CSC = requirePackage ("Microsoft.Net.Compilers" ++ "4.3.0-1.22220.8" ++ "tools" ++ "csc.exe")
- let VBC = requirePackage ("Microsoft.Net.Compilers" ++ "4.3.0-1.22220.8" ++ "tools" ++ "vbc.exe")
+ let CSC = requirePackage ("Microsoft.Net.Compilers" ++ cscVersion ++ "tools" ++ "csc.exe")
+ let VBC = requirePackage ("Microsoft.Net.Compilers" ++ cscVersion ++ "tools" ++ "vbc.exe")
let ILDASM_EXE = if operatingSystem = "win" then "ildasm.exe" else "ildasm"
- let ILDASM = requirePackage (("runtime." + operatingSystem + "-" + architectureMoniker + ".Microsoft.NETCore.ILDAsm") ++ coreClrRuntimePackageVersion ++ "runtimes" ++ (operatingSystem + "-" + architectureMoniker) ++ "native" ++ ILDASM_EXE)
+ let ILDASM = requirePackage (("runtime." + operatingSystem + "-" + architectureMoniker + ".Microsoft.NETCore.ILDAsm") ++ ildasmVersion ++ "runtimes" ++ (operatingSystem + "-" + architectureMoniker) ++ "native" ++ ILDASM_EXE)
let ILASM_EXE = if operatingSystem = "win" then "ilasm.exe" else "ilasm"
- let ILASM = requirePackage (("runtime." + operatingSystem + "-" + architectureMoniker + ".Microsoft.NETCore.ILAsm") ++ coreClrRuntimePackageVersion ++ "runtimes" ++ (operatingSystem + "-" + architectureMoniker) ++ "native" ++ ILASM_EXE)
+ let ILASM = requirePackage (("runtime." + operatingSystem + "-" + architectureMoniker + ".Microsoft.NETCore.ILAsm") ++ ilasmVersion ++ "runtimes" ++ (operatingSystem + "-" + architectureMoniker) ++ "native" ++ ILASM_EXE)
//let PEVERIFY_EXE = if operatingSystem = "win" then "PEVerify.exe" elif operatingSystem = "osx" then "PEVerify.dll" else "PEVerify"
let PEVERIFY = "ilverify" //requireArtifact ("PEVerify" ++ configurationName ++ peverifyArchitecture ++ PEVERIFY_EXE)
// let FSI_FOR_SCRIPTS = artifactsBinPath ++ "fsi" ++ configurationName ++ fsiArchitecture ++ "fsi.exe"
diff --git a/tests/FSharp.Test.Utilities/XunitHelpers.fs b/tests/FSharp.Test.Utilities/XunitHelpers.fs
index 5365a243946..562ae04ce9b 100644
--- a/tests/FSharp.Test.Utilities/XunitHelpers.fs
+++ b/tests/FSharp.Test.Utilities/XunitHelpers.fs
@@ -77,13 +77,23 @@ module TestCaseCustomizations =
let oldTestClass = oldTestMethod.TestClass
let oldTestCollection = oldTestMethod.TestClass.TestCollection
+ // Create a DETERMINISTIC collection ID based on the test case's unique ID
+ // This ensures the same test case always gets the same collection ID
+ let collectionId =
+ use sha = System.Security.Cryptography.SHA256.Create()
+ let bytes = System.Text.Encoding.UTF8.GetBytes(testCase.UniqueID)
+ let hash = sha.ComputeHash(bytes)
+ System.Guid(hash.[0..15]) // Take first 16 bytes for GUID
+
+ let newDisplayName = $"{oldTestCollection.DisplayName}_{collectionId:N}"
+
// Create a new collection with a unique id for the test case.
let newTestCollection =
new TestCollection(
oldTestCollection.TestAssembly,
oldTestCollection.CollectionDefinition,
- oldTestCollection.DisplayName,
- Guid.NewGuid()
+ newDisplayName,
+ collectionId
)
let newTestClass = new TestClass(newTestCollection, oldTestClass.Class)
@@ -175,7 +185,7 @@ type OpenTelemetryExport(testRunName, enable) =
// Configure OpenTelemetry metrics export. Metrics can be viewed in Prometheus or other compatible tools.
OpenTelemetry.Sdk.CreateMeterProviderBuilder()
- .AddMeter(CacheMetrics.Meter.Name)
+ .AddMeter(ActivityNames.FscSourceName)
.AddMeter("System.Runtime")
.ConfigureResource(fun r -> r.AddService(testRunName) |> ignore)
.AddOtlpExporter(fun e m ->
diff --git a/tests/fsharp/Compiler/Language/OptionalInteropTests.fs b/tests/fsharp/Compiler/Language/OptionalInteropTests.fs
index 17f22bbe378..868d46de779 100644
--- a/tests/fsharp/Compiler/Language/OptionalInteropTests.fs
+++ b/tests/fsharp/Compiler/Language/OptionalInteropTests.fs
@@ -2,6 +2,7 @@
namespace FSharp.Compiler.UnitTests
+open System
open System.Collections.Immutable
open Xunit
open FSharp.Test
diff --git a/tests/fsharp/FSharpSuite.Tests.fsproj b/tests/fsharp/FSharpSuite.Tests.fsproj
index b4540de0b33..d1b45048e75 100644
--- a/tests/fsharp/FSharpSuite.Tests.fsproj
+++ b/tests/fsharp/FSharpSuite.Tests.fsproj
@@ -2,11 +2,10 @@
- net472;$(FSharpNetCoreProductTargetFramework)
+ net472;$(FSharpNetCoreProductTargetFramework)
$(FSharpNetCoreProductTargetFramework)
win-x86;win-x64
$(AssetTargetFallback);portable-net45+win8+wp8+wpa81
- true
Library
true
false
@@ -112,27 +111,9 @@
-
+
false
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/vsintegration/Vsix/VisualFSharpFull/VisualFSharpDebug.csproj b/vsintegration/Vsix/VisualFSharpFull/VisualFSharpDebug.csproj
index 96fd6dc836d..5a6671c4d24 100644
--- a/vsintegration/Vsix/VisualFSharpFull/VisualFSharpDebug.csproj
+++ b/vsintegration/Vsix/VisualFSharpFull/VisualFSharpDebug.csproj
@@ -8,7 +8,9 @@
netcoreapp1.0
true
net472
- true
+ true
+ false
+ true
diff --git a/vsintegration/Vsix/VisualFSharpFull/VisualFSharpFull.csproj b/vsintegration/Vsix/VisualFSharpFull/VisualFSharpFull.csproj
index 10c18b8530e..49f1cc33ab6 100644
--- a/vsintegration/Vsix/VisualFSharpFull/VisualFSharpFull.csproj
+++ b/vsintegration/Vsix/VisualFSharpFull/VisualFSharpFull.csproj
@@ -9,7 +9,9 @@
true
net472
- false
+ false
+ false
+ true
diff --git a/vsintegration/src/FSharp.Editor/Common/DebugHelpers.fs b/vsintegration/src/FSharp.Editor/Common/DebugHelpers.fs
index 51cdd83f8fa..fa8303b7e60 100644
--- a/vsintegration/src/FSharp.Editor/Common/DebugHelpers.fs
+++ b/vsintegration/src/FSharp.Editor/Common/DebugHelpers.fs
@@ -120,13 +120,15 @@ module FSharpServiceTelemetry =
ActivitySource.AddActivityListener(listener)
- let periodicallyDisplayCacheStats =
+ let periodicallyDisplayMetrics =
cancellableTask {
use _ = CacheMetrics.ListenToAll()
+ use _ = FSharp.Compiler.DiagnosticsLogger.StackGuardMetrics.Listen()
while true do
do! Task.Delay(TimeSpan.FromSeconds 10.0)
FSharpOutputPane.logMsg (CacheMetrics.StatsToString())
+ FSharpOutputPane.logMsg (FSharp.Compiler.DiagnosticsLogger.StackGuardMetrics.StatsToString())
}
#if DEBUG
diff --git a/vsintegration/src/FSharp.Editor/FSharp.Editor.fsproj b/vsintegration/src/FSharp.Editor/FSharp.Editor.fsproj
index 963332abc3c..26621fac1e6 100644
--- a/vsintegration/src/FSharp.Editor/FSharp.Editor.fsproj
+++ b/vsintegration/src/FSharp.Editor/FSharp.Editor.fsproj
@@ -170,36 +170,17 @@
+
-
-
-
-
+
-
-
-
-
-
-
-
-
-
+
-
-
-
-
-
-
-
-
-
-
+
diff --git a/vsintegration/src/FSharp.Editor/LanguageService/LanguageService.fs b/vsintegration/src/FSharp.Editor/LanguageService/LanguageService.fs
index 92b6979883a..cfb90fc9c37 100644
--- a/vsintegration/src/FSharp.Editor/LanguageService/LanguageService.fs
+++ b/vsintegration/src/FSharp.Editor/LanguageService/LanguageService.fs
@@ -26,6 +26,7 @@ open Microsoft.CodeAnalysis.Host.Mef
open Microsoft.VisualStudio.FSharp.Editor.Telemetry
open CancellableTasks
open FSharp.Compiler.Text
+open Microsoft.VisualStudio.Editor
#nowarn "9" // NativePtr.toNativeInt
#nowarn "57" // Experimental stuff
@@ -417,7 +418,7 @@ type internal FSharpPackage() as this =
false,
fun _ _ ->
task {
- DebugHelpers.FSharpServiceTelemetry.periodicallyDisplayCacheStats
+ DebugHelpers.FSharpServiceTelemetry.periodicallyDisplayMetrics
|> CancellableTask.start this.DisposalToken
|> ignore
}
@@ -461,11 +462,13 @@ type internal FSharpLanguageService(package: FSharpPackage) =
let outliningManagerService =
this.Package.ComponentModel.GetService()
- let wpfTextView = this.EditorAdaptersFactoryService.GetWpfTextView(textView)
+ let wpfTextView =
+ this.Package.ComponentModel.GetService().GetWpfTextView(textView)
+
let outliningManager = outliningManagerService.GetOutliningManager(wpfTextView)
if not (isNull outliningManager) then
- let settings = this.Workspace.Services.GetService()
+ let settings = this.Workspace.Value.Services.GetService()
outliningManager.Enabled <- settings.Advanced.IsOutliningEnabled
[]
diff --git a/vsintegration/src/FSharp.LanguageService.Base/FSharp.LanguageService.Base.csproj b/vsintegration/src/FSharp.LanguageService.Base/FSharp.LanguageService.Base.csproj
index fead6828567..fbf420a0741 100644
--- a/vsintegration/src/FSharp.LanguageService.Base/FSharp.LanguageService.Base.csproj
+++ b/vsintegration/src/FSharp.LanguageService.Base/FSharp.LanguageService.Base.csproj
@@ -46,16 +46,9 @@
-
-
-
-
-
-
-
diff --git a/vsintegration/src/FSharp.LanguageService/FSharp.LanguageService.fsproj b/vsintegration/src/FSharp.LanguageService/FSharp.LanguageService.fsproj
index 9968c121f7c..0d948cc586b 100644
--- a/vsintegration/src/FSharp.LanguageService/FSharp.LanguageService.fsproj
+++ b/vsintegration/src/FSharp.LanguageService/FSharp.LanguageService.fsproj
@@ -56,24 +56,15 @@
-
-
-
-
-
-
-
-
-
diff --git a/vsintegration/src/FSharp.LanguageService/ProjectSitesAndFiles.fs b/vsintegration/src/FSharp.LanguageService/ProjectSitesAndFiles.fs
index b2a437dc99f..39fe59fc933 100644
--- a/vsintegration/src/FSharp.LanguageService/ProjectSitesAndFiles.fs
+++ b/vsintegration/src/FSharp.LanguageService/ProjectSitesAndFiles.fs
@@ -34,7 +34,6 @@ module internal rec Microsoft.VisualStudio.FSharp.LanguageService.SiteProvider
open System
open System.Collections.Concurrent
-open System.ComponentModel.Composition
open System.IO
open System.Diagnostics
open Microsoft.VisualStudio
diff --git a/vsintegration/src/FSharp.ProjectSystem.Base/FSharp.ProjectSystem.Base.csproj b/vsintegration/src/FSharp.ProjectSystem.Base/FSharp.ProjectSystem.Base.csproj
index c5608f1a6b6..be6eb82d080 100644
--- a/vsintegration/src/FSharp.ProjectSystem.Base/FSharp.ProjectSystem.Base.csproj
+++ b/vsintegration/src/FSharp.ProjectSystem.Base/FSharp.ProjectSystem.Base.csproj
@@ -40,22 +40,10 @@
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/vsintegration/src/FSharp.ProjectSystem.FSharp/FSharp.ProjectSystem.FSharp.fsproj b/vsintegration/src/FSharp.ProjectSystem.FSharp/FSharp.ProjectSystem.FSharp.fsproj
index 576dc2aa464..da59e918292 100644
--- a/vsintegration/src/FSharp.ProjectSystem.FSharp/FSharp.ProjectSystem.FSharp.fsproj
+++ b/vsintegration/src/FSharp.ProjectSystem.FSharp/FSharp.ProjectSystem.FSharp.fsproj
@@ -104,23 +104,12 @@
-
-
-
-
-
-
-
-
-
-
-
-
+
diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/FSharp.ProjectSystem.PropertyPages.vbproj b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/FSharp.ProjectSystem.PropertyPages.vbproj
index 91418865d89..e964555f55f 100644
--- a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/FSharp.ProjectSystem.PropertyPages.vbproj
+++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/FSharp.ProjectSystem.PropertyPages.vbproj
@@ -46,15 +46,9 @@
-
-
-
-
-
-
diff --git a/vsintegration/src/FSharp.VS.FSI/FSharp.VS.FSI.fsproj b/vsintegration/src/FSharp.VS.FSI/FSharp.VS.FSI.fsproj
index 0171cdf9b26..2478700de2d 100644
--- a/vsintegration/src/FSharp.VS.FSI/FSharp.VS.FSI.fsproj
+++ b/vsintegration/src/FSharp.VS.FSI/FSharp.VS.FSI.fsproj
@@ -19,7 +19,7 @@
-
+
@@ -57,18 +57,9 @@
-
-
-
-
-
-
-
-
-
diff --git a/vsintegration/tests/FSharp.Editor.Tests/FSharp.Editor.Tests.fsproj b/vsintegration/tests/FSharp.Editor.Tests/FSharp.Editor.Tests.fsproj
index c084fc6f06a..1625be60b9a 100644
--- a/vsintegration/tests/FSharp.Editor.Tests/FSharp.Editor.Tests.fsproj
+++ b/vsintegration/tests/FSharp.Editor.Tests/FSharp.Editor.Tests.fsproj
@@ -95,12 +95,12 @@
-
-
-
+
+
+
+
-
diff --git a/vsintegration/tests/Salsa/VisualFSharp.Salsa.fsproj b/vsintegration/tests/Salsa/VisualFSharp.Salsa.fsproj
index e1e657a651a..6396eada6a9 100644
--- a/vsintegration/tests/Salsa/VisualFSharp.Salsa.fsproj
+++ b/vsintegration/tests/Salsa/VisualFSharp.Salsa.fsproj
@@ -16,7 +16,7 @@
-
+
CompilerLocation.fs
@@ -51,22 +51,11 @@
-
-
-
-
-
-
-
-
-
-
-
diff --git a/vsintegration/tests/UnitTests/VisualFSharp.UnitTests.fsproj b/vsintegration/tests/UnitTests/VisualFSharp.UnitTests.fsproj
index 96fde123dcc..d5167d28820 100644
--- a/vsintegration/tests/UnitTests/VisualFSharp.UnitTests.fsproj
+++ b/vsintegration/tests/UnitTests/VisualFSharp.UnitTests.fsproj
@@ -120,34 +120,14 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-