Uh oh!
There was an error while loading. Please reload this page.
Warn when record update expression changes all fields - #14673
Conversation
kerams
commented
Jan 29, 2023
Build failures stem from this diagnostic being triggered when compiling FSharp.Core: /// Produce a new execution context for a composite asyncmember_.WithContinuations(cont,econt)=
AsyncActivation<'U>// <------------- ok, 2 fields, construction syntax{
cont = cont
aux ={ contents.aux with econt = econt }}/// Produce a new execution context for a composite asyncmemberctxt.WithContinuations(cont,econt,ccont)=
AsyncActivation<'T>{ contents with// <------------- warning, 2 fields, update syntax
cont = cont
aux ={ ctxt.aux with
econt = econt
ccont = ccont
}} |
vzarytovskii
commented
Jan 29, 2023
Can you please put it off by default in current versions and on under preview version? This way, I guess, we can have it off now, but optionally enabled if users want it, and on by default in preview/8? |
Uh oh!
There was an error while loading. Please reload this page.
psfinaki
commented
Jan 30, 2023
@kerams you are really doing an amazing job with these PRs, thanks a lot. Considering the level of the warning, IMO can be whatever since yeah we don't expect this to happen often to be anyhow noisy. |
vzarytovskii
commented
Jan 30, 2023
It should not be enabled by default for current language versions, a rule of thumb is usually "if it will break anyone's compilation simply by upgrading to a minor SDK, then it go under language flag" |
T-Gro
left a comment
There was a problem hiding this comment.
I like the new approach via the exception type - it can be also reused for other scenarios where we want the same ( combination of langfeature + still allowing explicit opt-in for older versions).
Good.
Implements fsharp/fslang-suggestions#603.
There has been some opposition to the suggestion. Should this maybe be off by default or part of warning level 4?