C++ Logo

sg15

Advanced search

Re: [Tooling] [isocpp-modules] Dependency format with module details implementation

From: Ben Boeckel <ben.boeckel_at_[hidden]>
Date: Thu, 4 Apr 2019 08:51:22 -0400
On Thu, Apr 04, 2019 at 07:41:51 -0400, Nathan Sidwell wrote:
> The intent of json output is to give IDEs more easily digested
> information. That option has taken the approach of naming the format
> not the purpose.

Right, but the fact that this uses JSON is just an implementation
detail. The contained information is what's important, not the data
format.

> One of the surprises (to me) was that Ben discovered he needed to output
> *both* make-format and json-format dependencies from the same
> invocation.[1] This suggests tying the output format and the
> dependency-file together in some way.

The make-format output is to tell build tools the dependencies of the
scan step itself. If the format is adopted and make, ninja, etc. learn
how to read the JSON format since it contains a superset of the
information, the make output could be dropped, but that isn't the case
today.

> So we could leave the old make-format '-MF filename' alone. The
> dependency options are all -M<something>, and for good or evil, staying
> with that might be best. Thus a new '-MJ filename' option (Make JSON)?
> And having something so baroque avoids arguments about exactly which
> word best describes the output?[2]

Remember that the format is versioned; we may want `-fdep-format=trtbd1`
*and* `-fdep-format=trtbd2` at some point (to support older tools as
well as new tools at the same time), so the output needs to support
taking an argument somewhere (and optional arguments like `make -j` are
not fun).

--Ben

Received on 2019-04-04 14:51:40