Skip to content

Conversation

@KevinRansom
Copy link
Contributor

No description provided.

@KevinRansom KevinRansom reopened this Apr 16, 2019
Copy link
Contributor

Choose a reason for hiding this comment

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

Factor this out into Directory.Build.targets somehow

@KevinRansom
Copy link
Contributor Author

@dsyme, Okay, this PR now fails, because the Proto compiler using the FSharp.Core from build from source can not build the end-product compiler. That is because the FSharp.Core from build from source does not have ValueOption.

However, if the LKG builds a proto FSharp.Core from the source code in our repo. Everything works great and as expected. This got me to really think about things, and now I realize that I don't really understand your problem at all.

The process currently is and should be:
LKG builds Proto builds Product.

Where we are talking about all of the components that make up the compiler:
FSharp.Build … FSharp.Compiler.Private … fsc etc …

It is not clear to me why we need to reuse and old FSharp.Core in order to make this work.

In short: what are the specific problems that stops the LKG from being able to build FSharp.Core.

Thanks

Kevin

@dsyme
Copy link
Contributor

dsyme commented Apr 18, 2019

In short: what are the specific problems that stops the LKG from being able to build FSharp.Core.

OK I see, yes, using the LKG FSharp.Core is a problem.

There are two issues I facec:

  1. new FSharp.Core may contain constructs not recognised by LKG, such as nullness annotations. We can workaround that via #if BUILD_FROM_SOURCE - it's a PITA but we can do it.

  2. there is a bug in the LKG preventing the compilation of overloads that differ only by return type (which is needed for op_Explicit operators, related to [RFC FS-1071] Witnesses passing for trait-constraints w.r.t. quotations #6345) - that bug is only fixed by [RFC FS-1071] Witnesses passing for trait-constraints w.r.t. quotations #6345 itself.

I'll try to workaround (2) using #if BUILD_FROM_SOURCE in FSharp.Core - but ideally we just wouldn't need to do this, e.g. if Proto could somehow use FSharp.Core from a package (I've been using 4.6.2). But I understand if we can't.

@dsyme
Copy link
Contributor

dsyme commented Apr 18, 2019

OK I looked into (2) in the context of #6345 - I can workaround using BUILDING_WITH_LKG.

The problem is that the LKG (and all prior versions of F#) have a limitation where no overloaded method in FSharp.Core can be inlined. But #6345 introduces a whole bunch of these methods (and also fixes that limitation).

@dsyme
Copy link
Contributor

dsyme commented Apr 18, 2019

@KevinRansom Thank you for trying with this. We can close it - I've been able to #if my way out of trouble

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