Skip to content

Allow newer dotnet cli #633

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

Merged

Conversation

TylerLeonhardt
Copy link
Member

our build script required 2.0.0. Now the cli is up to 2.1.4. This small change allows newer versions to be used.

We may want to eventually put an upper bound on this... but I don't think the dotnet cli will change much at least how we're using it.

@@ -37,7 +37,7 @@ task SetupDotNet -Before Clean, Build, TestHost, TestServer, TestProtocol, TestP
}

# Make sure the dotnet we found is the right version
if ($dotnetExePath -and (& $dotnetExePath --version) -eq $requiredSdkVersion) {
if ($dotnetExePath -and [version](& $dotnetExePath --version) -ge [version]$requiredSdkVersion) {
Copy link
Contributor

Choose a reason for hiding this comment

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

So why don't we just use a global.json file to specify the SDK version? See https://github.com/PowerShell/PowerShell/blob/master/global.json

Copy link
Member Author

Choose a reason for hiding this comment

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

@rkeithhill that's kinda opposite of why I opened this PR. I didn't want to require 1 particular SDK version. I wanted to be able to build using the dotnet sdk of any version greater than 2.0.

Ex. I have 2.1.4 on my machine and it builds just fine.

By adding a global.json it forces the construct of "you need this exact version" at least until this is implemented:
https://github.com/dotnet/core-setup/issues/679

Copy link
Contributor

@rjmholt rjmholt Mar 20, 2018

Choose a reason for hiding this comment

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

I was just looking for a mechanism to set a minimum version, and lo and behold it led me right back here from that core-setup issue

Copy link
Member Author

Choose a reason for hiding this comment

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

It's so sad. I just want to not have to download a million dotnet sdks 😭

Copy link
Contributor

Choose a reason for hiding this comment

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

I don't know if it is dl of dotnet or what but every time I debug the extension, it builds PSES and that part is sloooow. :-(

Copy link
Contributor

Choose a reason for hiding this comment

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

dotnet build times have supposedly improved noticeably in the 2.1 preview. Maybe I should try that version to see how it performs.

Copy link
Member Author

Choose a reason for hiding this comment

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

dotnet 2.1 seems good to me :)

this PR will allow you to use that build if you have it on your machine already... but still be compat with 2.0 if folks have that

Copy link
Member Author

Choose a reason for hiding this comment

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

@rkeithhill is that thumbs up a sign off 😉

Copy link
Contributor

Choose a reason for hiding this comment

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

BTW there are a bit too many warnings IMO. At some point, we should clean up what we can. I see a couple of variable not used warnings that should be easy to fix.

Copy link
Member Author

Choose a reason for hiding this comment

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

Agreed. The unused variable warnings would make a great Up-for-grabs I think.

@TylerLeonhardt TylerLeonhardt merged commit 6f81539 into PowerShell:master Mar 22, 2018
@TylerLeonhardt TylerLeonhardt deleted the allow-newer-dotnet-cli branch March 22, 2018 19:29
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.

3 participants