-
Notifications
You must be signed in to change notification settings - Fork 301
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] Quotation support #1839
base: nagareyama
Are you sure you want to change the base?
[WIP] Quotation support #1839
Conversation
…Let working atm.)
…ples (avoiding Unicode problems)
# Conflicts: # src/Fable.Transforms/FSharp2Fable.fs # src/Fable.Transforms/Fable2Babel.fs # src/fable-library/Reflection.ts
7fe56ba
to
e549bb1
Compare
Would love to see this finally land. |
Yes, my last thinking was to turn this into a It'd be great if someone would step up and lead the next major release. I would still be providing support, of course. Any volunteers? :) |
Hey, I'm not really capable of doing that, but I can certainly finalize the quotation/reflection things. |
eb476fc
to
d5227d6
Compare
@alfonsogarciacaro See #2075. |
Hey there, |
That'd be great @krauthaufen! I'm about to write an issue for the roadmap for Fable 3, so we can continue the discussion there. One quick question though, all the reflection support added in this PR is necessary for supporting the quotations or just to be able to execute a quotation in runtime? |
Hey, we could certainly support quotations without MethodInfo/PropertyInfo invokes but in many cases these are required... I'm not sure regarding the new reflection, but for quotations reflection needs to be more or less feature-complete since they need basically everything (ConstructorInfo, MethodInfo/etc.) |
It would be great if there was a way to tree-shake type data that isn't used. Then this becomes a non-issue |
Hello, I have a project that needs code quotations. What is the status of this? Is there anything I could do to help? One idea I'm investigating is to create a separate |
I was planning to merge this with Fable 3, but then focused on other goals and unfortunately this branch is diverging more and more from the main one ( The first step would be to sync this with |
The idea was to have a
Hmm maybe we should differentiate the level of reflection support needed for code quotations from full support. Full reflection by its nature is not really amenable to tree shaking because someone could reflect any member of any type dynamically, so we must include all data. Code quotations on the other hand I think are fairly static expressions, where we know at compile time what reflection data is needed. In that case, perhaps they could just reference the specific reflection data and the rest would be omitted? |
Sorry for the late reply. I might be entirely wrong because it's been a long time since I haven't checked this branch, but I think the PR includes reflection support for invoking methods in order to run the quotations. Maybe it could be a good compromise to implement the PR without this for when there's no need to run the quotations, although unfortunately I'm not sure how much work that would entail. |
Continuation of #1818. Credit goes to @krauthaufen. Opening the PR to check the diffing with master while we evaluate. The branch has been published as
fable-compiler-quotations
to npm, can be tested by installing the package and then adding "compiler" to your Fable options like: