Re: [YANG] combining sub-modules

Phil Shafer <phil@juniper.net> Mon, 07 January 2008 17:49 UTC

Return-path: <yang-bounces@ietf.org>
Received: from [127.0.0.1] (helo=stiedprmman1.va.neustar.com) by megatron.ietf.org with esmtp (Exim 4.43) id 1JBw6O-0004iz-2p; Mon, 07 Jan 2008 12:49:32 -0500
Received: from yang by megatron.ietf.org with local (Exim 4.43) id 1JBw6N-0004ao-1W for yang-confirm+ok@megatron.ietf.org; Mon, 07 Jan 2008 12:49:31 -0500
Received: from [10.91.34.44] (helo=ietf-mx.ietf.org) by megatron.ietf.org with esmtp (Exim 4.43) id 1JBw6M-0004YG-Mi for yang@ietf.org; Mon, 07 Jan 2008 12:49:30 -0500
Received: from exprod7og106.obsmtp.com ([64.18.2.165]) by ietf-mx.ietf.org with esmtp (Exim 4.43) id 1JBw6M-00041l-8r for yang@ietf.org; Mon, 07 Jan 2008 12:49:30 -0500
Received: from source ([66.129.224.36]) by exprod7ob106.postini.com ([64.18.6.12]) with SMTP; Mon, 07 Jan 2008 09:49:25 PST
Received: from magenta.juniper.net ([172.17.27.123]) by emailsmtp55.jnpr.net with Microsoft SMTPSVC(6.0.3790.1830); Mon, 7 Jan 2008 09:49:19 -0800
Received: from idle.juniper.net (idleski.juniper.net [172.25.4.26]) by magenta.juniper.net (8.11.3/8.11.3) with ESMTP id m07HnJ926314; Mon, 7 Jan 2008 09:49:19 -0800 (PST) (envelope-from phil@idle.juniper.net)
Received: from idle.juniper.net (localhost [127.0.0.1]) by idle.juniper.net (8.13.8/8.13.8) with ESMTP id m07HjTOI085891; Mon, 7 Jan 2008 17:45:29 GMT (envelope-from phil@idle.juniper.net)
Message-Id: <200801071745.m07HjTOI085891@idle.juniper.net>
To: Andy Bierman <ietf@andybierman.com>
Subject: Re: [YANG] combining sub-modules
In-reply-to: <477ECF81.1030702@andybierman.com>
Date: Mon, 07 Jan 2008 12:45:29 -0500
From: Phil Shafer <phil@juniper.net>
X-OriginalArrivalTime: 07 Jan 2008 17:49:19.0685 (UTC) FILETIME=[A1183F50:01C85155]
X-Spam-Score: -4.0 (----)
X-Scan-Signature: 79899194edc4f33a41f49410777972f8
Cc: yang <yang@ietf.org>
X-BeenThere: yang@ietf.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: YANG modeling Language for NETCONF <yang.ietf.org>
List-Unsubscribe: <https://www1.ietf.org/mailman/listinfo/yang>, <mailto:yang-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www1.ietf.org/pipermail/yang>
List-Post: <mailto:yang@ietf.org>
List-Help: <mailto:yang-request@ietf.org?subject=help>
List-Subscribe: <https://www1.ietf.org/mailman/listinfo/yang>, <mailto:yang-request@ietf.org?subject=subscribe>
Errors-To: yang-bounces@ietf.org

Andy Bierman writes:
>So the compiler needs to ignore any 'duplicate object' errors
>that occur from the A-C, B-C scenario, but if A and B use
>the same top-level object name, it is a fatal error?
>Top-level definitions can be imported from foo, regardless
>of module or submodule location.

The decision is up to the compiler, but my take is that the compiler
should parse modules and submodules individually, keeping the data
organized into modules and submodules.  When it sees an import or
include for something it's already parsed, it can reference the
parsed data, not redo the work.  So "ignore" in a sense, but not
in the #once sense.

If A and B both define the same top-level object name, it's an
error, since they are in the same namespace.  B can augment A's
objects (and vice versa), but not redefine them.

Thanks,
 Phil


_______________________________________________
YANG mailing list
YANG@ietf.org
https://www1.ietf.org/mailman/listinfo/yang