Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Use PSReadLine 2.0.0-beta2 from PSGallery#6998

Merged
daxian-dbw merged 6 commits intoPowerShell:masterfrom
SteveL-MSFT:psreadline-psgallery
Jun 6, 2018
Merged

Use PSReadLine 2.0.0-beta2 from PSGallery#6998
daxian-dbw merged 6 commits intoPowerShell:masterfrom
SteveL-MSFT:psreadline-psgallery

Conversation

@SteveL-MSFT
Copy link
Member

@SteveL-MSFT SteveL-MSFT commented Jun 5, 2018

PR Summary

Removed building PSReadLine from repo. Changed to downloading from PSGallery.

Addresses part of #1979

PR Checklist

Update files.wxs
update psreadline help location
@@ -148,8 +148,8 @@ $testCases = @{
HelpFiles = "Microsoft.PowerShell.PSReadline.dll-help.xml"
Copy link
Contributor

@lzybkr lzybkr Jun 5, 2018

Choose a reason for hiding this comment

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

This should be Microsoft.PowerShell.PSReadLine2.dll-help.xml.

Copy link
Member Author

Choose a reason for hiding this comment

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

Will fix

"Microsoft.PowerShell.Security.dll",
"Microsoft.PowerShell.CoreCLR.Eventing.dll",
"Microsoft.PowerShell.ConsoleHost.dll",
"Microsoft.PowerShell.PSReadLine.dll",
Copy link
Contributor

Choose a reason for hiding this comment

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

I'd imagine this will hurt startup, but maybe it can't be cross-gen'd.

Copy link
Contributor

Choose a reason for hiding this comment

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

I think you should also remove the Windows specific dll System.Runtime.InteropServices.RuntimeInformation.dll from the nuget package - PowerShell Core ships the correct version of this file and this copy is just wasting disk space and I suppose could cause problems in the future.

Copy link
Member Author

Choose a reason for hiding this comment

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

Had to remove from crossgen list as the crossgen happens before psmodulerestore. We can reorder it if startup time is an issue. The code to not include System.Runtime.InteropServices.RuntimeInformation.dll is already there at line 2395

address Jason's feedback
@kilasuit
Copy link
Collaborator

kilasuit commented Jun 5, 2018

Whilst I am delighted that you are following up on #1979 and finally getting some traction on it, my only small concern is that the is a preview version of PSReadline.

Would I be right in thinking that this is would be changed for the next non-preview release of pwsh to include the non-preview version of PSReadline with a future PR up the line?

@SteveL-MSFT
Copy link
Member Author

@kilasuit Yes, PSCore6.1 would ship with non-preview versions of assemblies. Getting PSReadLine 2.0.0-beta2 in now is a great way to get more usage and find issues.

@daxian-dbw
Copy link
Member

@SteveL-MSFT Console host tests are failing. I could be some recent changes broke them.

@SteveL-MSFT
Copy link
Member Author

@daxian-dbw my suspicion is that AppVeyor has PSReadLine 2.0.0-beta1 installed which is getting loaded first which has the bug that causes these tests to fail. I added a test to check the path of where PSReadLine is imported from to validate this. Not sure yet how to fix if this is the case since the semver string of the version gets dropped.

add path check to psreadline test
@SteveL-MSFT SteveL-MSFT force-pushed the psreadline-psgallery branch from 9cc8294 to 8c7f624 Compare June 5, 2018 22:18
@SteveL-MSFT
Copy link
Member Author

SteveL-MSFT commented Jun 5, 2018

My experiment shows that it is in fact 2.0.0-beta2 being used in AppVeyor. So not sure why the test is failing in AppVeyor, but passes locally other than the console is probably different. I think we still want to get 2.0.0-beta2 into Preview3 so we can get more feedback on PSReadLine 2.0. I propose we make these tests pending for now on Windows.

Created #7009

mark console redirect interactive tests as pending on Windows as they fail in AppVeyor
@iSazonov
Copy link
Collaborator

iSazonov commented Jun 6, 2018

Therefore, these scripts will not work in environments without a console. What are these scenarios? Task Scheduler?

@SteveL-MSFT
Copy link
Member Author

@iSazonov Not entirely sure about the root cause yet, but just hypothesizing that it's due to console. If so, Task Scheduler would have similar issue, but redirecting stdin isn't a common scenario.

@iSazonov
Copy link
Collaborator

iSazonov commented Jun 6, 2018

@SteveL-MSFT Thanks! If we plan to release next Preview I agree to merge the PR.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants