-
Notifications
You must be signed in to change notification settings - Fork 586
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
WIP: global dotnet cli-tool #1932
Conversation
build.fsx
Outdated
@@ -224,7 +224,16 @@ Trace.setBuildNumber nugetVersion | |||
//if current |> Seq.contains CoreTracing.defaultConsoleTraceListener |> not then | |||
// CoreTracing.setTraceListeners (CoreTracing.defaultConsoleTraceListener :: current) | |||
|
|||
let dotnetSdk = lazy DotNet.install DotNet.Release_2_1_4 | |||
|
|||
let dotnetSdk = lazy DotNet.install (fun p -> |
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.
Should we add that version to Fake.DotNet.Cli
as well?
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.
I would have, but i was not sure about the build version. We could just add '2.1.300-rc1' without the build version and just update that 'silently' if it changes. But i would not pollute the module with several 2.1.300-rc1-versions.
yes yes yes. Thanks for looking into this :)
Honestly I don't really know (which is probably the reason why I have not looked into this yet) |
just 'fake' would be nice ;). |
Seems like slack likes |
fake-cli <- all lowercase? |
I would write it all lower case, but I don't think casing actually matters when used on the command line later on. |
Yes it does, but it seems like environment variables are set such that the new version uses the old sdk-files.... |
I think we need something similar to what we have in the msbuild helper: |
Probably not, but its also consistent with dotnet-fake. I will change it to lower. Exactly the same lines are in the DotNet module. Thats probably a bug. |
Yes either a bug in dotnet cli or just another environment variable we need to look at. Also we might need to ensure that "our" newly installed dotnet-sdk is the first in PATH... |
Are you already merging or can i still force-push? |
You can still force-push, I just changed to base because this was on the wish list of rc13 :) |
At least for me, PATH just points to the root dotnet folder and not a specific version. So i guess its the travis.yml that sets the dotnet environment variable to 2.1.4. |
Do u prefer updating the travis.yml or removing 'dotnet' from the environment in addition to MSBuild stuff (I have MSBUILD and MSBUILD_PATH on my machine and none of the ones listed. So they are missing aswell maybe?) |
Does that mean you have found the root cause? I'm not sure I understand. I feel like we should find the root cause but chaning travis.yml is a workaround if we can't find it. |
So build.fsx changes the workingDirectory to the directory of the just downloaded sdk. It does not change the dotnet executable though. That one is still the one that DotNet.exec finds. As in home/.dotnet i suppose. Do u know if the installer script both installs to home/.dotnet/sdk/2.1.300-rc1-008673 AND updates the executable that is in home/.dotnet/ ? Because it does not look like it does that on linux. |
Ok, i have changed the casing and i added the RC to the DotNet module. |
8198eca
to
f66af87
Compare
src/app/Fake.DotNet.Cli/DotNet.fs
Outdated
@@ -10,30 +10,30 @@ module DotNet = | |||
|
|||
// NOTE: The #if can be removed once we have a working release with the "new" API | |||
// Currently we #load this file in build.fsx | |||
#if NO_DOTNETCORE_BOOTSTRAP | |||
// #if NO_DOTNETCORE_BOOTSTRAP |
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.
Maybe just remove. I think you are correct and we don't need this anymore.
Do we need fsprojects/Paket#3208 or how did you make it work? |
@@ -95,7 +95,7 @@ group Build | |||
nuget SourceLink.Fake | |||
nuget ILRepack | |||
nuget RoslynTools.ReferenceAssemblies | |||
|
|||
nuget Newtonsoft.Json |
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.
Where does this come from?
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.
I #load the DotNet module directly so i can use DotNet.Release_2_1_300_RC1. If i dont add the Newtonsoft.Json the Bootstrap test fails. I can remove it and just add the new version directly and update that later.
Did u read the reason why travis build is probably using the wrong version? Do u have any opinions on how to fix that? I could
|
Sadly I cannot see the build anymore due to rebasing, the current build seems to have triggered a dotnet-cli bug :/ But IIRC the previous build did use the correct version (ie it started he correct version installed within the build) - instead the problem was the dotnet-cli used the msbuild sdk files from the global existing installation. I would consider this a bug in the Fake.Dotnet.Cli module, which probably can be debugged by just printing all environment variables before starting dotnet-cli |
It did use the right version, but probably only because i changed the travis.yml. I wanted to see if that helped. |
Maybe we talk through each other but if you use https://fake.build/dotnet-cli.html Ie combine the You can see it in the logs |
Ok circle-ci added an option recently to build pull requests, so next push should have an circleci build (to ease it a bit) |
Yes I agree, basically all but one are broken for some kind of input. We probably should all mark as obsolete. |
Added an issue #1940, will look at it eventually |
I am not using Args.toWindowsCommandLine right now. At least for travis the Process.quote is working fine (in this case at so far at least). |
Ok I think we probably should filter
in addition to |
And there is |
Google says it might be a good idea to unset that as well (at least when running the dotnet-cli) |
Google never lies! I added them. |
Should we remove all of the environment vars by default or just in the installer case? Somebody might set those intentionally. |
Actually it should be fine, I designed the setup in a way that if you set those manually it will "just work" |
Not sure why circleci was failing, retried the build. |
Should I merge this on staging so we can play around and look at the result? Please just merge/rebase on top of |
I think the current circleci error goes away after merge/rebase. |
Ahh you are too fast ;). Should i let these run or rebase again? |
The "UnskipAndRevertAssemblyInfo" target. Could that be a final target instead? This will not solve all the problems, as i sometimes just skip a build if a realise i forgot something, but at least for the cases where it just fails it should be in a valid state afterwards. |
Yes good idea. maybe we could detect ctrl+c and run final targets anyway no idea... |
It would probably be a good idea if you could test the global tool on your machine. I am still kinda sceptical because of
As i said, its working for me, but there must be a reason why he needed to make the changes to paket. |
OK lets try this out on our new shiny staging instance :) |
Nice :). Ping me if something is not working. |
Just for reference: The failure we saw on travis was a bug in travis, because it didn't actually install all dotnet sdk requirements. I reported it here: travis-ci/travis-ci#9644 |
It's released :) |
Hi,
since dotnet core 2.1 is in RC now, i created a global FAKE cli tool, based on the 'old' cli-tool.
I build fake itself with the tool, so it should be working fine (at least on my windows machine).
There are still some things we need to decide/do:
DotNetCliToolReference
. So should there be 2 tools now? I guess theDotNetCliToolReference
makes it easier for CI-Server so thats probably good. So i vote for 2 tools :)fake
.