Closed
Bug 912197
Opened 11 years ago
Closed 11 years ago
Move WebIDL binding definitions to moz.build
Categories
(Firefox Build System :: General, defect)
Firefox Build System
General
Tracking
(Not tracked)
RESOLVED
FIXED
mozilla26
People
(Reporter: gps, Unassigned)
References
(Blocks 1 open bug)
Details
(Keywords: dev-doc-needed)
Attachments
(5 files, 1 obsolete file)
2.08 KB,
patch
|
gps
:
review+
|
Details | Diff | Splinter Review |
1.69 KB,
patch
|
gps
:
review+
|
Details | Diff | Splinter Review |
1.98 KB,
patch
|
gps
:
review+
|
Details | Diff | Splinter Review |
4.85 KB,
patch
|
gps
:
review+
|
Details | Diff | Splinter Review |
33.00 KB,
patch
|
khuey
:
review+
gps
:
feedback+
|
Details | Diff | Splinter Review |
WebIDL binding files are currently defined in dom/webidl/WebIDL.mk. We should move the definition of dom bindings to moz.build so we can easily extract the set of relevant files (for use in install manifests, etc). This is probably low priority. Just wanted to have a bug on file in case someone wants to tackle it.
Comment 1•11 years ago
|
||
We decided we were just going to have a high-level representation in moz.build, like WEBIDL_SOURCES, and have all the logic in the backend, right?
Comment 2•11 years ago
|
||
That's basically all WebIDL.mk has right now: a list of IDL files, and a second list of preprocessable IDL files. Both possibly with #ifdefs.
Reporter | ||
Comment 3•11 years ago
|
||
WEBIDL_SOURCES - a list - (or equivalent) should be all that is needed in moz.build files. And, I'm even fine with the logic for "build the WebIDL files" to live in a make file forever. Maybe we move the logic from dom/bindings/Makefile to config/makefiles or something. But WebIDL generation is wonky and unless some larger build system project warrants us moving away from the existing make rules, I see no reason for us to ditch them. After all, we should be able to tell Tup "build WebIDL files by running |make -C webidl|, right?
Comment 4•11 years ago
|
||
Little pieces are easier to review, right? Simple classes first.
Attachment #800182 -
Flags: review?(gps)
Comment 5•11 years ago
|
||
Bikeshedding on the variable names welcome. I made WEBIDL_FILES a |list| because sorting it according to Python's rules was getting on my nerves.
Attachment #800183 -
Flags: review?(gps)
Comment 7•11 years ago
|
||
I kept the variable names the same in the generated makefile as the ones WebIDL.mk uses, so that the next part wouldn't be cluttered. Don't know if we have a policy for this or not...
Attachment #800186 -
Flags: review?(gps)
Comment 9•11 years ago
|
||
Knew I was going to screw this up. How about this slightly more complete patch?
Attachment #800187 -
Attachment is obsolete: true
Attachment #800187 -
Flags: review?(khuey)
Attachment #800195 -
Flags: review?(khuey)
Comment 10•11 years ago
|
||
Comment on attachment 800183 [details] [diff] [review] part 2 - add WebIDL variables to the sandbox Review of attachment 800183 [details] [diff] [review]: ----------------------------------------------------------------- ::: python/mozbuild/mozbuild/frontend/sandbox_symbols.py @@ +388,5 @@ > > These are .ipdl files that will be parsed and converted to .cpp files. > """), > > + 'WEBIDL_FILES': (list, list, [], StrictOrderingOnAppendList for the first
Comment 11•11 years ago
|
||
<https://developer.mozilla.org/en-US/docs/Mozilla/WebIDL_bindings> needs to be updated when this lands.
Keywords: dev-doc-needed
Reporter | ||
Comment 12•11 years ago
|
||
Comment on attachment 800182 [details] [diff] [review] part 1 - add classes for WebIDL source files Review of attachment 800182 [details] [diff] [review]: ----------------------------------------------------------------- This looks good. Although I'm curious how all the logic will hook up. We typically do single patches for adding things to the frontend to make this easier to follow. Nit: Some style guidelines want you to use 2 lines between classes. If you install my Mercurial extension from https://hg.mozilla.org/users/gszorc_mozilla.com/hgext-gecko-dev, it will automatically apply Python style checking as you qref patches and alert you of style violations. It's even smart enough to only report on the lines your patch has changed!
Attachment #800182 -
Flags: review?(gps) → review+
Reporter | ||
Comment 13•11 years ago
|
||
Comment on attachment 800183 [details] [diff] [review] part 2 - add WebIDL variables to the sandbox Review of attachment 800183 [details] [diff] [review]: ----------------------------------------------------------------- ::: python/mozbuild/mozbuild/frontend/sandbox_symbols.py @@ +402,5 @@ > + > + 'GENERATED_WEBIDL_FILES': (StrictOrderingOnAppendList, list, [], > + """Generated WebIDL source files. > + > + These will be generated from some other files."""), We'll eventually need the "how they are generated" bit to be defined in moz.build. But we can punt this to a followup bug.
Attachment #800183 -
Flags: review?(gps) → review+
Reporter | ||
Comment 14•11 years ago
|
||
Comment on attachment 800184 [details] [diff] [review] part 3 - emit WebIDL objects during traversal Review of attachment 800184 [details] [diff] [review]: ----------------------------------------------------------------- ::: python/mozbuild/mozbuild/frontend/emitter.py @@ +23,5 @@ > XpcshellManifests, > + WebIDLFile, > + TestWebIDLFile, > + PreprocessedWebIDLFile, > + GeneratedWebIDLFile, Nit: Sort.
Attachment #800184 -
Flags: review?(gps) → review+
Reporter | ||
Comment 15•11 years ago
|
||
Comment on attachment 800186 [details] [diff] [review] part 4 - write out lists of WebIDL source files for dom/bindings/ Review of attachment 800186 [details] [diff] [review]: ----------------------------------------------------------------- Normally I'd ask for tests. But this is only used by a very small part of the build system and it would be pretty obvious if it stopped working. So I'm inclined to let the tests slide. Don't let me discourage you from writing them, however. ::: python/mozbuild/mozbuild/backend/recursivemake.py @@ +29,5 @@ > XpcshellManifests, > + WebIDLFile, > + TestWebIDLFile, > + PreprocessedWebIDLFile, > + GeneratedWebIDLFile, Nit: sort @@ +327,5 @@ > + webidls.write('test_webidl_files += %s\n' % os.path.basename(webidl)) > + for webidl in sorted(self._generated_webidl_sources): > + webidls.write('generated_webidl_files += %s\n' % os.path.basename(webidl)) > + for webidl in sorted(self._preprocessed_webidl_sources): > + webidls.write('preprocessed_webidl_files += %s\n' % os.path.basename(webidl)) I'd just write these out on a single line. If nothing else, it's less work for the make parser and for variable evaluation, which profiling has shown is the bit slowing pymake down.
Attachment #800186 -
Flags: review?(gps) → review+
Reporter | ||
Comment 16•11 years ago
|
||
Comment on attachment 800195 [details] [diff] [review] part 5 - move WebIDL.mk over to moz.build Review of attachment 800195 [details] [diff] [review]: ----------------------------------------------------------------- ::: dom/moz.build @@ +71,5 @@ > 'camera', > 'audiochannel', > 'promise', > + 'wappush', > + 'webidl' This remind me: we need a primitive for evaluating a moz.build in the context of a directory without necessarily adding it to directory traversal. I'll file a bug.
Attachment #800195 -
Flags: feedback+
Reporter | ||
Comment 17•11 years ago
|
||
Something else I forgot: we'll want to add the destined-for-dist/include .h files to self._install_manifests['dist_include']. This will cause the header files to be tracked by the install manifest which will in turn prevent them from being deleted at the top of the build. You'll want to pretty much copy the code in _handle_idl_manager. Once things are in the install manifest, the webidl processing can generate the headers directly into dist/include, saving an extra file copy/install step and hopefully making the build a little faster. We can punt this to a followup if you'd like.
Attachment #800195 -
Flags: review?(khuey) → review+
Comment 18•11 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/dc86c80d01c0 https://hg.mozilla.org/integration/mozilla-inbound/rev/1272d731770c https://hg.mozilla.org/integration/mozilla-inbound/rev/91ba20da3b79 https://hg.mozilla.org/integration/mozilla-inbound/rev/5b8391be568d https://hg.mozilla.org/integration/mozilla-inbound/rev/e90fe3a1e259
Flags: in-testsuite-
Comment 19•11 years ago
|
||
And a follow-up to address b2g bustage: https://hg.mozilla.org/integration/mozilla-inbound/rev/5f52bbf813be
Comment 20•11 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/dc86c80d01c0 https://hg.mozilla.org/mozilla-central/rev/1272d731770c https://hg.mozilla.org/mozilla-central/rev/91ba20da3b79 https://hg.mozilla.org/mozilla-central/rev/5b8391be568d https://hg.mozilla.org/mozilla-central/rev/e90fe3a1e259 https://hg.mozilla.org/mozilla-central/rev/5f52bbf813be https://hg.mozilla.org/mozilla-central/rev/db3e565b7586
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla26
Updated•6 years ago
|
Product: Core → Firefox Build System
You need to log in
before you can comment on or make changes to this bug.
Description
•