Skip to content

Move F# options to native Unified Settings - #20877

Merged
abonie merged 4 commits into
dotnet:mainfrom
matteo-prosperi:dev/maprospe/usx
Nov 5, 2026
Merged

abonie merged 4 commits into
dotnet:mainfrom
matteo-prosperi:dev/maprospe/usx

Conversation

@matteo-prosperi

@matteo-prosperi matteo-prosperi commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

Description

Move F# editor and Interactive options to native Unified Settings with independent roaming and a one-time import that preserves existing native customizations. Replace the legacy options pages, split Quick Info description width into a checkbox and dependent integer, and retain the external compiler setting.

Editor and language-service Debug builds passed with zero warnings or errors. All 35 regression cases passed through an isolated net472 harness; manifest, formatting, and whitespace checks passed. The standard test project is blocked by a net472/net11.0 reference mismatch. Installed VS UI, cross-machine roaming, and export/import round trips were not tested.

image image image image image image image image

Checklist

  • Test cases added

  • Performance benchmarks added in case of performance changes — not applicable

  • Release notes entry updated:

    Please make sure to add an entry with short succinct description of the change as well as link to this pull request to the respective release notes file, if applicable.

    Release notes files:

    • If anything under src/Compiler has been changed, please make sure to make an entry in docs/release-notes/.FSharp.Compiler.Service/<version>.md, where <version> is usually "highest" one, e.g. 42.8.200
    • If language feature was added (i.e. LanguageFeatures.fsi was changed), please add it to docs/release-notes/.Language/preview.md
    • If a change to FSharp.Core was made, please make sure to edit docs/release-notes/.FSharp.Core/<version>.md where version is "highest" one, e.g. 8.0.200.

    Information about the release notes entries format can be found in the documentation.
    Example:

    If you believe that release notes are not necessary for this PR, please add NO_RELEASE_NOTES label to the pull request.

@github-actions

github-actions Bot commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

✅ No release notes required

@abonie abonie left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖🕵️ AI review — verify independently.

@github-project-automation github-project-automation Bot moved this from New to In Progress in F# Compiler and Tooling Nov 3, 2026
@abonie

abonie commented Nov 3, 2026

Copy link
Copy Markdown
Member

🤖🕵️ Possible cleanup leftovers from the removed options pages:

  • FSharp.UIResources/IntegerRangeValidationRule.cs: its only consumers were the deleted numeric controls.
  • FSharp.UIResources/Strings.Designer.cs and its project generator metadata: no remaining callers; the native manifest accesses resource keys directly. The underlying .resx is still needed.
  • FSharp.UIResources/Strings.resx: obsolete underline/completion/navigation labels, width/cache tooltips, and TransparentCompiler_Disclaimer1/2/3, plus their XLF translations.
  • Old page-title and keyword resources in FSharp.Editor.resx and FSharp.ProjectSystem.FSharp/VSPackage.resx, plus translations. Resource 6001 is still used for keybinding registration and should stay.

These appear to be dead-code/resource cleanup, not behavioral bugs. Migration readers and labels reused by the native manifest should remain.

Read editor and Interactive configuration from USX, import legacy values once, and enable independent roaming. Remove legacy options pages while retaining the external compiler setting.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@matteo-prosperi

Copy link
Copy Markdown
Contributor Author

Removed the unused legacy-page code and resources, including their translations. Resources used by the native manifest, migration readers, and keybinding resource 6001 are preserved.

@github-actions

github-actions Bot commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

Build Failure Analysis

Summary - Both Windows NativeAOT variants failed during restore because NuGet promoted a high-severity advisory for the SDK-supplied Microsoft.DotNet.ILCompiler 10.0.13 package to NU1903.

Root cause: SDK-supplied NativeAOT package advisory

The classic- and compressed-metadata restore binlogs fail in tests/AheadOfTime/NativeAOT/NativeAOT_Test.fsproj; the other 12 supplied binlogs completed successfully. The project enables PublishAot and treats warnings as errors, but does not directly reference Microsoft.DotNet.ILCompiler. The project and global.json are byte-for-byte identical at the PR head and base revisions, so this failure was not introduced by #20877.

Affected errors

Fix attempt - not-needed

Delivery - none

No PR source change is justified. The vulnerable package is supplied transitively by the pinned .NET SDK/NativeAOT toolchain, and neither suppressing the advisory nor guessing an unverified package override would be safe. This requires a serviced SDK/toolchain input (or a rerun after the build image/toolchain is updated), not a change to this Unified Settings PR.

Checks - binlog_errors and binlog_overview were run for all 14 supplied binlogs: 12 succeeded with zero errors; 1_0 and 2_0 each failed with the same NU1903 plus the terminal Build failed. message. binlog_warnings on both failed legs reported only viewer compatibility metadata. Local reproduction command dotnet restore tests/AheadOfTime/NativeAOT/NativeAOT_Test.fsproj -p:RuntimeIdentifier=win-x64 --no-cache exited 155 because the pinned SDK is unavailable in the analysis runner; no validation was claimed from that attempt.

Build evidence
Variant Status Project Target/task Error
classic metadata Failed NativeAOT_Test.fsproj Restore / RestoreTask NU1903 for Microsoft.DotNet.ILCompiler 10.0.13
compressed metadata Failed NativeAOT_Test.fsproj Restore / RestoreTask NU1903 for Microsoft.DotNet.ILCompiler 10.0.13
remaining 12 binlogs Succeeded Various - 0 errors

PR head 1d5e9fd1b253186b462ab89265f8291fa554fb37 and merge revision cfcb67705b6269928dbaeea856376e9d0901ffce were revalidated immediately before publication. Workflow run.

Structured data:

{
  "artifact_kind": "analysis",
  "fix_delivery": "none",
  "fix_status": "not-needed",
  "workflow_artifact": "build-failure-analysis"
}

Automated content by GitHub Copilot. Generated by the Build Failure Analysis workflow. · copilot · gpt56 · 127.9 AIC · ⌖ 19.8 AIC · ⊞ 23K | [History]( · ◷)

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The migration can mark itself complete after importing one local record before roaming synchronization finishes, causing later-arriving settings to be skipped on retry.

1 open issue
1 file not reviewed
  • vsintegration/src/FSharp.UIResources/Strings.Designer.cs: Generated file
What changed in this PR

This PR moves F# editor and Interactive options into Visual Studio’s native Unified Settings, replacing the legacy options pages while retaining the user-wide compiler selection.

Changes:

  • Adds native settings readers, change subscriptions, and a one-time legacy settings import.
  • Separates Quick Info width into an enable checkbox and numeric value, and captures Interactive settings consistently at session startup.
  • Removes legacy UI infrastructure and updates resources, test wiring, and release notes.
File Description
vsintegration/​tests/​UnitTests/​VisualFSharp.UnitTests.fsproj Registers replacement compiler-settings tests.
vsintegration/​tests/​UnitTests/​Tests.FSharpCompilerSettings.fs Tests registry-backed compiler selection.
vsintegration/​tests/​UnitTests/​Tests.FSharpCompilerOptionPage.fs Removes legacy page tests.
vsintegration/​tests/​FSharp.Editor.Tests/​SignatureHelpProviderTests.fs Updates options construction syntax.
vsintegration/​tests/​FSharp.Editor.Tests/​FSharp.Editor.Tests.fsproj Registers settings tests and manifest fixture.
vsintegration/​src/​FSharp.VS.FSI/​sessions.fs Captures immutable settings for each session.
vsintegration/​src/​FSharp.VS.FSI/​fsiLanguageService.fs Replaces option pages with compiler-setting access.
vsintegration/​src/​FSharp.VS.FSI/​FSharp.VS.FSI.fsproj Updates test visibility and source inclusion.
vsintegration/​src/​FSharp.VS.FSI/​FSharp.VS.FSI.Attributes.fs Removes obsolete page attributes.
vsintegration/​src/​FSharp.UIResources/​xlf/​Strings.zh-Hant.xlf Updates Traditional Chinese resource entries.
vsintegration/​src/​FSharp.UIResources/​xlf/​Strings.zh-Hans.xlf Updates Simplified Chinese resource entries.
vsintegration/​src/​FSharp.UIResources/​xlf/​Strings.tr.xlf Updates Turkish resource entries.
vsintegration/​src/​FSharp.UIResources/​xlf/​Strings.ru.xlf Updates Russian resource entries.
vsintegration/​src/​FSharp.UIResources/​xlf/​Strings.pt-BR.xlf Updates Brazilian Portuguese resource entries.
vsintegration/​src/​FSharp.UIResources/​xlf/​Strings.pl.xlf Updates Polish resource entries.
vsintegration/​src/​FSharp.UIResources/​xlf/​Strings.ko.xlf Updates Korean resource entries.
vsintegration/​src/​FSharp.UIResources/​xlf/​Strings.ja.xlf Updates Japanese resource entries.
vsintegration/​src/​FSharp.UIResources/​xlf/​Strings.it.xlf Updates Italian resource entries.
vsintegration/​src/​FSharp.UIResources/​xlf/​Strings.fr.xlf Updates French resource entries.
vsintegration/​src/​FSharp.UIResources/​xlf/​Strings.es.xlf Updates Spanish resource entries.
vsintegration/​src/​FSharp.UIResources/​xlf/​Strings.de.xlf Updates German resource entries.
vsintegration/​src/​FSharp.UIResources/​xlf/​Strings.cs.xlf Updates Czech resource entries.
vsintegration/​src/​FSharp.UIResources/​Strings.resx Removes obsolete text and adjusts restart labels.
vsintegration/​src/​FSharp.UIResources/​QuickInfoOptionControl.xaml.cs Removes Quick Info control code-behind.
vsintegration/​src/​FSharp.UIResources/​QuickInfoOptionControl.xaml Removes legacy Quick Info UI.
vsintegration/​src/​FSharp.UIResources/​OptionPageStyle.xaml Removes shared legacy page styles.
vsintegration/​src/​FSharp.UIResources/​LanguageServicePerformanceOptionControl.xaml.cs Removes performance control code-behind.
vsintegration/​src/​FSharp.UIResources/​LanguageServicePerformanceOptionControl.xaml Removes legacy performance UI.
vsintegration/​src/​FSharp.UIResources/​IntelliSenseOptionControl.xaml.cs Removes IntelliSense control code-behind.
vsintegration/​src/​FSharp.UIResources/​IntelliSenseOptionControl.xaml Removes legacy IntelliSense UI.
vsintegration/​src/​FSharp.UIResources/​IntegerRangeValidationRule.cs Removes legacy numeric validation.
vsintegration/​src/​FSharp.UIResources/​FSharp.UIResources.csproj Removes resource-designer metadata.
vsintegration/​src/​FSharp.UIResources/​FormattingOptionsControl.xaml.cs Removes formatting control code-behind.
vsintegration/​src/​FSharp.UIResources/​FormattingOptionsControl.xaml Removes legacy formatting UI.
vsintegration/​src/​FSharp.UIResources/​CodeFixesOptionControl.xaml.cs Removes code-fix control code-behind.
vsintegration/​src/​FSharp.UIResources/​CodeFixesOptionControl.xaml Removes legacy code-fix options UI.
vsintegration/​src/​FSharp.UIResources/​AdvancedOptionsControl.xaml.cs Removes advanced control code-behind.
vsintegration/​src/​FSharp.UIResources/​AdvancedOptionsControl.xaml Removes legacy advanced options UI.
vsintegration/​src/​FSharp.ProjectSystem.FSharp/​xlf/​VSPackage.zh-Hant.xlf Removes obsolete Traditional Chinese page resources.
vsintegration/​src/​FSharp.ProjectSystem.FSharp/​xlf/​VSPackage.zh-Hans.xlf Removes obsolete Simplified Chinese page resources.
vsintegration/​src/​FSharp.ProjectSystem.FSharp/​xlf/​VSPackage.tr.xlf Removes obsolete Turkish page resources.
vsintegration/​src/​FSharp.ProjectSystem.FSharp/​xlf/​VSPackage.ru.xlf Removes obsolete Russian page resources.
vsintegration/​src/​FSharp.ProjectSystem.FSharp/​xlf/​VSPackage.pt-BR.xlf Removes obsolete Brazilian Portuguese page resources.
vsintegration/​src/​FSharp.ProjectSystem.FSharp/​xlf/​VSPackage.pl.xlf Removes obsolete Polish page resources.
vsintegration/​src/​FSharp.ProjectSystem.FSharp/​xlf/​VSPackage.ko.xlf Removes obsolete Korean page resources.
vsintegration/​src/​FSharp.ProjectSystem.FSharp/​xlf/​VSPackage.ja.xlf Removes obsolete Japanese page resources.
vsintegration/​src/​FSharp.ProjectSystem.FSharp/​xlf/​VSPackage.it.xlf Removes obsolete Italian page resources.
vsintegration/​src/​FSharp.ProjectSystem.FSharp/​xlf/​VSPackage.fr.xlf Removes obsolete French page resources.
vsintegration/​src/​FSharp.ProjectSystem.FSharp/​xlf/​VSPackage.es.xlf Removes obsolete Spanish page resources.
vsintegration/​src/​FSharp.ProjectSystem.FSharp/​xlf/​VSPackage.de.xlf Removes obsolete German page resources.
vsintegration/​src/​FSharp.ProjectSystem.FSharp/​xlf/​VSPackage.cs.xlf Removes obsolete Czech page resources.
vsintegration/​src/​FSharp.ProjectSystem.FSharp/​VSPackage.resx Removes legacy page labels and descriptions.
vsintegration/​src/​FSharp.Editor/​xlf/​FSharp.Editor.zh-Hans.xlf Adds Unified Settings localization entries.
vsintegration/​src/​FSharp.Editor/​xlf/​FSharp.Editor.es.xlf Adds Unified Settings localization entries.
vsintegration/​src/​FSharp.Editor/​Options/​UnifiedSettingsMigration.fs Imports legacy settings with completion tracking.
vsintegration/​src/​FSharp.Editor/​Options/​UnifiedSettings.fs Adds subscriptions and external compiler provider.
vsintegration/​src/​FSharp.Editor/​Options/​UIHelpers.fs Removes legacy page and binding helpers.
vsintegration/​src/​FSharp.Editor/​Options/​SettingsStore.fs Removes JSON-backed settings infrastructure.
vsintegration/​src/​FSharp.Editor/​Options/​EditorOptions.fs Reads and caches native settings.
vsintegration/​src/​FSharp.Editor/​LanguageService/​LanguageService.fs Registers and initializes Unified Settings services.
vsintegration/​src/​FSharp.Editor/​FSharp.Editor.resx Adds native settings labels and descriptions.
vsintegration/​src/​FSharp.Editor/​FSharp.Editor.fsproj Includes settings implementation and manifest packaging.
vsintegration/​src/​FSharp.Editor/​Common/​Constants.fs Removes obsolete settings-page identifiers.
eng/​Packages.props Adds the manifest build package version.
docs/​release-notes/​.VisualStudio/​18.vNext.md Documents migration and compatibility changes.

Review effort: Balanced

matteo-prosperi and others added 2 commits November 5, 2026 09:53
Import local settings immediately, then merge late-roamed records before saving the single completion flag. Distinguish migration notifications from native edits and resets so the synchronization retry preserves user changes.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

3 participants