Closed
Bug 502003
Opened 15 years ago
Closed 15 years ago
IPDL compiler interface
Categories
(Core :: IPC, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: benjamin, Assigned: benjamin)
Details
Attachments
(2 files)
7.50 KB,
patch
|
cjones
:
review-
|
Details | Diff | Splinter Review |
7.42 KB,
patch
|
Details | Diff | Splinter Review |
I'd like the IPDL compiler to have the following interface: ipdl.py --src=path/to/cppfiles-outputdir --include=path/to/dist/include file1.ipdl file2.ipdl file3.ipdl The headers IPDL generates should go in dist/include/namespace/ProtocolName.h IPDL should also generate the IPCMessageStart enum, so we don't have to hand-add pieces to it every time a new protocol is added (that will be conflict-heavy). The C++ files should go in the outputdir without namespace directories. Both .h and .cpp generation should be guarded so that they only write the file if it has changed.
Assignee | ||
Updated•15 years ago
|
Assignee: jones.chris.g → benjamin
Assignee | ||
Comment 1•15 years ago
|
||
You don't need to mess with sys.path here, I don't think, since the script path is automatically part of sys.path. I switched to optparse because it's easier to read and you get a usage string almost for free.
Attachment #386583 -
Flags: review?(jones.chris.g)
Comment on attachment 386583 [details] [diff] [review] IPDL command-line cleanup, rev. 1 >+op.add_option('-v', '--verbose', dest='verbosity', default=1, action='count', >+ help='Verbose logging (specify twice for very verbose logging)') Nit: you get increasingly more info up to |-vvv|, verbosity level 3, currently. >-try: >- opts, args = getopt.gnu_getopt( >- sys.argv[1:], >- 'd:hv:', >- ['help', >- 'output-dir=', >- 'verbosity=']) >-except getopt.GetoptError, err: >- print >>sys.stderr, str(err), '\n' >- usage(err=True) >+ name = ast.protocol.name >+ allprotocols.extend(['%s_ParentToChildMsgStart' % name, >+ '%s_ChildToParentMsgStart' % name]) > I changed the way these constants are used. There's only one now, and it's called |[name]ProtocolMsgStart|. So I think you instead want the format |'%sProtocolMsgStart' % ast.protocol.name|.
Attachment #386583 -
Flags: review?(jones.chris.g) → review-
Assignee | ||
Comment 3•15 years ago
|
||
This is the one that appears to be failing in ways I don't understand on NPP.ipdl
Attachment #387230 -
Flags: review?(jones.chris.g)
Assignee | ||
Comment 4•15 years ago
|
||
I'm also going to need to add support for include search directories (-Idir) or at least search in the protocol file directory instead of in the curdir.
Pushed 62eedc3a5f90 Chris Jones - bugs 502003, 502634: compile multiple IPDL specs in one invocation Leaving open for -Idir addition.
2c99c4920e6d Chris Jones - add gcc-like -I include dir options to ipdl compiler
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Updated•15 years ago
|
QA Contact: ipc
Assignee | ||
Updated•15 years ago
|
Attachment #387230 -
Flags: review?(jones.chris.g)
You need to log in
before you can comment on or make changes to this bug.
Description
•