Conversation
|
Just to be clear, this still ends up exporting the same data for the npm package and only effects the source code right? I'd rather avoid having to parse references to other features in my app that consumes the data :) |
|
Yes, this only affects the source code, as the data exported in the npm package is already pre-parsed (although, you’ll have to watch for infinite recursion and cycles if the implementation gets merged as-is). |
|
Any possibility we could come up with a way to allow merging of information? Consider this potential use case:
This lets us create the JSON in a less confusing way while giving us much more control over how the results look. We could even export from the tools that build the files from the imports separate files for each input element type that could be referenced by tools that know how to do so, if we wanted to. |
|
@ExE-Boss -- Do you have any examples for what the |
|
It is currently just a feature path, as can be seen in the sample data: browser-compat-data/test/sample-data.json Lines 310 to 332 in 406d7f3 |
|
That's perfect. Exactly the way I'd love to have it work.
…On Thu, Sep 20, 2018 at 12:26 PM ExE Boss ***@***.***> wrote:
It is currently just a feature path, as can be seen in the sample data:
https://github.com/mdn/browser-compat-data/blob/406d7f339253c3c549a6d842b9eb0b044c55f0ae/test/sample-data.json#L310-L332
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#1799 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABkL30W56CuhqSVeEzjc-v9iocI0uKNGks5uc8GtgaJpZM4TYXkH>
.
--
Eric Shepherd
Senior Technical Writer
Mozilla
Blog: http://www.bitstampede.com/
Twitter: http://twitter.com/sheppy
Check my Availability <https://freebusy.io/eshepherd@mozilla.com>
|
|
Any chance we're actually going somewhere with this? I ask because I have stuff that I've been keeping on hold pending this landing and I don't know how long I should keep waiting. |
|
#2487 will have to be merged first to avoid merge conflicts. |
|
@ExE-Boss Looks like that PR has been merged now. I'm eager to see this PR get merged -- would you be up for rebasing? |
|
Thanks for your enthusiasm @vinyldarkscratch but I don't see this landing anytime soon from a maintainer's point of view. It would be a major change to how we have the data stored here and I don't think we're ready to make this change just yet. I will let you know when we want to revisit this. :) |
| "__compat": { | ||
| "description": "This sub-feature has imports", | ||
| "support": { | ||
| "webview_android": { |
There was a problem hiding this comment.
This should be last, not first.
There was a problem hiding this comment.
Yeah, this was written before work on #1882 began.
|
Sounds like a plan, @Elchi3! I am indeed pretty eager for this, haha -- whilst going through the JSON I've run into instances where an import would be more than helpful. Looking forward to seeing this complete and merged! |
|
Yeah, I have updates to BCD that are holding for this to land because otherwise the repetitiveness would be ugly :) |
|
Bulk data updates through external sources and scripts are our preferred approach to better compat data right now and we're not currently considering de-duplicating version data. Therefore I'm closing this issue. Thanks for your thoughts here! Maybe we will reconsider this idea at a later stage. |
Fixes #813
Closes #1681
This works by having an extra
__importblock, which contains the features you wish to import and the optional__askey, which is used to rename the imported feature and optional entries which override the imported data.Cycles and infinite recursion are currently allowed if imported data isn’t overriden. They might also work if imported data is overriden depending on how the
extendpackage deals with cycles and infinite recursion.To do: