Skip to content

Fix a regression in formatting caused by the 'FirstOrDefault' primitive added in 7.0.0-Preview1 - #11258

Merged
Aditya Patwardhan (adityapatwardhan) merged 5 commits into
PowerShell:masterfrom
daxian-dbw:firstordefault
Dec 11, 2019
Merged

Aditya Patwardhan (adityapatwardhan) merged 5 commits into
PowerShell:masterfrom
daxian-dbw:firstordefault

Conversation

@daxian-dbw

@daxian-dbw Dongbo Wang (daxian-dbw) commented Dec 3, 2019 •

Copy link
Copy Markdown
Member

PR Summary

Fix #10554

Hidden members should not be returned by any fuzzy searches, such as searching by 'match' or enumerating the collection. They are returned only if the member names are explicitly looked for. FirstOrDefault is a fuzzy search, so it should ignore the hidden members.

PR Context

PR Checklist

@daxian-dbw Dongbo Wang (daxian-dbw) changed the title Fix a regression in formatting caused by the 'FirstOrDefault' primitive added in PowerShell 7 preview Fix a regression in formatting caused by the 'FirstOrDefault' primitive added in 7.0.0-Preview1 Dec 3, 2019
@daxian-dbw Dongbo Wang (daxian-dbw) added the CL-Engine Indicates that a PR should be marked as an engine change in the Change Log label Dec 3, 2019
@daxian-dbw Dongbo Wang (daxian-dbw) added this to the rc.1-consider milestone Dec 3, 2019

@iSazonov Ilya (iSazonov) left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM with one minor comment.

# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.

Describe 'Bug fixes related to formatting' -Tag CI {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I think it is better to have positive and functional names for the file and describe.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Updated the test name, but kept the file name unchanged. I would like this file to be used for future bug fixes related to formatting.

@ghost

Copy link
Copy Markdown

🎉v7.0.0-rc.1 has been released which incorporates this pull request.:tada:

Handy links:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CL-Engine Indicates that a PR should be marked as an engine change in the Change Log

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Write-Output of class with hidden params regression in PS 7

6 participants