[release/10.0.4xx] Update dependencies from dotnet/arcade - #20243
Open
dotnet-maestro[bot] wants to merge 91 commits into
Open
[release/10.0.4xx] Update dependencies from dotnet/arcade#20243dotnet-maestro[bot] wants to merge 91 commits into
dotnet-maestro[bot] wants to merge 91 commits into
Conversation
* Avoid leaking a MeterListener per Cache in DEBUG builds In DEBUG builds, every Cache instance created a CacheMetrics.CacheMetricsListener, which starts a System.Diagnostics.Metrics.MeterListener registered in the process-global metrics registry. These were never disposed, so they accumulated for the lifetime of the process. Because every cache hit/miss/add publishes a measurement to all registered listeners, the per-operation cost grew linearly with the number of leaked listeners, so workloads that create many caches (for example repeated ParseAndCheckProject / per-file checks) slowed down steadily. Track the per-cache totals used by DebugDisplay directly, incrementing a small Stats object alongside the existing global Meter counters, instead of via a per-cache MeterListener. No listener is created, so nothing leaks, and DebugDisplay still works. The now-unused CacheMetrics.Hit/Miss/Add/Update/Eviction/EvictionFail helpers are replaced by a single recordMetric helper. * Address review: drop per-cache CacheMetricsListener and cacheId tag - Remove the CacheMetrics.CacheMetricsListener type. Its only per-cache use was the #if DEBUG debugListener each Cache created and never disposed, which was the leak this PR set out to fix. (majocha) - Drop the per-instance cacheId tag (and nextCacheId). Measurements now carry only the cache name, shrinking the payload published to any connected exporter and removing the per-instance filtering that was cacheId's only purpose. (majocha) - DebugDisplay and the cache tests read the existing name-aggregated stats via CacheMetrics.getTotalsByName / getRatioByName, populated by the single process-wide ListenToAll listener. No per-cache listener is created and no per-operation cost is added in any configuration, so there is no DEBUG-only overhead left to gate behind a separate directive. (T-Gro) - Overload-cache tests enable ListenToAll and snapshot totals before/after to stay scoped to their own compilation; FSharpChecker .CreateOverloadCacheMetricsListener is removed. * Update public SurfaceArea baseline after removing CacheMetricsListener CacheMetricsListener was a public type, so dropping it changes the recorded public surface. Remove its 10 entries from FSharp.Compiler.Service.SurfaceArea.netstandard20.bsl; the SurfaceArea test now passes. Also note the single-listener assumption the cache metric tests rely on. * Apply fantomas formatting to Caches.fs * Document why OverloadCacheTests is not parallelizable (global cache metrics state) --------- Co-authored-by: Tomas Grosup <Tomas.Grosup@gmail.com>
…0708.3 (#20048) On relative base path root Microsoft.Build , Microsoft.Build.Framework , Microsoft.Build.Tasks.Core , Microsoft.Build.Utilities.Core From Version 18.10.0-preview-26357-08 -> To Version 18.10.0-preview-26358-03 Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
…708.9 (#20049) On relative base path root Microsoft.CodeAnalysis , Microsoft.CodeAnalysis.Compilers , Microsoft.CodeAnalysis.CSharp , Microsoft.CodeAnalysis.EditorFeatures , Microsoft.CodeAnalysis.EditorFeatures.Text , Microsoft.CodeAnalysis.ExternalAccess.FSharp , Microsoft.CodeAnalysis.Features , Microsoft.VisualStudio.LanguageServices From Version 5.10.0-1.26357.6 -> To Version 5.10.0-1.26358.9 Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
…tors (#20017) Compiler-generated occurrence names (name@line-N) are allocated from process-wide counters on CompilerGlobalState that accumulate across compilations. When a warm checker re-emits the same project in-process, an unchanged closure therefore gets a different occurrence suffix than the previous emit, so consumers that align generated names across compilations (Edit-and-Continue delta emission, #19941) cannot match them. Add an internal ResetCompilerGeneratedNameState to NiceNameGenerator (clears the per-(name, file) occurrence counters), StableNiceNameGenerator (clears the cached stable names and the inner counters), and an aggregate on CompilerGlobalState that resets all three generators, restoring the fresh-process name layout. Callers must ensure no compilation is concurrently generating names. No in-tree caller yet; the consumer is the hot reload emit path in #19941. Covered by unit tests proving drift without reset, exact replay after reset, and that the stable-name cache itself is cleared.
…0709.10 (#20051) On relative base path root Microsoft.Build , Microsoft.Build.Framework , Microsoft.Build.Tasks.Core , Microsoft.Build.Utilities.Core From Version 18.10.0-preview-26358-03 -> To Version 18.10.0-1.26359.10 Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
* Update dependencies from https://github.com/dotnet/msbuild build 20260710.4 On relative base path root Microsoft.Build , Microsoft.Build.Framework , Microsoft.Build.Tasks.Core , Microsoft.Build.Utilities.Core From Version 18.10.0-1.26359.10 -> To Version 18.10.0-1.26360.4 * Update dependencies from https://github.com/dotnet/msbuild build 20260713.4 On relative base path root Microsoft.Build , Microsoft.Build.Framework , Microsoft.Build.Tasks.Core , Microsoft.Build.Utilities.Core From Version 18.10.0-1.26359.10 -> To Version 18.10.0-1.26363.4 * Update dependencies from https://github.com/dotnet/msbuild build 20260714.11 On relative base path root Microsoft.Build , Microsoft.Build.Framework , Microsoft.Build.Tasks.Core , Microsoft.Build.Utilities.Core From Version 18.10.0-1.26359.10 -> To Version 18.10.0-1.26364.11 * Update dependencies from https://github.com/dotnet/msbuild build 20260715.6 On relative base path root Microsoft.Build , Microsoft.Build.Framework , Microsoft.Build.Tasks.Core , Microsoft.Build.Utilities.Core From Version 18.10.0-1.26359.10 -> To Version 18.10.0-1.26365.6 * Update dependencies from https://github.com/dotnet/msbuild build 20260716.8 On relative base path root Microsoft.Build , Microsoft.Build.Framework , Microsoft.Build.Tasks.Core , Microsoft.Build.Utilities.Core From Version 18.10.0-1.26359.10 -> To Version 18.10.0-1.26366.8 * Update dependencies from https://github.com/dotnet/msbuild build 20260717.5 On relative base path root Microsoft.Build , Microsoft.Build.Framework , Microsoft.Build.Tasks.Core , Microsoft.Build.Utilities.Core From Version 18.10.0-1.26359.10 -> To Version 18.10.0-1.26367.5 * Update dependencies from https://github.com/dotnet/msbuild build 20260719.1 On relative base path root Microsoft.Build , Microsoft.Build.Framework , Microsoft.Build.Tasks.Core , Microsoft.Build.Utilities.Core From Version 18.10.0-1.26359.10 -> To Version 18.10.0-1.26369.1 * Update dependencies from https://github.com/dotnet/msbuild build 20260720.18 On relative base path root Microsoft.Build , Microsoft.Build.Framework , Microsoft.Build.Tasks.Core , Microsoft.Build.Utilities.Core From Version 18.10.0-1.26359.10 -> To Version 18.10.0-1.26370.18 --------- Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
* Update dependencies from https://github.com/dotnet/roslyn build 20260709.4 On relative base path root Microsoft.CodeAnalysis , Microsoft.CodeAnalysis.Compilers , Microsoft.CodeAnalysis.CSharp , Microsoft.CodeAnalysis.EditorFeatures , Microsoft.CodeAnalysis.EditorFeatures.Text , Microsoft.CodeAnalysis.ExternalAccess.FSharp , Microsoft.CodeAnalysis.Features , Microsoft.VisualStudio.LanguageServices From Version 5.10.0-1.26358.9 -> To Version 5.10.0-1.26359.4 * Fix NU1605 package downgrades from Roslyn 5.10.0-1.26359.4 bump The new Roslyn build adds a net472 dependency on Microsoft.VisualStudio.SDK 18.9.496-Preview and bumps its runtime deps to 10.0.8, causing package downgrade errors: - System.Collections.Immutable / System.Reflection.Metadata / System.Composition now required >= 10.0.8 (were pinned to 10.0.2) - VS interops (OLE/Shell/TextManager.Interop) required >= 18.9.438 - Microsoft.VisualStudio.Threading required >= 18.7.19 The three interop packages are decoupled from the shared shell package version since the VS SDK pins them newer than the other shell packages. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Fix MSB3277 assembly conflicts from new Roslyn VS SDK 18.9 deps The new Roslyn Microsoft.CodeAnalysis.ExternalAccess.FSharp (net472) now depends on Microsoft.VisualStudio.SDK 18.9.496 and its coherent 18.9.x VS package set, pulling newer transitive assemblies than fsharp's 18.0.x Shell packages. This caused MSB3277 (assembly version conflicts) across the vsintegration projects for: - System.Diagnostics.DiagnosticSource (10.0.2 vs 10.0.8) - Microsoft.VisualStudio.Validation (17.13 vs 18.7.1) - StreamJsonRpc (2.23 vs 2.26.5) - Microsoft.ServiceHub.Framework (4.9 vs 4.10.128) - Microsoft.VisualStudio.RpcContracts (17.15.25 vs 18.9.453) Bump DiagnosticSource to 10.0.8 (coherent with the other runtime deps) and pin the four remaining transitive packages to the exact versions Roslyn pulls, so all vsintegration projects resolve them coherently. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Fix runtime VS assembly load failures in legacy VS unit tests The Roslyn 5.10.0-1.26359.4 bump pulls Microsoft.VisualStudio.SDK 18.9.496 which transitively upgrades the editor assemblies (Microsoft.VisualStudio.Text.*, .Editor) to 18.9.123 and Shell.15.0 to 18.9.x. Two runtime-only breaks remained after the earlier NU1605/MSB3277 build-time fixes, both surfacing as a ReflectionTypeLoadException in the VsMocks MEF catalog that failed all ~1959 legacy VS unit tests: 1. Microsoft.VisualStudio.Platform.VSEditor is not pulled transitively, so it stayed pinned at 18.0.404-preview and its implementation types no longer bind against the newer Text.Internal 18.9.123 interfaces. Pin VSEditor to 18.9.123 to match. 2. Shell.15.0 18.9.x references Microsoft.VisualStudio.SolutionPersistence at runtime without declaring it as a NuGet dependency; deploy it next to the VS unit-test host (scoped to test projects to keep it out of the VSIX). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Fix flaky AOT CI build: pass -ci to disable UpdateXlfOnBuild The Build_And_Test_AOT_Windows job runs '.\Build.cmd -pack' without -ci, so ContinuousIntegrationBuild is not set. Arcade then enables UpdateXlfOnBuild, which flakily fails with 'MSB4057: The target UpdateXlf does not exist' on FSharp.Core (the classic_metadata leg failed while the identical compressed_metadata leg passed). Every other CI job builds via CIBuildNoPublish.cmd/cibuild.sh, which pass -ci. Add -ci here for consistency so ContinuousIntegrationBuild=true and UpdateXlfOnBuild stays disabled. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Update dependencies from https://github.com/dotnet/roslyn build 20260709.5 On relative base path root Microsoft.CodeAnalysis , Microsoft.CodeAnalysis.Compilers , Microsoft.CodeAnalysis.CSharp , Microsoft.CodeAnalysis.EditorFeatures , Microsoft.CodeAnalysis.EditorFeatures.Text , Microsoft.CodeAnalysis.ExternalAccess.FSharp , Microsoft.CodeAnalysis.Features , Microsoft.VisualStudio.LanguageServices From Version 5.10.0-1.26358.9 -> To Version 5.10.0-1.26359.5 * Update dependencies from https://github.com/dotnet/roslyn build 20260713.9 On relative base path root Microsoft.CodeAnalysis , Microsoft.CodeAnalysis.Compilers , Microsoft.CodeAnalysis.CSharp , Microsoft.CodeAnalysis.EditorFeatures , Microsoft.CodeAnalysis.EditorFeatures.Text , Microsoft.CodeAnalysis.ExternalAccess.FSharp , Microsoft.CodeAnalysis.Features , Microsoft.VisualStudio.LanguageServices From Version 5.10.0-1.26358.9 -> To Version 5.10.0-1.26363.9 * Update dependencies from https://github.com/dotnet/roslyn build 20260714.9 On relative base path root Microsoft.CodeAnalysis , Microsoft.CodeAnalysis.Compilers , Microsoft.CodeAnalysis.CSharp , Microsoft.CodeAnalysis.EditorFeatures , Microsoft.CodeAnalysis.EditorFeatures.Text , Microsoft.CodeAnalysis.ExternalAccess.FSharp , Microsoft.CodeAnalysis.Features , Microsoft.VisualStudio.LanguageServices From Version 5.10.0-1.26358.9 -> To Version 5.10.0-1.26364.9 * Update dependencies from https://github.com/dotnet/roslyn build 20260715.2 On relative base path root Microsoft.CodeAnalysis , Microsoft.CodeAnalysis.Compilers , Microsoft.CodeAnalysis.CSharp , Microsoft.CodeAnalysis.EditorFeatures , Microsoft.CodeAnalysis.EditorFeatures.Text , Microsoft.CodeAnalysis.ExternalAccess.FSharp , Microsoft.CodeAnalysis.Features , Microsoft.VisualStudio.LanguageServices From Version 5.10.0-1.26358.9 -> To Version 5.10.0-1.26365.2 * Update dependencies from https://github.com/dotnet/roslyn build 20260715.3 On relative base path root Microsoft.CodeAnalysis , Microsoft.CodeAnalysis.Compilers , Microsoft.CodeAnalysis.CSharp , Microsoft.CodeAnalysis.EditorFeatures , Microsoft.CodeAnalysis.EditorFeatures.Text , Microsoft.CodeAnalysis.ExternalAccess.FSharp , Microsoft.CodeAnalysis.Features , Microsoft.VisualStudio.LanguageServices From Version 5.10.0-1.26358.9 -> To Version 5.10.0-1.26365.3 --------- Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com> Co-authored-by: Copilot <copilot@github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
… Build ID 3013177 (#20023) Co-authored-by: Copilot <copilot@github.com>
* Update dependencies from https://github.com/dotnet/arcade build 20260708.3 On relative base path root Microsoft.DotNet.Arcade.Sdk From Version 10.0.0-beta.26324.4 -> To Version 10.0.0-beta.26358.3 * Update dependencies from https://github.com/dotnet/arcade build 20260716.3 On relative base path root Microsoft.DotNet.Arcade.Sdk From Version 10.0.0-beta.26324.4 -> To Version 10.0.0-beta.26366.3 * Update dependencies from https://github.com/dotnet/arcade build 20260717.6 On relative base path root Microsoft.DotNet.Arcade.Sdk From Version 10.0.0-beta.26324.4 -> To Version 10.0.0-beta.26367.6 * Re-run CI (flaky infrastructure failures unrelated to Arcade bump) The two failing jobs on this darc dependency PR were flaky/infra failures, not caused by the Arcade SDK version bump: - WindowsCompressedMetadata transparent_compiler_release: FSharp.Compiler.Service.Tests host hang hitting the 5m hangdump timeout (createdump MiniDumpWriteDump failure). - IcedTasks_Test_Debug Regression Test: net9.0-only 'Entry point was not found' in the third-party FSharp.Control.TaskSeq DisposeAsync path (passed on net8.0/net10.0). Both signatures recur on unrelated PRs (e.g. IcedTasks on #19941). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Update dependencies from https://github.com/dotnet/arcade build 20260721.2 On relative base path root Microsoft.DotNet.Arcade.Sdk From Version 10.0.0-beta.26324.4 -> To Version 10.0.0-beta.26371.2 --------- Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com> Co-authored-by: T-Gro <15220165+T-Gro@users.noreply.github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…#20033) * Move VS language-service logic tests to FSharp.Compiler.Service.Tests Port completion, quick info, parameter info, go-to-definition, and diagnostics coverage from the Windows-only VS Salsa suite to the cross-platform FSharp.Compiler.Service.Tests. The legacy suite keeps only the tests that genuinely exercise Visual Studio integration.
…ethod CDI emission (#20018) * Add Roslyn-format EnC CustomDebugInformation codec and portable PDB method CDI emission Adds an internal AbstractIL module implementing, byte for byte, the three Portable PDB CustomDebugInformation blob formats Roslyn persists per method for Edit and Continue (EnC Local Slot Map, EnC Lambda and Closure Map, EnC State Machine State Map), with serializers, deserializers, a portable PDB read-back helper, and an occurrence-key packing helper for deterministic syntax-offset slots. Plumbs an optional methodCustomDebugInfoRows side channel through the IL binary writer options into the portable PDB generator so a compilation can attach CDI rows to named methods. Names that do not identify exactly one method row are dropped. All existing writer call sites pass an empty map, so emitted PDBs are byte-identical to before. No in-tree caller populates the map yet; the consumer is the F# hot reload work in #19941, following the same pattern as #20017 (land isolated, test-covered infrastructure first, wire the feature later). Tests: blob round-trips, Roslyn golden-byte encodings, cross-validation against CDI blobs emitted by a real Roslyn compilation, fail-closed occurrence-key packing (including an int32-overflow regression where a wrapped negative key previously escaped the bound check), and end-to-end synthetic PDB emission proving correct MethodDef parenting, zero rows for an empty map, and no rows for absent or ambiguous names.
) * Extract stable synthesized-name replay layer Add internal generated-name normalization and synthesized-name map replay support as a standalone slice. The new map state is side-channel based, all new compiler modules remain internal, and CompilerGlobalState preserves the existing no-map counter path while checking an accessor captured once per compiler state. Route existing IlxGen generated-name allocations through inert helper wrappers, add pure name-map and normalizer tests, add a normal compilation determinism guard over emitted generated names, and document the extracted seams in P5_REPORT.md. Verification: built FSharp.Compiler.Service, FSharp.Compiler.Service.Tests, FSharp.Compiler.ComponentTests, and FSharpSuite.Tests in Release; ran the migrated service test classes, the component determinism class, FSharpSuite DeterministicTests, and the FCS SurfaceArea class successfully. * Fix generated-name scope test in stable names slice * Validate hot reload generated names before classification * Format hot reload compiler sources Verified with the repository-wide Fantomas check. * Retry CI after Linux runner memory exhaustion * Make synthesized name snapshots deterministic
Upgrade the repo to build on .NET 11 and target net11.0, plus the adaptations the SDK/Arcade 11 bump forces. Core version switch: - global.json: sdk.version 11.0.100-preview.6.26359.118 with rollForward=latestMinor + allowPrerelease (newer local 11.x still wins). A 2-part "11.0" is not a valid concrete SDK version, so the muxer fell back to $host$ and the end-to-end tests built with the machine net10 SDK (NETSDK1045); a concrete version resolves .dotnet's net11 SDK. Arcade.Sdk 11.0.0-beta.26369.1. - eng/TargetFrameworks.props: FSharpNetCoreProductTargetFramework net11.0. - eng/Version.Details.xml + eng/Version.Details.props: Arcade.Sdk 11.0.0-beta.26369.1 (+Sha) — the value Maestro flows from dotnet/arcade onto the net11 channel, not a hand-picked one. - eng/Versions.props: MicrosoftTestPlatformVersion 18.0.1 (net11 SDK bundles vstest 18.x; Microsoft.TestPlatform.ObjectModel must track that generation). - eng/common: regenerated to Arcade 11 (26369.1). Arcade-11 / SDK adaptations: - Microsoft.FSharp.Compiler.fsproj: NuGetRepack property casing, drop the obsolete UsingTask, add no-op PackageReleasePackages override (#19557). - fsi.fsproj: PublishReadyToRun=false (crossgen2 preview crashes on fsi). - tests/Directory.Build.props: mark .ComponentTests IsTestProject (excludes from SymStore PDB conversion that crashes on large test assemblies). - FSharp.DependencyManager.ProjectFile.fs: resolve framework-provided assemblies (Microsoft.Extensions.* now in the shared framework) for FSI #r "nuget:"; RestoreEnablePackagePruning=false. - regression-test-jobs.yml: install the compiler SDK into the TestRepo. net11 test-behavior: - EditorTests.fs: RegexOptions.AnyNewLine (2048) under NET11_0_OR_GREATER. - CompilerAssert.fs: derive runtimeconfig runtime version from FrameworkDescription + rollForward LatestMinor (preview is semver-lower). - ILChecker.fs: normalize System.Linq assembly extern (version-independent). - DependencyManagerInteractiveTests.fs: on net11 Microsoft.Extensions.* are shared-framework, so #r "nuget:" resolves the ref-pack path and one root. - ilverify.ps1: map versioned netN.0 baselines to generic netcoreapp; rename the two FSharp.Compiler.Service baselines accordingly. - EndToEndBuildTests: MicrosoftTestPlatformVersion 18.0.1. Validated: ./build.sh -c Release green (0/0); EmittedIL 1413 pass/0 fail; EditorTests AnyNewLine pass; DependencyManager nuget-roots test pass; ilverify FCS net11.0 exact-matches baseline. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
) Arcade 11 removed the SDL post-build scripts and the SDLValidationParameters parameter, breaking the official build. Move PoliCheck exclusions into the 1ES sdl: block and drop the obsolete post-build parameter and its variable group. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 7df99ba6-98b9-4cab-898b-422577b9e6dc
* Add a compiler intrinsic for the 'string' operator Adds string_operator_info / mkCallStringOperator so generated code can call Operators.string. These lines are duplicated by the interpolated-string PR (#19971); kept identical there so a future merge resolves cleanly. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * Generate a match-based ToString for unions under --reflectionfree Under --reflectionfree the union ToString previously emitted nothing, so DUs fell back to Object.ToString() (the namespace-qualified type name). Instead generate a match over the cases that builds "CaseName(f0, f1, ...)" using the 'string' operator on each field, via a TypedTree expression fed to CodeGenMethodForExpr. This recurses naturally into nested unions and is reflection-free. The default (sprintf "%+A") path is unchanged. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * Extract mkStringConcat helper for arity-dispatched String.Concat The "concatenate a list of string exprs, picking the cheapest String.Concat overload by arity" pattern was duplicated in CheckExpressions (interpolation lowering) and the optimizer, and our new union ToString used the array overload unconditionally. Extract mkStringConcat into TypedTreeOps.ExprOps and route all three through it. This also lets single-field union cases emit Concat3 instead of allocating a string[] (IlxGen runs after the optimizer, so nothing else would collapse that array form). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * Fix generated union ToString for generic unions The match-based ToString body is a TypedTree expression codegen'd via CodeGenMethodForExpr, but it was built with `eenv`, which lacks the tycon's type parameters. For generic unions this produced wrong IL: the wrong case branch (always the null-as-true-value case) or a NullReferenceException for single-case unions. Use `eenvinner` (the per-tycon environment) so the generic method body resolves its type parameters. The old sprintf path was unaffected because it emits raw IL off the pre-built ilThisTy. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * Render union ToString fields like option (null -> "null") To make a generated union ToString consistent with how option/list format their contents (LanguagePrimitives.anyToStringShowingNull), format each field as: if (box field) is non-null then 'string field' else "null". Previously a null field rendered as "" (the 'string' operator's null behaviour). Generated inline rather than calling anyToStringShowingNull, which is internal to FSharp.Core and so not callable from user-compiled code. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * Tidy reflection-free union ToString tests Normalize union declarations to a leading '|', use System.Console.WriteLine instead of printfn (the printf machinery is what these changes move away from), and make the null-field test compare the union's rendering directly against option's rather than asserting a fixed string. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * Add reflection-free ToString to Result and Choice Result and Choice had no ToString override, so they fell back to the compiler-generated sprintf "%+A" one, which uses reflection. Give them hand-written overrides mirroring option/list (String.Concat + anyToStringShowingNull), e.g. Ok 5 -> "Ok(5)", Choice1Of2 7 -> "Choice1Of2(7)". This is reflection-free / AOT-friendly and consistent with option's "Some(x)" rendering. Note: this changes the observable ToString of Result/Choice from the "%A"-style "Ok 5" to "Ok(5)". Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * Generate a single-line ToString for records under --reflectionfree Records previously fell back to Object.ToString() (the namespace-qualified type name) under --reflectionfree. Generate "{ F1 = v1; F2 = v2 }" on a single line (no line breaks, unlike sprintf "%+A"), with fields formatted like union fields (null -> "null", otherwise via 'string'). Factor the shared field formatter and ToString-method emission out of the union path. The default (sprintf "%+A") path is unchanged. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * Update FSharp.Core surface-area baselines for Result/Choice ToString Result and Choice`2..7 now declare an explicit ToString() override, so they appear in the public surface area. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * Add release notes Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * Generate a single-line ToString for anonymous records under --reflectionfree Drive anonymous-record ToString through the synthetic record tycon (already built for equality/comparison) rather than sprintf "%A", so under --reflectionfree it renders "{| Name = value; ... |}" on a single line. GenRecordToStringMethod now takes open/close brace strings ("{ "/" }" for records, "{| "/" |}" for anonymous records). The default (non-reflection-free) codegen path is unchanged and still falls back to sprintf "%+A". Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * Test that a hand-written ToString override is kept under --reflectionfree Addresses review feedback: generation is gated on `not (HasMember "ToString")`, so a user-defined ToString on a union or record wins over the generated one. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * Rename ToString generators for clarity Addresses review feedback: distinguish the reflective sprintf path from the structural one. GenPrintingMethod -> GenSprintfPrintingMethod (the sprintf "%+A" ToString/get_Message), GenToStringMethodFromExpr -> EmitToStringMethodDef. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * Restore tabular layout for string_operator_info in TcGlobals Addresses review feedback: keep the column-aligned layout of the surrounding intrinsic table. Also makes these two lines byte-identical to the same intrinsic added by #19971, so a future merge resolves cleanly. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * Add reflection-free ToString tests for field shapes, structs, anon records and recursion Covers DU field shapes (multiple fields vs a single tuple field), explicit vs unnamed field names rendering identically, struct unions/records, anonymous and struct anonymous records, and finite recursive/nesting types. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * Add EmittedIL tests for reflection-free record and union ToString Locks in the IL emitted under --reflectionfree: each field is boxed and rendered through Operators.ToString with a null guard, and the parts are joined with String.Concat (array form for the record, 3-arg form for the single-field union case). Nullary union cases return the bare case name. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * Generate reflection-free ToString in the augmentation phase The structural ToString for --reflectionfree records and unions was built in IlxGen, after the optimizer, so its per-field 'string' operator calls were never inlined: each value-type field was boxed and rendered through the generic Operators.ToString, behind a null guard that is dead for a value type. Move the generation into the type-augmentation phase (alongside Equals/GetHashCode/CompareTo) so the body flows through the optimizer. The 'string' operator is now specialised - a value-type field renders via a direct, allocation-free invariant-culture ToString with no boxing and no null guard (reference fields keep the guard so null still renders as "null"). The shared body builders live in AugmentTypeDefinitions; anonymous record types are synthesized too late for augmentation, so they keep generating in IlxGen but reuse the same builder. Output is unchanged; the EmittedIL baselines are updated to the leaner IL. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * Guard generated reflection-free ToString against deep-recursion overflow The augmentation-generated structural ToString recurses into fields, so a deeply nested value can exhaust the stack with an uncatchable StackOverflowException. Emit RuntimeHelpers.EnsureSufficientExecutionStack() at method entry (as C# records do in PrintMembers) so it throws a catchable InsufficientExecutionStackException instead, when the runtime provides the method. The guard is skipped for types whose every field is a flat primitive (integer/float/decimal/string/char/bool/unit/enum), which cannot recurse. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * Test the reflection-free ToString deep-recursion guard A 1,000,000-deep value's generated ToString throws a catchable InsufficientExecutionStackException rather than hard-crashing the process. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * revert ToString additions to fsharp.core types * Remove stale FSharp.Core release note for the reverted Result/Choice ToString Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * Fix code formatting in IlxGen.fs (dotnet fantomas) Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * don't use quoted name * int version of reflectionfree-printing doc * doc tweaks * Link release note to the printing doc and cover anonymous records Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * test backticks * Share the ToString recursion guard with anonymous records The guard lived in MakeBindingsForToStringAugmentation, which anonymous records bypass: they are synthesized too late for type augmentation and reach mkRecdToString from IlxGen instead. Deep nesting overflowed the stack rather than raising InsufficientExecutionStackException. Move it into mkToStringRecursionGuard, applied inside mkRecdToString and mkUnionToString, so every caller of the body builders gets it. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * Add EmittedIL baselines for struct and anonymous record ToString Struct records and unions read fields off the this pointer and switch on the tag, and the anonymous record path is generated separately in IlxGen, so each gets its own baseline. The anonymous baseline omits the field reads: they name the anonymous type, whose mangled name is not stable across compilations. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * Fix empty anonymous record ToString rendering a doubled space The open/close braces carry inner spaces ("{| " and " |}"); with no fields they abut and render "{| |}". Trim the leading space when the field list is empty, matching %A's "{| |}". Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * tidy comment --------- Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* Backflow from https://github.com/dotnet/dotnet / 50dbab4 build 322464 Diff: https://github.com/dotnet/dotnet/compare/920a0d55f8d87a0423dd3a89555f70d9c9004584..50dbab4de210e882172b07934e9666313b7065f1 From: dotnet/dotnet@920a0d5 To: dotnet/dotnet@50dbab4 [[ commit created by automation ]] * Update dependencies from build 322464 Updated Dependencies: Microsoft.Build, Microsoft.Build.Framework, Microsoft.Build.Tasks.Core, Microsoft.Build.Utilities.Core (Version 18.10.0-1.26359.10 -> 18.10.0-preview-26357-08) [[ commit created by automation ]] * Update dependencies from build 322734 No dependency updates to commit [[ commit created by automation ]] * Update dependencies from build 322911 No dependency updates to commit [[ commit created by automation ]] * Update dependencies from build 323048 No dependency updates to commit [[ commit created by automation ]] * Fix NU1903 audit failures from updated transitive dependencies The codeflow update to Microsoft.Build.* now transitively pulls System.Security.Cryptography.Xml 10.0.8 (newly flagged by GHSA advisories, patched in 10.0.10) on .NET, and Microsoft.CodeAnalysis.Test.Resources.Proprietary -> NETStandard.Library 1.6.1 pulls vulnerable System.Net.Http 4.3.0 and System.Text.RegularExpressions 4.3.0 on net472. - Bump System.Security.Cryptography.Xml override to 10.0.10 (Version.Details). - Add .NET-only Cryptography.Xml overrides in fsc/fsi/FSharp.Build.UnitTests (net472 excluded: no such transitive there and its deps conflict with System.ValueTuple). These cascade to Microsoft.FSharp.Compiler and FSharpSuite.Tests. - Override the net472 System.Net.Http/System.Text.RegularExpressions facades to patched 4.3.4/4.3.1 in FSharp.Test.Utilities. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Pin MessagePack to patched 2.5.302 to fix NU1902/NU1903 audit StreamJsonRpc 2.25.29 pulls MessagePack transitively; some restore environments resolve the vulnerable 2.5.198 (< 2.5.301 patched line), tripping NuGetAudit warnings-as-errors in FSharp.Compiler.LanguageServer.Tests. Add an explicit direct reference at 2.5.302 (StreamJsonRpc's own minimum, already patched) so the resolved version is deterministic everywhere. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Fix malformed Version.Details.xml (duplicate closing Dependency tag) A merge conflict resolution left a stray </Dependency> closing tag after Microsoft.Build.Utilities.Core, making the XML invalid and failing the Maestro Version.Details.props Validation and Codeflow verification checks. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: Copilot <copilot@github.com>
* Secure release-note checks for fork pull requests * Address release-note workflow review feedback
* Update test project to net11 Internal CI was failing since the move to net11 because restoring this test project had to suddenly be done via network call to nuget.org * Update target framework and PDB path in tests
…eaker Two opt-in (`--langversion:preview`) additions to method overload resolution. - F# now honors `System.Runtime.CompilerServices.OverloadResolutionPriorityAttribute` (.NET 9): among the applicable candidates the highest-priority ones are considered first, matching C#. Priority is applied before betterness and scoped by the declaring type, so a library can steer F# callers to the overload it intends. - When overload resolution would otherwise be ambiguous, the more concrete candidate is now preferred — `Option<'T>` over `'T`, `Task<'T>` over `'T`, `Result<'T, string>` over `Result<'T, 'E>` — across constructors, static and instance members, extension members, and optional/ParamArray tails. Candidates that are incomparable (more concrete at different positions, or differing only by an SRTP constraint) stay ambiguous rather than being resolved arbitrarily. The tiebreaker is transparent: opt into `--warnon:3575` to see which concrete overload was selected and `--warnon:3576` for each generic overload it bypassed. RFC FS-1338 (OverloadResolutionPriority) and RFC FS-1340 (most-concrete tiebreaker).
#20218) Co-authored-by: Copilot <copilot@github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Remove always-on WildCardInForLoop language feature flag Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Add release note for WildCardInForLoop flag removal Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Strip release-notes changes (NO_RELEASE_NOTES) --------- Co-authored-by: Copilot <copilot@github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Collapse always-on AndBang enforcement gates in CheckComputationExpressions Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Remove always-on AndBang language feature flag and regenerate xlf Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Fix Fantomas formatting after AndBang gate removal The CheckCodeFormatting CI job failed because the collapsed AndBang gate left a two-line let binding that Fantomas collapses to a single line. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <copilot@github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Collapse ImplicitYield enforcement sites to always-enabled path Remove the dead 'SupportsFeature LanguageFeature.ImplicitYield' guards, whose condition is always true for langversion >= 8.0, across the four Checking/Expressions files. Each guard is collapsed to its enabled branch and the dead branch/binding deleted. Behaviour is unchanged; the flag definition in LanguageFeatures.fs is intentionally left for a later sprint. The now-unused 'cenv' parameter of YieldFree is renamed to '_cenv' (not removed): FSharp.Profiles.props enables --warnon:1182 with WarningsAsErrors, so an unused named binding is a hard build error, and removing the parameter would cascade through IsSimpleSemicolonSequenceElement, TryGetSimpleSemicolonSequenceOfComprehension and the SimpleSemicolonSequence active pattern (all out of scope). The '_' prefix preserves the exact signature and all positional call sites. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Remove ImplicitYield language feature flag definition The ImplicitYield feature shipped in F# 4.7 and is permanently enabled (minimum accepted --langversion is 8.0), making the flag dead configuration. Remove the LanguageFeature.ImplicitYield union case, its features-map entry, the GetFeatureString arm, the featureImplicitYield FSComp.txt string, and regenerate the xlf localisation files. The always-on SynExpr.SequentialOrImplicitYield AST machinery is untouched. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <copilot@github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…811.3 On relative base path root Microsoft.DotNet.Arcade.Sdk From Version 10.0.0-beta.26406.9 -> To Version 10.0.0-beta.26411.3
…sources (#20090) * Don't walk non-F# assemblies when labelling trait constraint sources `addConstraintSources` (added in #16304, so that a failed member constraint names the member it came from) is applied to every imported assembly, and recurses through `e.ModuleOrNamespaceType` for every module and namespace entity it finds. For an assembly imported from IL there is nothing to find: the walk only reads `AllValsAndMembers`, and `ImportILTypeDefs` gives every namespace and type entity an empty val list; only an F# trait constraint produces a `TyparConstraint.MayResolveMember` to label in the first place. Meanwhile the recursion forces each namespace entity's `ModuleOrNamespaceType`, which imports that namespace - so referencing an assembly ends up importing every namespace in it, and reading every type definition, whether or not the code touches it. Skip the CCUs that aren't F#. FSharp.Core and F# references are still walked, so the error messages are unchanged. Measured with FSharpChecker.ParseAndCheckProject, keeping the results alive so the imported assembly structures stay on the heap (averages of 3 runs, one per process): a 486-reference F# project retains 1319.2 -> 952.1 MB (-27.8%), and a 168-reference console project 77.7 -> 69.8 MB (-10.2%). Checking FSharp.Compiler.Service itself (124 references, 397 sources) goes 2301.7 -> 2298.0 MB, i.e. within the noise at that size - what the imports cost there is dwarfed by the trees of the project's own code.
* Remove always-on SingleUnderscorePattern language feature flag Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Remove orphaned parsUnexpectedSymbolDot diagnostic resource Its only two consumers were the parser guards removed when the always-on SingleUnderscorePattern language feature was deleted, leaving the FSComp.txt entry and 13 xlf trans-units unreachable. Regenerated xlf via UpdateXlf. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <copilot@github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: Tomas Grosup <tomas.grosup@microsoft.com>
…yMap (#20088) * Avoid per-instance lock object in InterruptibleLazy and DelayInitArrayMap Both types allocated a dedicated `syncObj = obj()` for their one-time initialisation. These instances are internal and never locked externally, and there are enough of them (one per lazy IL member, per ILTypeDefs / ILMethodDefs, etc.) that the extra bare System.Object adds up to tens of MB on a large project. Lock on `this` instead and drop the field. Measured on a single-file FCS check against a project with ~486 references: bare System.Object instances dropped from ~1,000,000 to ~29,000 (~-22 MB).
* IL: add ILPreNamespace, make ILPreTypeDef creation lazy
…812.3 On relative base path root Microsoft.DotNet.Arcade.Sdk From Version 10.0.0-beta.26406.9 -> To Version 10.0.0-beta.26412.3
* Update dependencies from https://github.com/dotnet/msbuild build 20260721.8 On relative base path root Microsoft.Build , Microsoft.Build.Framework , Microsoft.Build.Tasks.Core , Microsoft.Build.Utilities.Core From Version 18.10.0-1.26370.18 -> To Version 18.10.0-1.26371.8 * Pin MSBuild at 18.10.0-1.26370.18 (last net10.0-compatible build) The 18.10.0-1.26371.x MSBuild builds dropped their net10.0 assets (they now ship net11.0 + net472 only). This repo's product target framework is net10.0, so: - The package's TFM-support check turns into a build error (doesn't support net10.0). - More importantly, there is no net10.0 runtime asset, so the bootstrap fsc (and fsi) fail at runtime with a silent exit 1 when the legacy MSBuild reference resolver tries to load Microsoft.Build.Utilities.Core, breaking the FSharp.Core compilation and thus the whole build. The net11.0 assemblies cannot be cleanly deployed to a net10.0 app (NuGet won't select them as runtime assets and manual deployment isn't reflected in deps.json), so the update cannot be consumed until the product moves to net11.0 or MSBuild restores net10.0 assets. Pin the dependencies at the last good build to keep CI green and stop the incompatible builds from re-flowing. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Pin MessagePack to patched 2.5.302 in CLaSP Framework Proxy to fix NU1902/NU1903 audit The Proxy project transitively pulls MessagePack (via Microsoft.CommonLanguageServerProtocol.Framework) and some restore environments resolve the vulnerable 2.5.108 (< 2.5.301 patched line), tripping NuGetAudit warnings-as-errors on every Windows job that builds VisualFSharp.slnx. Mirror the existing FSharp.Compiler.LanguageServer pin with a direct reference at 2.5.302. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Re-trigger CI: Linux leg hit an agent OOM/hang (exit 137, 0 test failures) The FSharp.Compiler.ComponentTests Linux run reported 'Free memory lower than 5% (95.06% used)' then hung ~47 min before SIGKILL (exit 137) with succeeded:5971 failed:0. This is a transient CI-agent out-of-memory flake, unrelated to the MessagePack pin (a Windows VS-only project not built on Linux). Empty commit to re-run the pipeline. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Fix merge: use CPM-style package references in CLaSP Framework Proxy csproj The merge of origin/main duplicated PackageReference items (NU1504) and kept Version attributes incompatible with Central Package Management (NU1008). Main migrated this project to CPM; versions are now defined centrally in eng/Packages.props (CLaSP 4.13.0-3.24579.1, MessagePack 2.5.302, Threading override 17.12.21). Restore now succeeds. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Re-trigger CI (flaky DependencyManager timeout test) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com> Co-authored-by: Copilot <copilot@github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Backflow from https://github.com/dotnet/dotnet / 7cdb217 build 326717 Diff: https://github.com/dotnet/dotnet/compare/7fb8cef14d9ae6bd729b04638f88d00f1ba7eb99..7cdb217445905f3342bbb0266a4497b9a014389a From: dotnet/dotnet@7fb8cef To: dotnet/dotnet@7cdb217 [[ commit created by automation ]] * Update dependencies from build 326717 No dependency updates to commit [[ commit created by automation ]] --------- Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
FSharp.Core 10.1.400 is already published on nuget.org, so the Check_Published_Package_Versions (FSCore) CI job fails. Bump FSBuildVersion 400 -> 401 so the servicing packages (FSharp.Core 10.1.401, FCS 43.13.401) are unpublished and the check passes. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
T-Gro
force-pushed
the
darc-release/10.0.4xx-aea761f3-13b5-4f99-b254-81c40240f97d
branch
from
August 13, 2026 17:36
36a5e39 to
c902f7a
Compare
Resolve conflicts: keep release infra/version files (arcade 10.x per ResetToTargetPaths); take main's source/tests (superset with newer feature implementations). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The main->release/10.0.4xx merge dropped the explicit UsingTask registration for Microsoft.DotNet.Tools.UpdatePackageVersionTask. That removal is only valid on Arcade 11 (where the NuGetRepack.Tasks package ships build/ props that auto-register the task). This branch uses Arcade 10.0, whose package has no build/ props, so every build failed with MSB4036 (task not found) in PackageReleaseDependentPackages. Restore the explicit UsingTask (removable once this branch moves to Arcade 11). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…813.3 On relative base path root Microsoft.DotNet.Arcade.Sdk From Version 10.0.0-beta.26406.9 -> To Version 10.0.0-beta.26413.3
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request updates the following dependencies
From https://github.com/dotnet/arcade