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

>=1.3.0 causes nonsensical Intellisense/compilation errors (due to applicatives?) #84

Closed
cmeeren opened this issue Jun 8, 2020 · 9 comments
Labels
upstream Issue is in an upstream dependency but still affects us

Comments

@cmeeren
Copy link
Contributor

cmeeren commented Jun 8, 2020

After upgrading from 1.2.6 to 1.3.0 or above, I get nonsensical compilation errors:

image

I guess this has to do with applicatives.

I am using <LangVersion>preview</LangVersion> to get access to nameof, which I use extensively in logging.

It builds fine with the VSBuild task on Azure Pipelines, but locally there's nothing that can make it compile except downgrading to 1.2.6.

Note that I am not even using and!; the error come just from upgrading FsToolkit.ErrorHandling.

The errors can often be "fixed" by reordering the bang operator lines if possible, but that's not always possible nor desirable. For example like the below (which can't be used due to incorrect behavior):

image

@cmeeren cmeeren changed the title >=1.3.0 (applicatives?) causes nonsensical Intellisense/compilation errors >=1.3.0 causes nonsensical Intellisense/compilation errors (due to applicatives?) Jun 8, 2020
@TheAngryByrd
Copy link
Collaborator

This unfortunately feels like an F# compiler issue. :(

@baronfel and I are looking at making a PR to FSharp.Core soon.

@TheAngryByrd TheAngryByrd added the upstream Issue is in an upstream dependency but still affects us label Jun 8, 2020
@TheAngryByrd
Copy link
Collaborator

For a workaround right now could you do:

let! _ = finalizeUpdate user

@cartermp I think we found another edge case in CEs wrt applicatives.

@cartermp
Copy link

cartermp commented Jun 8, 2020

@dsyme looks like an issue to investigate here

@cmeeren
Copy link
Contributor Author

cmeeren commented Jun 8, 2020

For a workaround right now could you do:

let! _ = finalizeUpdate user

Thanks for the tip. I'll stick with 1.2.6 for now; it's the most non-intrusive solution.

@TheAngryByrd
Copy link
Collaborator

I can definitely confirm this bug happens when adding the BindReturn member.

@baronfel
Copy link

baronfel commented Jun 8, 2020

@cartermp I'm about to submit an issue with more details that should help narrow it down

@TheAngryByrd
Copy link
Collaborator

I'm going to keep this open until F# release a new preview with the fix

@TheAngryByrd
Copy link
Collaborator

Pretty sure this is fixed in F# 5.0

@cmeeren
Copy link
Contributor Author

cmeeren commented Nov 24, 2020

Was fixed in an updated VS version, to be specific. Don't remember exactly which. The referenced FSharp.Core version seems irrelevant.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
upstream Issue is in an upstream dependency but still affects us
Projects
None yet
Development

No branches or pull requests

4 participants