Gate exception field serialization behind langversion 11#19746
Conversation
❗ 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
|
…FieldSerializationSupport (F# 11) The GetObjectData override and field-restoring deserialization constructor for exception types are now gated behind langversion 11. With langversion <=10 (the current default), exceptions emit only the base-call ctor (status quo ante PR #19342). - Add LanguageFeature.ExceptionFieldSerializationSupport, mapped to F# 11.0 - Gate shouldRestoreFields and GetObjectData emission on the feature - Update tests to use withLangVersion "11" - Update all IL baselines (SerializableAttribute, Nullness) to reflect the default-langversion output (no field serde IL) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
16c595f to
733c88b
Compare
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
Commit pushed:
|
This comment has been minimized.
This comment has been minimized.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
Commit pushed:
|
This comment has been minimized.
This comment has been minimized.
The net472 baseline was incorrectly updated to use [runtime] prefixed NullableContextAttribute and NullableAttribute references. On net472, these attributes are embedded in the assembly (not from runtime BCL), so they must not have the [runtime] prefix. Also restore the embedded attribute class definitions at the end of the file. The serialization changes (removing field-restoring ctor and GetObjectData) are correctly kept, as they match the default langversion behavior. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
Commit pushed:
|
|
🤖 LabelOps — CI Fix. The Root cause: The Fixed the baseline to keep the non-prefixed attribute references and embedded class definitions, while preserving the correct serialization changes (simplified ctor, no GetObjectData) for default langversion.
|
Gates the GetObjectData + field-restoring ctor from #19342 behind
LanguageFeature.ExceptionFieldSerializationSupport(F# 11).With langversion ≤10 (current default), exception codegen is unchanged from pre-#19342 behavior.