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

Unresolved symbols in FCS solution #12142

Closed
auduchinok opened this issue Sep 13, 2021 · 9 comments · Fixed by #12149
Closed

Unresolved symbols in FCS solution #12142

auduchinok opened this issue Sep 13, 2021 · 9 comments · Fixed by #12149

Comments

@auduchinok
Copy link
Member

auduchinok commented Sep 13, 2021

This line now produces an error (despite the project actually building fine):

member x.Values = contents.Values |> List.concat

It probably happens due to a recent Map change in FSharp.Core. I thought we were trying to be able to use the released FSharp.Core package in FCS, so this error is unexpected. It's also interesting why the project builds (i.e. what FSharp.Core it actually uses?) and why the tooling behaves differently?

Rider:
Screenshot 2021-09-13 at 17 15 59

Visual Studio 2019:
Screenshot 2021-09-13 at 17 15 37

@vzarytovskii
Copy link
Member

vzarytovskii commented Sep 13, 2021

May be related to: #11968 and #12108
@KevinRansom fyi

@auduchinok
Copy link
Member Author

@dsyme @KevinRansom What FSharp.Core version these changes are going to land to? Will it be 5.0.3 or 6.0?
When FSharp.Core 5.0.3 is going to be released?

Right now working on FCS is much harder due to these errors. Also, we'd prefer to keep using stable FSharp.Core versions and update when needed (there's some additional work we have to do update the bundled FSharp.Core).

@dsyme
Copy link
Contributor

dsyme commented Sep 15, 2021

It looks like

  <ItemGroup Condition="'$(FSHARPCORE_USE_PACKAGE)' == 'true'">
    <PackageReference Include="FSharp.Core" Version="$(FSharpCorePreviewPackageVersion)" />
  </ItemGroup>

should be

  <ItemGroup Condition="'$(FSHARPCORE_USE_PACKAGE)' == 'true'">
    <PackageReference Include="FSharp.Core" Version="$(FSharpCoreShippedPackageVersionProperty)" />
  </ItemGroup>

@dsyme
Copy link
Contributor

dsyme commented Sep 15, 2021

I mean, if we're using a package it should be a shipped package.

@auduchinok
Copy link
Member Author

@dsyme Could you reopen it?

@vzarytovskii
Copy link
Member

It seems that #12149 didn't fix it, going to reopen it.

@vzarytovskii vzarytovskii reopened this Sep 17, 2021
@dsyme
Copy link
Contributor

dsyme commented Sep 22, 2021

@auduchinok Could you give me steps to repro this?

  1. msbuild service/FSharp.Compiler.Service.sln works fine
  2. I open service/FSharp.Compiler.Service.sln in VS2022 preview and the errors aren't appearing.

There is however a warning marker on this 5.0.2 FSharp.Core references which I don't understand (and can't work out what warning that is referring to)

image

@auduchinok
Copy link
Member Author

I open service/FSharp.Compiler.Service.sln in VS2022 preview and the errors aren't appearing.

They do appear for me in VS2019 and Rider 2021.3 preview. I've reproduced it roughly like this:

cd fsharp
git clean -dfx
./build.cmd

and then open the FCS solution in an IDE.

What I've managed to discover is the conditional FSharp.Core reference is being ignored completely here, and another one transitively comes from FSharp.DependencyManager.Nuget project, where it's not conditional and always references the project output. I suspect the warning you see could be related here. The workaround that helps me is changing the reference in that project.

@dsyme
Copy link
Contributor

dsyme commented Sep 22, 2021

What I've managed to discover is the conditional FSharp.Core reference is being ignored completely here, and another one transitively comes from FSharp.DependencyManager.Nuget project, where it's not conditional and always references the project output.

I see, yes, that makes sense, we should adjust that too

@dsyme dsyme mentioned this issue Sep 22, 2021
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 a pull request may close this issue.

4 participants