Preserve Get-TypeData hidden members#27185
Preserve Get-TypeData hidden members#27185badgerbees wants to merge 5 commits intoPowerShell:masterfrom
Conversation
There was a problem hiding this comment.
Pull request overview
This PR fixes Get-TypeData reconstruction from the live type table so that hidden extended members keep their IsHidden state when converted back into TypeMemberData, and adds a regression test covering the Update-TypeData → Get-TypeData round-trip.
Changes:
- Preserve
IsHiddenwhen converting livePSMemberInfoinstances back intoNotePropertyData,AliasPropertyData,ScriptPropertyData,CodePropertyData, andMemberSetData. - Add a Pester regression test verifying hidden note properties remain hidden after an
Update-TypeData/Get-TypeDataround-trip.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
src/System.Management.Automation/engine/TypeTable.cs |
Updates the reconstruction path from live members to TypeMemberData to carry the IsHidden flag. |
test/powershell/Modules/Microsoft.PowerShell.Utility/typedata.tests.ps1 |
Adds regression coverage for IsHidden preservation across Update-TypeData/Get-TypeData. |
|
hello, if any maintainer could approve of the workflow again that would be awesome thanks |
|
I found the actual failure: |
|
|
|
all tests passed, ready for a review from any maintainer. |
PR Summary
Preserve hidden type data members when
Get-TypeDatareconstructsTypeDatafrom the live type table. This fixes issue #27131 and adds a regression test to verify that hidden note properties stay hidden after anUpdate-TypeDataandGet-TypeDataround-trip.PR Context
Get-TypeDatawas dropping theIsHiddenflag when it converted livePSMemberInfoinstances back intoTypeMemberData. The underlying type table already preserved the hidden state, so this change corrects the reconstruction path rather than changing the storage model or the way hidden members behave at runtime.PR Checklist
.h,.cpp,.cs,.ps1and.psm1files have the correct copyright header