Repository navigation
Description
Hello,
I'm working on a project with Google Summer of Code and the FreeBSD organization to port PowerShell -- as well as the .NET SDK -- to the FreeBSD platform. So far, I've successfully compiled both native (libpsl-native) and managed parts of the PowerShell code on FreeBSD.
At first, three libpsl tests were failing: IsFileTest.RootIsFile, GetUserFromPid.Success and LocaleTest.Success. The last one was just a missing LANG env variable, so as soon as I set it, the test passed. But the first two ones required code changes, which I'm submitting as a PR with questions I had related to specific lines, but they are now ALL passing.
However, the resulting PowerShell build is misbehaving in some ways and I'd like some guidance as to what I should look for:
- This is what I'm getting for the shell prompt:
PS Alias:/>. - Running any cmdlet gets me a
not recognized as the name of a cmdlet, function...error. - Typing anything in results in repeated characters. For example, if I type in
Get-Help, this is what I get:PS Alias:/> GGeGetGet-Get-HGet-HeGet-HelGet-Help. Although, as I press Enter, the actual thing that gets read isGet-Help, and not the long string with repeated characters.
This is what my $PSVersionTable looks like:
Name Value
---- -----
PSVersion 6.1.0-preview.3
PSEdition Core
GitCommitId v6.1.0-preview.3-59-ge56a6c4bc9c42ba0d0a4c413f31d4508c7a65b75
OS FreeBSD 11.1-RELEASE FreeBSD 11.1-RELEASE #0 r321309: Fri Jul 21 02:08:28 UTC 2017 ...
Platform Unix
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
cc David Naylor (@DragonSA) David Chisnall (@davidchisnall) Steve Lee (@SteveL-MSFT)
Activity
iSazonov commentedon Jun 29, 2018
PowerShell is entirely based on .Net Core so before you continue with porting PowerShel you should pass all tests in CoreCLR, CoreFX, CLI. After that I hope most problems (your questions above) will resolved automatically.
Modules is not imported. There can be many reasons for this.
Perhaps it is a console problem. Try
TERM=xterm pwsh. You could read related issuesmateusrodrigues commentedon Jul 13, 2018
So, these are the latest updates:
These have been resolved. It was a problem in CoreFX's FileSystem native implementation that was failing in a certain function and the mount points were not being returned. PR has been submitted and merged into master.
I'm still investigating what the cause of this is. Ilya (@iSazonov) the variable change you suggested didn't work. I'm trying to find out how PS interacts with the console and if there's any echoing involved.
SteveL-MSFT commentedon Jul 14, 2018
Mateus Rodrigues de Morais (@mateusrodrigues) regarding the console echo problem is PSReadLine being used? if so, try removing it to isolate the problem
mateusrodrigues commentedon Jul 15, 2018
Steve Lee (@SteveL-MSFT) No, PSReadLine isn't being used.
iSazonov commentedon Jul 15, 2018
Do you test .Net console methods? Do they work ok on FreeBSD?
mateusrodrigues commentedon Jul 17, 2018
Ilya (@iSazonov) Yes,
Read,ReadLine,ReadKey... all work fine on FreeBSD.iSazonov commentedon Jul 17, 2018
Looks like problem with cursor possition evaluating or setting - I see +1 on every next step.
iSazonov commentedon Oct 21, 2018
Feel free to ask if you need a help.