-
Notifications
You must be signed in to change notification settings - Fork 790
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: Async.Choice #744
WIP: Async.Choice #744
Conversation
f354534
to
71982b0
Compare
strange. shouldn't a surface area test be red? |
|
||
[<Test>] | ||
member this.``Async.Choice takes first result that is <> None``() = | ||
let returnFirstResult (n:PositiveInt) (i:PositiveInt) x = |
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.
To avoid casting to int
afterwards, one can write (PositiveInt n) (PositiveInt i)
.
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.
cool thx
@forki we can add APIs to fsharp.core in the master branch no problem. We will need to change the fsharp.core version number for the next major release. for VS2015 branch we will not add APIs to fsharp.core. |
@KevinRansom do you know why this doesn't break the surface area tests? |
@forki Looking at it now. |
Can I ask a stupid question but why? Does this mean we potentially have different surface areas for vs2015 and mono/core clr etc?? |
@colinbull Every new major release we have new API's. F# 3.0, F# 3.1 and F# 4,0 all introduced new language features and CORE APIs. fsharp.org refresh the fhsarp/fsharp repo, and then Xamarin will update the mono version of the compiler. So no ... we will not have different API's across the various platforms. However, there will be different versions of F# and fsharp.core in existence in the same way that there always has been. I hope this clears things up ... Kevin |
@forki Just testing a fix. |
Ahh, yes of course. If I'd have thought about I already knew this.. Thanks for the clarification thou. Sent from my iPhone
|
@forki It now successfully fails. |
ok build now fails for the correct reason. thanks kevin |
bc6c391
to
6a05c25
Compare
Imagine a world where it's harder for tests to fail than to succeed. Briefly we lived in such a world. |
@KevinRansom so you mean the case of the "successful failure"? |
Kevin, I can't get the build working on my machine. It always fails in the
|
I will look at it when I get home. However, the portable libraries have quite different version numbers from the shipping fsharp.core and so ... hopefully would never accidently bind to items in the GAC. |
@forki If you want to run the portable unit tests:
If you run them after running appveyor-build.cmd then everything should be set up peachy I do think it makes sense to run at least one of the portable tests in appveyor-build.cmd, so I will add 259 to it. Hopefully that won't bust the ci time budget |
@KevinRansom @forki about test suite and appveyor, i added #750 to run all test suites |
Just to clarify: my issue is that local appveyor-build.cmd (which is still the only build script we have right?) doesn't test against the self built fsharp.core but against some version that does not contain the choice method. |
@forki locally you need to run all steps inside DEVGUIDE - Full Steps Before Running Tests, so dll are built and RunTest.cmd use these, otherwise the assembly in gac are used. if you run
and yes, we need to improve the build script and add some helpers to make it easier to contribute |
I thought we already had this. sigh |
sry my bad, i was writing about debug configuration. |
no I meant: yes I run only the appveyor-build.cmd, but I thought it already did the correct thing. |
it should (build release and run a subset of tests) maybe the referenced dll is wrong, i'll check this branch |
@forki sent a pr |
Guys, "This function is written by @eiriktsarpalis and already in use in Paket, but IIRC he still wants to change some bits to make it fitting into FSharp.Core." Would you like to rewrite the history of the PR a bit to correctly attribute erik for his contribution. Git does a good job of maintaining attribution for code. Alternatively ... and less desirably ... assert that you own the rights to the code, and are sharing it under apache 2.0. It's important that the licensing is correct. Thanks Kevin |
I can close this one if @eiriktsarpalis wants to resubmit. |
I'm happy for the api, it's just I would like to ensure attribution is correct. |
Closing in favor of #807 |
This is a first draft of Async.Choice as proposed in
https://fslang.uservoice.com/forums/245727-f-language/suggestions/10575069-add-async-choice-to-fsharp-core
This function is written by @eiriktsarpalis and already in use in Paket, but IIRC he still wants to change some bits to make it fitting into FSharp.Core.
I added some very basic tests and hope to write more tests soon.
I know that adding stuff to FSharp.Core is not easy and therefor this is low priority and should only be merged the next time you consider to change the Fsharp.Core surface area.
This code is part of my FsAdvent post.