FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Remove unused `SourceLength` remoting property causing formatting issues by SteveL-MSFT · Pull Request #10765 · PowerShell/PowerShell · GitHub

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

Remove unused SourceLength remoting property causing formatting issues#10765
Ilya (iSazonov) merged 1 commit into
PowerShell:masterfrom
SteveL-MSFT:length-property

Conversation

Steve Lee (SteveL-MSFT) commented Oct 10, 2019
edited
Loading

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

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
Ilya (iSazonov) added this to the 7.0.0-preview.5 milestone Oct 11, 2019
Ilya (iSazonov) changed the title remove unused SourceLength remoting property causing formatting issues Remove unused SourceLength remoting property causing formatting issues Oct 11, 2019

Copy link
Copy Markdown
Collaborator

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

Copy link
Copy Markdown
Member Author

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

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

Copy link
Copy Markdown

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

Handy links:

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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


Back | FazBrowse Home | New Git URL