New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Return error if color property or value is invalid with Set-PSReadLineOption -Colors #1124
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PSReadLineResources.Designer.cs
seems to have changed every line - probably a CRLF => LF change?
@lzybkr ran resgen.exe on Windows. VSCode probably changed it. I can change it back to CRLF. |
Actually, resgen creates a file with CRLF. Resaved as LF only. VSCode cleaned up trailing whitespace. |
@lzybkr can you re-review? Thanks. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved, assuming resgen removed the trailing whitespace.
If the trailing whitespace was removed by an editor, then it's probably better to keep it or somebody else will just end up adding it back in another PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since resgen is apparently generating trailing whitespace, we should remove it as future changes will likely add it back.
@lzybkr it seems that resgen has some hardcoded whitespace and also generates CRLF by default. git saves files as LF. In the future, we should probably have resgen as part of the build script if resources change. I don't see a need value in putting in the "raw" resgen'd file unless we also want the CRLF line endings. |
Maybe it's best to run resgen as part of the build and remove the generated file. It should be much simpler now than when this project was started. |
@lzybkr if we depend on resgen.exe, then builds only work on Windows again |
I guess I'm not following what you're suggesting then. But I think my point still stands - we don't want unnecessary changes to this file as it is generated - those changes are too easily undone and make reviews harder than necessary.
And I think that wouldn't change what's in the index (which is |
@lzybkr the file in git is currently LF which is why I had to resave it from CRLF to just LF so that the entire file didn't show up as modified. However, resgen (being a Windows tool) emits CRLF by default. So at some point in the past that file was already resaved as just LF. My suggestion is to defer fixing the resgen issue to later if we have to make more changes to the resx. Perhaps publish the resgen we have in PS repo and use that. |
@SteveL-MSFT after reading the conversations here, it looks to me what @lzybkr asked was to keep the trailing spaces in the generated file. |
Add descriptive error messages if the color property or value is invalid. Had to rerun resgen regenerating the resources cs file.
Fix #1118