Skip to content
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

Enable building with dotnetcli for non-Windows #692

Merged
merged 12 commits into from Sep 30, 2018

Conversation

@SteveL-MSFT
Copy link
Member

@SteveL-MSFT SteveL-MSFT commented May 30, 2018

Ported csproj to use dotnetcli. When run from PSCore6, builds for netcoreapp21. When run from Windows PowerShell 5.1, builds for net461. Tests ran on Windows PowerShell, PSCore6 Windows, PSCore6 Ubuntu 18.04, and PSCore6 macOS all passing. Linux run requires xclip to be installed as that is necessary for clipboard to function (which tests depend upon). Using dotnetsdk 2.1. Appropriate .Net Framework 4.6.1 SDK is required for Windows PowerShell build.

Fix #652

@lzybkr
Copy link
Member

@lzybkr lzybkr commented May 30, 2018

You should add a new task in PSReadLine.build.ps1 instead of adding the new file build.ps1.

The new task should probably be invoked from appveyor.yml.

And I would much rather see changes to PSReadLine\PSReadLine.csproj - I'm guessing there are about 2 lines of real difference between the files.

@SteveL-MSFT
Copy link
Member Author

@SteveL-MSFT SteveL-MSFT commented May 30, 2018

@lzybkr I'm fine having a single csproj, but wasn't sure if you preferred keeping the existing project as-is.

@lzybkr
Copy link
Member

@lzybkr lzybkr commented May 30, 2018

Does building against PowerShell Standard work against Windows PowerShell 5.1 on Win7 and Win10 without shipping type forwarding dlls? If so, they fine, but I'm guessing there isn't a clean solution to that problem yet.

A single csproj can build multiple ways with conditions though - and that's what I was suggesting.

@SteveL-MSFT
Copy link
Member Author

@SteveL-MSFT SteveL-MSFT commented May 30, 2018

@lzybkr If Win7 doesn't have .Net 4.7, the shims are needed. Newer Win10 has 4.7.x. We plan to have a module that contains the .Net Std shims that other modules can reference.

@SteveL-MSFT
Copy link
Member Author

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

@lzybkr are you ok if we move both the Windows and non-Windows build to dotnetcli? Would simplify things quite a bit.

@lzybkr
Copy link
Member

@lzybkr lzybkr commented Jun 1, 2018

@SteveL-MSFT - if you submit a PR so I can see how it's simpler, that would help.

I don't want to distribute unnecessary private copies of dlls, I'm already unhappy about needing System.Runtime.InteropServices.RuntimeInformation.dll.

I also don't want runtime logic that might affect startup time, e.g. path searching for type forwarders dlls.

@SteveL-MSFT
Copy link
Member Author

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

I'm going to have to put this on hold for now. Got it building and tests running with dotnetcli, but tests fail to run correctly.

@SteveL-MSFT SteveL-MSFT force-pushed the SteveL-MSFT:build-unix branch from 7379d50 to efbb706 Jun 26, 2018
@SteveL-MSFT SteveL-MSFT force-pushed the SteveL-MSFT:build-unix branch from efbb706 to 93c60a1 Jul 17, 2018
@SteveL-MSFT
Copy link
Member Author

@SteveL-MSFT SteveL-MSFT commented Jul 17, 2018

Tests pass on macOS and Windows w/ PSCore6. Out of town next few days. Will get it working in WinPS after I get back

@SteveL-MSFT SteveL-MSFT force-pushed the SteveL-MSFT:build-unix branch 5 times, most recently from 5223311 to 71fc314 Jul 17, 2018
@SteveL-MSFT SteveL-MSFT requested a review from lzybkr Jul 21, 2018
@SteveL-MSFT
Copy link
Member Author

@SteveL-MSFT SteveL-MSFT commented Jul 21, 2018

@lzybkr I think this is ready for review

Copy link
Member

@lzybkr lzybkr left a comment

I think you should add instructions for building to README.md so I can easily point people to what they need to install.

You also need to try running the tests from VS. You did not update the TestPSReadLine project and that fails to build, preventing tests from running. (That project is used for interactive development/testing without affecting PowerShell by installing the module.)

PSReadLine.build.ps1 Show resolved Hide resolved
appveyor.yml Show resolved Hide resolved
PSReadLine/Clipboard.cs Outdated Show resolved Hide resolved
PSReadLine/Clipboard.cs Outdated Show resolved Hide resolved
PSReadLine.build.ps1 Outdated Show resolved Hide resolved
PSReadLine.build.ps1 Outdated Show resolved Hide resolved
PSReadLine.build.ps1 Show resolved Hide resolved
@SteveL-MSFT SteveL-MSFT force-pushed the SteveL-MSFT:build-unix branch from 71fc314 to f614992 Sep 26, 2018
@SteveL-MSFT
Copy link
Member Author

@SteveL-MSFT SteveL-MSFT commented Sep 26, 2018

@lzybkr verified solution builds and tests run in VS2017

@lzybkr lzybkr dismissed their stale review Sep 28, 2018

Module version set incorrectly.

@lzybkr
Copy link
Member

@lzybkr lzybkr commented Sep 28, 2018

I think this is almost ready, but I noticed the module version is set to 1.0.0.0 in PSReadLine.psd1, but it should be 2.0.0.

@lzybkr lzybkr mentioned this pull request Sep 28, 2018
@SteveL-MSFT
Copy link
Member Author

@SteveL-MSFT SteveL-MSFT commented Sep 28, 2018

@lzybkr the .psd1 file wasn't changed in this PR and looking in my repo, it's still set to 2.0.0

Steve Lee (POWERSHELL) and others added 3 commits Sep 29, 2018
@lzybkr
lzybkr approved these changes Sep 30, 2018
@lzybkr lzybkr merged commit f92ecfe into PowerShell:master Sep 30, 2018
1 check passed
1 check passed
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
@SteveL-MSFT SteveL-MSFT deleted the SteveL-MSFT:build-unix branch Oct 1, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.