C++ Logo

sg15

Advanced search

Re: [Tooling] [Ext] Modules and tooling: Resolving module import declarations

From: Nathan Sidwell <nathan_at_[hidden]>
Date: Fri, 31 Aug 2018 07:53:02 -0400
On 08/31/2018 07:09 AM, Boris Kolpackov wrote:
> Message-ID: <boris.20180831104601_at_[hidden]>
>
> Tom Honermann <tom_at_[hidden]> writes:

>> 2. A method of specifying a path to search for module description
>> files, similar to existing include paths.
>
> I would argue against any kind of "search paths" approach (whether for
> modules or description files themselves). We've used them for includes
> and I think it has proven to be brittle (I am talking about the "header
> doesn't exist where you expect it to exist but the compiler found you
> another one" kind of situtions) and not toolable (where shoudl I generate
> this non-existent header?)

A search path seems the obvious choice, because of the similarity to
include paths. It is the route I originally went down. It's a trap! As
Boris says, it's brittle. It continues the performance problems of
searching a bunch of filesystem locations for each import.

I abandoned that approach for an interface allowing the compiler to be
agnostic, and other tools to plug into that. Expect a paper for San Diego.

nathan

-- 
Nathan Sidwell

Received on 2018-08-31 13:53:06