-
Notifications
You must be signed in to change notification settings - Fork 834
Fix preferreduilang switch leaking into fsi.CommandLineArgs #19151
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Co-authored-by: T-Gro <[email protected]>
Co-authored-by: T-Gro <[email protected]>
Co-authored-by: T-Gro <[email protected]>
Co-authored-by: T-Gro <[email protected]>
preferreduilang switch in FSI|
@copilot : Failed Scripting.PreferredUiLang tests.invalid culture in preferreduilang is ignored gracefully [22 ms] |
Co-authored-by: T-Gro <[email protected]>
Fixed in 328b7b3. The issue was that |
❗ Release notes requiredCaution No release notes found for the changed paths (see table below). Please make sure to add an entry with an informative description of the change as well as link to this pull request, issue and language suggestion if applicable. Release notes for this repository are based on Keep A Changelog format. The following format is recommended for this repository:
If you believe that release notes are not necessary for this PR, please add NO_RELEASE_NOTES label to the pull request. You can open this PR in browser to add release notes: open in github.dev
|
Description
The
--preferreduilangand/preferreduilangswitches were appearing infsi.CommandLineArgswhen positioned after the script file, breaking script argument contracts and causing MSBuild-invoked FSI sessions to leak implementation details.Changes
Core Implementation (
src/Compiler/Interactive/fsi.fs)preferreduilangswitches regardless of positionCultureInfoobject before setting any statetcConfigB.preferredUiLangandThread.CurrentThread.CurrentUICultureif culture validation succeedsTests (
tests/FSharp.Compiler.ComponentTests/Scripting/PreferredUiLangTests.fs)--//), culture application, and error handlingExample
Checklist
Original prompt
This pull request was created as a result of the following prompt from Copilot chat.
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.