Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

MDN Compat Service via static analysis

9 views
Skip to first unread message

Luke Crouch

unread,
Oct 19, 2014, 4:42:15 PM10/19/14
to dev-stati...@lists.mozilla.org, dev...@lists.mozilla.org
dev-static-analysis,

Hi, I'm a Mozilla staff web developer on MDN, and I'm exploring an idea
to offer Web-Compatibility-Scanning-as-a-Service via MDN. [1]

e.g., When a developer sends a pull request, we scan its HTML, CSS,
and/or JavaScript and comment with a report of which code breaks which
browsers.

We've been working on a browser compatibility data store & API [2][3].

To that, we (think we) need to add a linting tool that will use the
compat data store to make a code compatibility report.

The question for this group is - can we get someone who knows static
analysis involved now to help us make sure the compat data model is
conducive to generating rules for the linter?

Thanks,
-L

[1]
https://docs.google.com/document/d/1c5w87-KDZCP9eltjfk98GL_i-hyqQ193J86_e1L4wnQ/edit?usp=sharing

[2] https://wiki.mozilla.org/MDN/Development/CompatibilityTables
[3] http://doesitwork-dev.allizom.org/

Erik Rose

unread,
Oct 20, 2014, 3:16:59 PM10/20/14
to Luke Crouch, dev...@lists.mozilla.org, dev-stati...@lists.mozilla.org
> We've been working on a browser compatibility data store & API [2][3].
>
> To that, we (think we) need to add a linting tool that will use the
> compat data store to make a code compatibility report.
>
> The question for this group is - can we get someone who knows static
> analysis involved now to help us make sure the compat data model is
> conducive to generating rules for the linter?

I'm happy to consult. Want to set up 20 minutes to chat sometime? I think it'll be a lot more efficient to do a bursty, high-bandwidth session than for me to try to reconstruct your brain contents from etherpads.

For CSS and HTML, you'll barely have to do anything deserving of the term "analysis"; I imagine you'll mostly be checking attribute and property names. But there will be some parsing, and that's one of my favorite things. JS will, of course, be hard and should probably wait for 2.0. We're working on that as well, as part of DXR, so we can share some code. For our 20-minute powwow, how about you bring compatibility schema ideas, I'll bring parsing and analysis knowledge, and we'll figure out how to make them meet in the middle?

Cheers,
Erik

David Bruant

unread,
Oct 20, 2014, 5:04:45 PM10/20/14
to Luke Crouch, dev-stati...@lists.mozilla.org, dev...@lists.mozilla.org
Hi,

As far as JS is concerned, one possibility is to play with the
TypeScript compiler.
TypeScript, via definition files covering default libraries [1][2]
provided by default can do type checking of JS code.
One possibility could be to leverage TypeScript and provide different
default definition files to see what breaks and what doesn't for the
code being checked.

(happy to chat if I'm being too obscure here)

David

[1] https://github.com/Microsoft/TypeScript/blob/master/src/lib/core.d.ts
[2]
https://github.com/Microsoft/TypeScript/blob/master/src/lib/dom.generated.d.ts

Le 19/10/2014 22:42, Luke Crouch a écrit :
> dev-static-analysis,
>
> Hi, I'm a Mozilla staff web developer on MDN, and I'm exploring an idea
> to offer Web-Compatibility-Scanning-as-a-Service via MDN. [1]
>
> e.g., When a developer sends a pull request, we scan its HTML, CSS,
> and/or JavaScript and comment with a report of which code breaks which
> browsers.
>
> We've been working on a browser compatibility data store & API [2][3].
>
> To that, we (think we) need to add a linting tool that will use the
> compat data store to make a code compatibility report.
>
> The question for this group is - can we get someone who knows static
> analysis involved now to help us make sure the compat data model is
> conducive to generating rules for the linter?
>
> _______________________________________________
> dev-mdn mailing list
> dev...@lists.mozilla.org
> https://lists.mozilla.org/listinfo/dev-mdn

Luke Crouch

unread,
Oct 21, 2014, 11:13:03 AM10/21/14
to Erik Rose, dev...@lists.mozilla.org, dev-stati...@lists.mozilla.org
Thanks Erik.

I'll make a meeting and send invites. Who wants one? :)

-L

On 10/20/14 2:15 PM, Erik Rose wrote:
>> > We've been working on a browser compatibility data store & API [2][3].
>> >
>> > To that, we (think we) need to add a linting tool that will use the
>> > compat data store to make a code compatibility report.
>> >
>> > The question for this group is - can we get someone who knows static
>> > analysis involved now to help us make sure the compat data model is
>> > conducive to generating rules for the linter?
> I'm happy to consult. Want to set up 20 minutes to chat sometime? I think it'll be a lot more efficient to do a bursty, high-bandwidth session than for me to try to reconstruct your brain contents from etherpads.
>
> For CSS and HTML, you'll barely have to do anything deserving of the term "analysis"; I imagine you'll mostly be checking attribute and property names. But there will be some parsing, and that's one of my favorite things. JS will, of course, be hard and should probably wait for 2.0. We're working on that as well, as part of DXR, so we can share some code. For our 20-minute powwow, how about you bring compatibility schema ideas, I'll bring parsing and analysis knowledge, and we'll figure out how to make them meet in the middle?
>
> Cheers,
> Erik
>

--
Q: Why is this email five sentences or less?
A: http://five.sentenc.es

Jeremie Patonnier

unread,
Oct 21, 2014, 12:21:23 PM10/21/14
to Luke Crouch, dev...@lists.mozilla.org, dev-stati...@lists.mozilla.org
Hi Luke,

It depend when you schedule that meeting, but if I can attend, I'll do :)

-J
> _______________________________________________
> dev-mdn mailing list
> dev...@lists.mozilla.org
> https://lists.mozilla.org/listinfo/dev-mdn
>



--
Jeremie
.............................
Web : http://jeremie.patonnier.net
Twitter : @JeremiePat <http://twitter.com/JeremiePat>
0 new messages