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

Module functions for 'T option'T voption #17436

Merged
merged 6 commits into from
Jul 26, 2024

Conversation

brianrourkeboll
Copy link
Contributor

@brianrourkeboll brianrourkeboll commented Jul 23, 2024

Description

module Option =
    val inline ofValueOption : voption : 'T voption -> 'T option
    val inline toValueOption : option  : 'T option  -> 'T voption
module ValueOption =
    val inline ofOption : option  : 'T option  -> 'T voption
    val inline toOption : voption : 'T voption -> 'T option

Checklist

  • Test cases added.
  • Release notes entry updated.

Notes

It seems to me like this ought to have been part of fsharp/fslang-suggestions#703, as @Thorium pointed out in fsharp/fslang-suggestions#703 (comment).

I can open a new language suggestion and RFC for this if needed — but perhaps we could just update RFC FS-1065 instead?

Copy link
Contributor

github-actions bot commented Jul 23, 2024

❗ Release notes required


✅ Found changes and release notes in following paths:

Change path Release notes path Description
src/FSharp.Core docs/release-notes/.FSharp.Core/9.0.100.md

@brianrourkeboll
Copy link
Contributor Author

brianrourkeboll commented Jul 23, 2024

It looks like this bit of the CI

- script: dotnet build ./FSharp.Compiler.Service.sln /bl:\"artifacts/log/$(_BuildConfig)/ServiceRegularBuild.binlog\"

means that f4ca9f4 might need to go in a separate PR?

@brianrourkeboll brianrourkeboll marked this pull request as ready for review July 23, 2024 20:45
@brianrourkeboll brianrourkeboll requested a review from a team as a code owner July 23, 2024 20:45
@psfinaki
Copy link
Member

/azp run

Copy link

Azure Pipelines successfully started running 2 pipeline(s).

@psfinaki
Copy link
Member

@brianrourkeboll, I don't see how the CI stuff can be directly related here... can you maybe rerevert the changes so that we can investigate a bit? It would be nice to get rid of all those dupes of this. And yeah, our CI is quite flaky recently.

@brianrourkeboll
Copy link
Contributor Author

brianrourkeboll commented Jul 24, 2024

@psfinaki The CI failed when it was directly invoking dotnet build on FSharp.Compiler.Service.sln (the "Regular rebuild of FSharp.Compiler.Service.sln" step in the Plain_Build_* runs), which meant that it wasn't using the modified version of FSharp.Core.

Since f4ca9f4 replaced the internal functions with calls to the new ones in FSharp.Core, but the new version of FSharp.Core wasn't being used, it wouldn't compile.

I believe this was the run: https://dev.azure.com/dnceng-public/public/_build/results?buildId=752388&view=results

Unfortunately, I guess my cancelling of the run by force-pushing cleared the results away.

@psfinaki
Copy link
Member

psfinaki commented Jul 24, 2024

Right, yeah I was looking at the wrong results then.
That's clear, I think we can remove the dupe in a followup.

Copy link
Member

@psfinaki psfinaki left a comment

Choose a reason for hiding this comment

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

@vzarytovskii @abelbraaksma should we update the RFC (before or after the merge)?

@T-Gro
Copy link
Member

T-Gro commented Jul 26, 2024

Thanks for this addition.
I will merge this in. @brianrourkeboll : Could you please update the existing RFC FS-1065 with the added signatures?

@T-Gro T-Gro merged commit 302169c into dotnet:main Jul 26, 2024
30 checks passed
@brianrourkeboll brianrourkeboll deleted the option-voption branch July 26, 2024 12:31
@psfinaki
Copy link
Member

Thanks for the RFC as well @brianrourkeboll. Would be cool to remove all the dupes from the codebase now. If you don't have time for this, I can probably create a PR from the commit with those changes that you had in this PR.

@brianrourkeboll
Copy link
Contributor Author

@psfinaki All right, I opened #17457.

If the CI step mentioned in #17436 (comment) is using a shipped version of FSharp.Core, though, then this change may need to wait (or we may need to modify that step, depending on its intent).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

4 participants