feat(compiler): add schema support for elements#3225
feat(compiler): add schema support for elements#3225pkozlowski-opensource wants to merge 1 commit intoangular:masterfrom
Conversation
c77cec0 to
e303984
Compare
There was a problem hiding this comment.
Why do we need an interface with methods? Why not just field names?
There was a problem hiding this comment.
Changed to fields. One downside of this is that instances of the ElementSchemaEntry are mutable now.
|
I assume there is a fallow up SHA since this is not hooked up to anything? What about renames? I think we need some API which will allow the schema to communicate that |
96fd66c to
fc16e58
Compare
|
@mhevery I did all the renames, your proposals sound better to me as compared to the initial naming.
Yes, this is what
Definitively. But I would like to discuss how to plug things in the Dart version, as I assume that we will need hand-written schema for Dart? |
fc16e58 to
f9d59aa
Compare
|
Pawel, I think we should also add information about events. Note sure if we need it, but knowing the type of properties would also be nice... (e.g. boolean / string / object) |
Definitively! I just want to put in place the basic infrastructure first that we can gradually extend. The main blocker for me for now is taking a decision about Dart - since we need to have a hand-written schema we need to coordinate here. |
f9d59aa to
1158a74
Compare
1158a74 to
270b882
Compare
|
Closing in favor of #3330 |
|
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
This PR adds all the infrastructure for schema support (#2014), without plugging it into the existing compiler (as we need to have hand-crafted schema for Dart).
Here the basic info about the design / reasoning:
ElementSchemaRegistry- "knows" schema for all the elements in the entire system and handles "extends"ElementSchemaEntry- "knows" schema for one element typeCurrently there are 2 implementations of the
ElementSchemaEntry: "static" (hand-written) and "reflective" (to be used on the JS side). One registry can combine entries of any types.@mhevery @tbosch could you please review? I would also like to discuss how we could plug this into the existing compiler (reflective impl will work in JS but will fail in Dart and we need to decide who / when should to hand-craft schema for Dart)