Skip to content

Conversation

@KevinRansom
Copy link
Contributor

The Net 7.0 SDK introduced by reference assemblies built by default. This means that when building with type providers F# started to fail with an error similar to:

c:\kevinransom\fsharp\tests\EndToEndBuildTests\BasicProvider\BasicProvider.Tests\BasicProvider.Tests.fsproj (in 356 ms).
FSC : error FS2030: Invalid use of emitting a reference assembly, do not use '--staticlink', or '--refonly' and '--refout' together
. [c:\kevinransom\fsharp\tests\EndToEndBuildTests\BasicProvider\BasicProvider.Tests\BasicProvider.Tests.fsproj]
Error: TestBasicProvider failed

This PR weakens the verification when performing a static link, such that types generated by type providers are linked to the reference assembly. The linked types will not contain full implementations, they should be linked ref assembly types.

The staticlink and standalone assemblies are not currently intended to work with reference assemblies and validation is performed when the command line is parsed.

We will consider relaxing this in the future but we will need to do additional linking testing before we are confident enough to relax this.

@KevinRansom KevinRansom requested a review from a team as a code owner November 30, 2022 23:13
T-Gro
T-Gro previously approved these changes Dec 1, 2022
psfinaki
psfinaki previously approved these changes Dec 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

4 participants