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

hardcode dotnet version #20

Merged
merged 4 commits into from
Jan 3, 2018
Merged

hardcode dotnet version #20

merged 4 commits into from
Jan 3, 2018

Conversation

fbehrens
Copy link
Contributor

@fbehrens fbehrens commented Jan 3, 2018

maybe this is a fix for #19.
If it works next question would be where to get or store the dotnet-version.

@forki
Copy link
Member

forki commented Jan 3, 2018

Copy link

@tomasaschan tomasaschan left a comment

Choose a reason for hiding this comment

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

If we go this way instead of runDotNet, we should probably just remove that utility function and use DotNetCli.Test in the other call site.

Concievably, we could create a default config mutator which we chain with the mutator here, to set e.g. tool path and configuration in a single place.

let defaultConfig config = { c with Configuration = "release"; ToolPath = dotnetCliPath }

// ...

DotNetCli.Build defaultConfig
DotNetCli.Test (defaultConfig >> fun c -> { c with SomeOtherSetting = "changed" })

Note that without changing the toolspath in the test call site, the build will fail there with the same error as the one this attempts to solve (this is currently handled by runDotNet).

@fbehrens
Copy link
Contributor Author

fbehrens commented Jan 3, 2018

@forki: Can't find the function DotNetCli.GetDotNetSDKVersionFromGlobalJson() neither on github nor searching the git log of fake. Where is it ?

Should it be added to FAKE 5 via PR ?

@jindraivanek
Copy link
Contributor

@forki
Copy link
Member

forki commented Jan 3, 2018

@fbehrens yes I did not merge it to FAKE 5 since @matthid said this is done differently. But I don't really know how

@forki
Copy link
Member

forki commented Jan 3, 2018

ok let me PR it to FAKE 5

@forki
Copy link
Member

forki commented Jan 3, 2018

see fsprojects/FAKE#1754

@fbehrens
Copy link
Contributor Author

fbehrens commented Jan 3, 2018

@tlycken Totally agree, I do not have much knowledge about how all this is properly done with dotnet commands. +1 to use the Helpers from FAKE. Just have tried to use them, but expect the build to fail again. Should we just copy the scaffold (file structure / build.fsx ) from another fsproject, maybe the safe-bookstore?

@fbehrens
Copy link
Contributor Author

fbehrens commented Jan 3, 2018

the error message of the failed build on travis for our self-contained-hello-world is

/home/travis/.local/share/dotnetcore/dotnet "build" --configuration debug 
Failed to load (���, error: libunwind.so.8: cannot open shared object file: No such file or directory
Failed to bind to CoreCLR at '/home/travis/.local/share/dotnetcore/shared/Microsoft.NETCore.App/2.0.4/libcoreclr.so'
Finished Target: Build
Running build failed.

in https://github.com/dotnet/cli/issues/3390 it's said that apt-get install libunwind8 will fix this.
Don't know how to go on.

@tomasaschan
Copy link

in dotnet/cli#3390 it's said that apt-get install libunwind8 will fix this.
Don't know how to go on.

We can install dependencies in Travis before we start the build. In short, add the following to .travis.yml:

before_install:
  - sudo apt-get install libunwind8

If any other packages are needed too, just list them, space-separated, after the command above.

@tomasaschan
Copy link

Should we just copy the scaffold (file structure / build.fsx ) from another fsproject, maybe the safe-bookstore?

I'm strongly against such an approach; one of the fundamental properties of a build script/build pipeline is that it's useless as soon as it's "magic". In that case, it's much better if we can ensure that it's so dead-simple that we all understand how it works. That said, looking at other build scripts to see how they solve specific problems is, of course, not a problem; I just don't want the build script to include anything we don't need and aren't using.

@tomasaschan
Copy link

Nice!

The previous build error seems to have been a temporary glitch (from what I could understand in the build log, NuGet failed to respond). Restarting the build solved it.

And with that, we have working CI builds on Windows and Linux - thanks a lot, @fbehrens! 🎉

@tomasaschan tomasaschan merged commit fc65ccd into fsprojects:master Jan 3, 2018
@tomasaschan
Copy link

This also fixes #19.

@tomasaschan tomasaschan mentioned this pull request Jan 3, 2018
@forki
Copy link
Member

forki commented Jan 4, 2018

Yay!

@fbehrens fbehrens deleted the fix_travis branch January 4, 2018 07:57
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.

4 participants