Skip to content

Conversation

@Frassle
Copy link
Contributor

@Frassle Frassle commented Mar 21, 2019

This changes FSharp.Core.UnitTests to always build against the FSharp.Core library in the repository. This ensures that FSharp.Core changes are correctly tested by CI, and it's easier to build and test changes to the library via make/build.cmd.

@KevinRansom
Copy link
Contributor

@Frassle , I will take a look at this, I don't think this is really the right fix. Because after all BUILD_IN_FSHARP_REPOSITORY should be true, in which case, it wouldn't use the nuget package.

However, something is causing it to be false. Probably this is due to one of the directory.targets or directory.props, or I suppose both not looking up a directory.

The scenario, where this is false is interesting, is for coreclr testing. Sometimes they will want to rebuild the tests, without access our full repo so they just suck an fsharp.core from nuget.

I hope that makes sense.

Kevin

@dsyme
Copy link
Contributor

dsyme commented Mar 21, 2019

I mentioned this problem here too #6325 (comment)

What is BUILD_IN_FSHARP_REPOSITORY used for? It looks wrong to me, it should likely just be removed as in this PR

@KevinRansom
Copy link
Contributor

We build a nuget package with unit tests for the coreclr. They need to be able to build the tests, this is so they can build our unit tests from vs without having our full repo.

@dsyme
Copy link
Contributor

dsyme commented Mar 21, 2019

We build a nuget package with unit tests for the coreclr. They need to be able to build the tests, this is so they can build our unit tests from vs without having our full repo.

Ah I see, ok. This is activating in our CI. We need a #define for this to test features and fixes not yet available in the nuget package, and CI should test with that define both on and off.

@KevinRansom
Copy link
Contributor

KevinRansom commented Mar 21, 2019 via email

@Frassle
Copy link
Contributor Author

Frassle commented Mar 27, 2019

OK taking all the above into account that this is needed in some cases I traced through to try and understand how it might suppose to work and why it's broken.

FSharp.Core.UnitTests uses a project reference for FSharp.Core if BUILD_IN_FSHARP_REPOSITORY is set to true. That variable is set to true inside FSharpTests.Directory.Build.props. That props file is included by the tests\EndToEndBuildTests\Directory.Build.props and conditionally by FSharp.Directory.Build.props if FSharpTestCompilerVersion is not blank. FSharpTestCompilerVersion only seems to be set by files within the EndToEndBuildTests.

So because the unit tests don't explicitly include FSharpTests.Directory.Build.props instead just including each Directory.Build.props file in the folder chain, and because nothing in the unit test build sets FSharpTestCompilerVersion then BUILD_IN_FSHARP_REPOSITORY is never set.

All the obvious fixes would be to somehow include FSharpTests.Directory.Build.props but I'm not sure it's right that the unit tests should start including that instead of FSharpBuild.Directory.Build.props (what they include now).

It all seems horrifically complicated, and that's before even considering how coreclr are using this repo.

@KevinRansom
Copy link
Contributor

@Frassle you are not wrong about the horrifically complicated.

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 this pull request may close these issues.

3 participants