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

add osx to travis (on master branch) #308

Closed
wants to merge 8 commits into from

Conversation

enricosada
Copy link
Contributor

with mono latest, let's check if osx works

with new edits from maintainers feature of github, i think you @kurtschelfthout can push commit to this branch

@enricosada
Copy link
Contributor Author

fail on osx, ok on linux

                Tool /Library/Frameworks/Mono.framework/Versions/4.4.2/lib/mono/4.5/mcs.exe execution started with arguments: /noconfig /debug:pdbonly /optimize+ /out:obj/Release/FsCheck.CSharpExamples.exe Program.cs Properties/AssemblyInfo.cs obj/Release/.NETFramework,Version=v4.5.AssemblyAttribute.cs /target:exe /define:TRACE /nostdlib /reference:/Library/Frameworks/Mono.framework/Versions/4.4.2/lib/mono/gac/FSharp.Core/4.3.1.0__b03f5f7f11d50a3a/FSharp.Core.dll /reference:/Library/Frameworks/Mono.framework/Versions/4.4.2/lib/mono/4.5-api/System.dll /reference:/Library/Frameworks/Mono.framework/Versions/4.4.2/lib/mono/4.5-api/System.Data.dll /reference:/Library/Frameworks/Mono.framework/Versions/4.4.2/lib/mono/4.5-api/System.Core.dll /reference:/Users/travis/build/fscheck/FsCheck/src/FsCheck/bin/Release//FsCheck.dll /reference:/Library/Frameworks/Mono.framework/Versions/4.4.2/lib/mono/4.5-api/mscorlib.dll /warn:4
Program.cs(143,27): error CS0305: Using the generic type `FsCheck.Gen<a>' requires `1' type argument(s)
                /Users/travis/build/fscheck/FsCheck/src/FsCheck/bin/Release//FsCheck.dll (Location of the symbol related to previous error)
Program.cs(143,31): error CS0117: `FsCheck.Gen<a>' does not contain a definition for `Choose'
                /Users/travis/build/fscheck/FsCheck/src/FsCheck/bin/Release//FsCheck.dll (Location of the symbol related to previous error)
Program.cs(146,30): error CS0305: Using the generic type `FsCheck.Gen<a>' requires `1' type argument(s)
                /Users/travis/build/fscheck/FsCheck/src/FsCheck/bin/Release//FsCheck.dll (Location of the symbol related to previous error)
Program.cs(146,34): error CS0117: `FsCheck.Gen<a>' does not contain a definition for `OneOf'
                /Users/travis/build/fscheck/FsCheck/src/FsCheck/bin/Release//FsCheck.dll (Location of the symbol related to previous error)
Program.cs(148,31): error CS0305: Using the generic type `FsCheck.Gen<a>' requires `1' type argument(s)
                /Users/travis/build/fscheck/FsCheck/src/FsCheck/bin/Release//FsCheck.dll (Location of the symbol related to previous error)
Program.cs(148,35): error CS0117: `FsCheck.Gen<a>' does not contain a definition for `Frequency'
                /Users/travis/build/fscheck/FsCheck/src/FsCheck/bin/Release//FsCheck.dll (Location of the symbol related to previous error)
Program.cs(165,33): error CS0305: Using the generic type `FsCheck.Gen<a>' requires `1' type argument(s)
                /Users/travis/build/fscheck/FsCheck/src/FsCheck/bin/Release//FsCheck.dll (Location of the symbol related to previous error)
Program.cs(165,37): error CS0117: `FsCheck.Gen<a>' does not contain a definition for `Choose'
                /Users/travis/build/fscheck/FsCheck/src/FsCheck/bin/Release//FsCheck.dll (Location of the symbol related to previous error)
Program.cs(200,20): error CS0305: Using the generic type `FsCheck.Gen<a>' requires `1' type argument(s)
                /Users/travis/build/fscheck/FsCheck/src/FsCheck/bin/Release//FsCheck.dll (Location of the symbol related to previous error)
Program.cs(200,24): error CS0117: `FsCheck.Gen<a>' does not contain a definition for `Sized'
                /Users/travis/build/fscheck/FsCheck/src/FsCheck/bin/Release//FsCheck.dll (Location of the symbol related to previous error)
Program.cs(208,28): error CS0305: Using the generic type `FsCheck.Gen<a>' requires `1' type argument(s)
                /Users/travis/build/fscheck/FsCheck/src/FsCheck/bin/Release//FsCheck.dll (Location of the symbol related to previous error)
Program.cs(208,32): error CS0117: `FsCheck.Gen<a>' does not contain a definition for `Sized'
                /Users/travis/build/fscheck/FsCheck/src/FsCheck/bin/Release//FsCheck.dll (Location of the symbol related to previous error)

@baronfel
Copy link

baronfel commented Sep 8, 2016

I can reproduce this failure on my local Mono install. I'm running mono 4.4.2 stable, installed from Homebrew.

@enricosada
Copy link
Contributor Author

really thx for help @baronfel

@enricosada
Copy link
Contributor Author

The dll built by @baronfel on osx

FsCheck.zip

@enricosada
Copy link
Contributor Author

There is no Gen class, only Gen<a>, that's explain the error

osx:

image

windows:

image

@baronfel
Copy link

baronfel commented Sep 8, 2016

Well now I've learned about Xamarin Studio's Assembly viewer. I definitely see the same thing.

screen shot 2016-09-08 at 1 05 10 pm

@enricosada
Copy link
Contributor Author

so GenModule instead of Gen

@@ -181,7 +181,7 @@ module Gen =
| :? array<_> as arr ->
elementsArr arr
| _ ->
choose (0, (Seq.length xs)-1) |> map (flip Seq.nth xs)
choose (0, (Seq.length xs)-1) |> map (flip Seq.item xs)
Copy link
Member

Choose a reason for hiding this comment

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

As you've noticed, this fails because master is still on an older version of FSharp.Core. :)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

#ifdef all the things! or not? i dont like warnings

Copy link
Contributor Author

Choose a reason for hiding this comment

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

btw i added this change because @baronfel tried to compile ootb with xamarin studio but failed (warning as error?), and the real compiler error of this issue was after these two warnings

Copy link
Member

Choose a reason for hiding this comment

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

That means you're compiling against a later version of FSharp.Core. FsCheck on master is compiled against 4.3.1.0 - this was not obsoleted in that version. So there is no reason for the ifdef. FsCheck project indeed has warnings as errors turned on.

@kurtschelfthout
Copy link
Member

That must be an F# compiler bug I think that somehow manifests only when you build on OSX. There is no reason why the Gen module should have Module appended to it (and indeed, this does not happen if you build .NET on Windows, or mono on Linux...).

@enricosada
Copy link
Contributor Author

Probably dotnet/fsharp#1319 and a different version of f# compiler

@kurtschelfthout
Copy link
Member

kurtschelfthout commented Sep 8, 2016

Thanks @enricosada - I've added some comments to the RFC. I don't particularly agree with this new behavior of the compiler...and I can't seem to turn if off either. So kind of stuck on this.

@enricosada
Copy link
Contributor Author

enricosada commented Sep 9, 2016

RFC or not, i think next questions are:

  1. a workaround? [<CompiledName>] or something else?
  2. why osx has this? it should not, it's using the same mono version of ubuntu.

/cc @dsyme

@ploeh
Copy link
Member

ploeh commented Sep 9, 2016

using the same mono version of ubuntu

Not that I'd claim to be an expert at all, but I thought MacOS was based on Unix (i.e. not Linux, so also not Ubuntu)...

@enricosada
Copy link
Contributor Author

@ploeh sry, bad phrase.

Using the same mono version number (4.2.2) in osx and ubuntu, why the fsc has that new RFC feature? or is a bug with osx only?
I tried also using mono 4.0.5 on osx (see travis logs ) and the error is the same. why?
is mono on osx installing HEAD fsc? dunno but is strange and should be investigated

@kurtschelfthout
Copy link
Member

The correct fix here, imo, is to use the same version (or as close as possible) of the compiler on linux/osx as the one we're using on Windows.

Note that according to the RFC, even CompiledName doesn't work to override the name.

@enricosada
Copy link
Contributor Author

enricosada commented Sep 9, 2016

@kurtschelfthout @ploeh we are getting this error on travis with mono version 4.0.5 (one year old), before the referenced pr (so maybe is not related but i think it is).

Mono JIT compiler version 4.0.5 ((detached/1d8d582 Tue Oct 20 15:15:33 EDT 2015)

that's strange..

we need a minimal repro of the issue and open a new issue in fsharp/fsharp repo

@kurtschelfthout
Copy link
Member

@enricosada I mean version of fsc. Is that controllable?

@kurtschelfthout
Copy link
Member

Yes, agree that's weird.

@enricosada
Copy link
Contributor Author

i dont know an easy way, i dont have my mac near atm, and there is not sha commit in version.

Ok but for sure that's the last time, i am gonna add fsc /version and fsc /info, with info about git commit sha and build date. It's not the first time i have this pain

@kurtschelfthout
Copy link
Member

@enricosada can you enable write access on this branch? see https://github.com/blog/2247-improving-collaboration-with-forks

GitHub seems to claim I don't have write access...

@enricosada
Copy link
Contributor Author

Allow edits from maintainers.

Was already checked, dunno you get error in push?

@kurtschelfthout
Copy link
Member

sorry, my mistake, git trouble :) worked now. I tried a few workarounds, we'll see...

@enricosada
Copy link
Contributor Author

@kurtschelfthout remove some from build Matrix in travis.
Atm there are lots mono versions...

@kurtschelfthout
Copy link
Member

This is so weird. The only build on linux that works, which claims to use F# 4.0 compiler and FSharp.Core 4.3.1.0 nonetheless gives a deprecation warning for Seq.nth. But for sure the FSharp.Core 4.3.1.0 on windows does not have that deprecation warning.

On OSX I have no idea what it's doing but it never works. And old mono on linux seems to kill the mono runtime when running paket.

What a mess!

@kurtschelfthout
Copy link
Member

I give up on this :)

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