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

WIP make TP context prep more fully on-demand #326

Closed
wants to merge 1 commit into from

Conversation

dsyme
Copy link
Contributor

@dsyme dsyme commented Nov 28, 2019

WIP fix for #325

  1. delay work preparing a TP that has static parameters by avoiding type translation for the static parameters
  2. do not report the common custom attributes on TPs that have static parameters

The underlying problem is that the mere presence of a provided type like "FSharp.Data.HtmlProvider" (uninstantiated) causes the F# compiler to interrogate that type for its custom attributes. This eagerly translates both the static paramaters and information int he custom attributes to the target context, causing readers for all the assemblies in the target context to be created.

I've checked this removes the context preparation for unused FSHarp.Data reference

There is a problem with this fix however: the XML doc on a provided type with static parameters is no longer reported to the compiler. I need to think if/how this can be avoided, it's possible an F# compiler fix/change may be needed to stop it eagerly interrogating the attributes on some types.

@dsyme dsyme changed the title WIP make context prep more fully on-demand WIP make TP context prep more fully on-demand Nov 28, 2019
@dsyme dsyme closed this Sep 20, 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 this pull request may close these issues.

1 participant