fsprojects / FSharp.Compatibility

Compatibility libraries for F#
44 stars 22 forks source link

Updates paket files. #14

Closed ChrSteinert closed 6 years ago

wallymathieu commented 6 years ago

I've verified that the paket.bootstrapper.exe is paket.bootstrapper.exe

ChrSteinert commented 6 years ago

Do you mean the as of 88f7359667? I recon that it is a super old bootstrapper?

wallymathieu commented 6 years ago

No, as in I've code reviewed your pull request :wink:

wallymathieu commented 6 years ago

Question is how to fix the build so that this PR can be merged.

ChrSteinert commented 6 years ago

oooooooohh... sorry for being dense .

I'll take a look at the build.

wallymathieu commented 6 years ago

No worries 😃

ChrSteinert commented 6 years ago

I don't get, why Travis sais it failed. It seems to have the same output as the last sucessfull build.

wallymathieu commented 6 years ago

It looks like it's unable to compile https://api.travis-ci.org/v3/job/345857798/log.txt

    /home/travis/build/fsprojects/FSharp.Compatibility/.paket/paket.targets: error : Command 'mono --runtime=v4.0.30319 "/home/travis/build/fsprojects/FSharp.Compatibility/.paket/paket.exe" restore --references-file "/home/travis/build/fsprojects/FSharp.Compatibility/FSharp.Compatibility.Scala/paket.references"' exited with code: 2.

note the path ...

ChrSteinert commented 6 years ago

Seems like Travsi does not like ne new paket.targets file...

wallymathieu commented 6 years ago

If you look at the travis yml file, you can note that it's using xbuild directly. If you look at the output from xbuild :

>>>> xbuild tool is deprecated and will be removed in future updates, use msbuild instead <<<<

It might be using an old type of build by building that way on travis.

A lot of projects use FAKE. It might be easier to get it to work more reliably. What does @jmquigs and @jack-pappas think about doing something here along those lines?

wallymathieu commented 6 years ago

Another way forward could be to do something like appveyor.yml:

...
build_script:
   - .\.paket\paket.bootstrapper.exe
   - .\.paket\paket.exe restore
   - msbuild /t:build FSharp.Compatibility.sln 
...

and .travis.yml:

language: csharp

install:
  - mono .paket/paket.bootstrapper.exe
  - mono .paket/paket.exe restore

script:
  - msbuild /property:Configuration=Release FSharp.Compatibility.sln
...
wallymathieu commented 6 years ago

Sorry, accidentally closed the PR.

wallymathieu commented 6 years ago

I've added a branch to see how appveyor and travis handles it: https://github.com/fsprojects/FSharp.Compatibility/tree/trying-different-configuration

wallymathieu commented 6 years ago

Appveyor succeeds for that configuration, while using msbuild on travis gives the following: https://travis-ci.org/fsprojects/FSharp.Compatibility/builds/345874761 i.e. there might be some bug when compiling .net 4.0 with msbuild

wallymathieu commented 6 years ago

So a solution to appveyor build failure would be to change the appveyor.yml and add restore and build

jmquigs commented 6 years ago

@wallymathieu I don't have a strong opinion on build system, if Fake makes the build more reliable, then it is probably worth using it. Also, the .net 4.0 runtime seems pretty old at this point, is there any downside to using something newer (and would that help this issue?)

wallymathieu commented 6 years ago

As far as I can see it's not supported anymore. I used to target .net 4 in order to be able to run it on mono installations. But nowadays it's way easier to use later versions of .net for mono. Another reason why you might use .net 4 is because you have a specific version of Sharepoint that you target. I don't know how common it is that people are forced to use .net 4.0.

jmquigs commented 6 years ago

The appveyor build succeeds if I use VS2015 instead of VS2017. I suspect the project files need to be upgraded to 2017 for that to work. Or we could just keep it at 2015 for now.

wallymathieu commented 6 years ago

or that the paket.targets file works for vs2015 msbuild