Skip to content

Remove unused SourceLength remoting property causing formatting issues - #10765

Merged
Ilya (iSazonov) merged 1 commit into
PowerShell:masterfrom
SteveL-MSFT:length-property
Oct 12, 2019
Merged

Ilya (iSazonov) merged 1 commit into
PowerShell:masterfrom
SteveL-MSFT:length-property

Conversation

@SteveL-MSFT

@SteveL-MSFT Steve Lee (SteveL-MSFT) commented Oct 10, 2019 •

Copy link
Copy Markdown
Member

PR Summary

#8785 exposed an issue where part of that optimization is seeing if the object has special remoting note properties. One of them was simply called Length and if so then formatting simply used ToString() which is undesired in this case. This is a very specific case where it is an object that contains only a member called Length. Searching the codebase, it appears SourceLength isn't actually used, so the fix is to remove this property and the check for it.

PR Context

Fix #10762

PR Checklist

@iSazonov Ilya (iSazonov) added the CL-General Indicates that a PR should be marked as a general cmdlet change in the Change Log label Oct 11, 2019
@iSazonov Ilya (iSazonov) added this to the 7.0.0-preview.5 milestone Oct 11, 2019
@iSazonov Ilya (iSazonov) changed the title remove unused SourceLength remoting property causing formatting issues Remove unused SourceLength remoting property causing formatting issues Oct 11, 2019
@iSazonov

Copy link
Copy Markdown
Collaborator

No problems with Windows PowerShell remoting compatibility?
Should we have tests for using the remoting constants?

@SteveL-MSFT

Copy link
Copy Markdown
Member Author

Ilya (@iSazonov) looked in the Windows PowerShell code base and this property isn't used either

@iSazonov
Ilya (iSazonov) merged commit bf59561 into PowerShell:master Oct 12, 2019
@ghost

Copy link
Copy Markdown

🎉v7.0.0-preview.5 has been released which incorporates this pull request.:tada:

Handy links:

@SteveL-MSFT
Steve Lee (SteveL-MSFT) deleted the length-property branch June 6, 2020 02:31
Thatgfsj (Thatgfsj) pushed a commit to Thatgfsj-contribs/PowerShell that referenced this pull request Aug 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CL-General Indicates that a PR should be marked as a general cmdlet change in the Change Log

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Select-Object default output formatting is situationally broken

3 participants