Re: [yang-doctors] Unsupported schema tree w/ cyclic dependencies + schema node identifier clarification

Juergen Schoenwaelder <j.schoenwaelder@jacobs-university.de> Sun, 24 March 2019 18:30 UTC

Return-Path: <j.schoenwaelder@jacobs-university.de>
X-Original-To: yang-doctors@ietfa.amsl.com
Delivered-To: yang-doctors@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 69B0612001B for <yang-doctors@ietfa.amsl.com>; Sun, 24 Mar 2019 11:30:32 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.899
X-Spam-Level:
X-Spam-Status: No, score=-1.899 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id NiTlO78SpBss for <yang-doctors@ietfa.amsl.com>; Sun, 24 Mar 2019 11:30:30 -0700 (PDT)
Received: from atlas5.jacobs-university.de (atlas5.jacobs-university.de [212.201.44.20]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id D28E712001A for <yang-doctors@ietf.org>; Sun, 24 Mar 2019 11:30:29 -0700 (PDT)
Received: from localhost (demetrius5.irc-it.jacobs-university.de [10.70.0.222]) by atlas5.jacobs-university.de (Postfix) with ESMTP id 7BD2A3D; Sun, 24 Mar 2019 19:30:27 +0100 (CET)
X-Virus-Scanned: amavisd-new at jacobs-university.de
Received: from atlas5.jacobs-university.de ([10.70.0.217]) by localhost (demetrius5.jacobs-university.de [10.70.0.222]) (amavisd-new, port 10032) with ESMTP id VFjxD0S4KGnq; Sun, 24 Mar 2019 19:30:27 +0100 (CET)
Received: from hermes.jacobs-university.de (hermes.jacobs-university.de [212.201.44.23]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "hermes.jacobs-university.de", Issuer "Jacobs University CA - G01" (verified OK)) by atlas5.jacobs-university.de (Postfix) with ESMTPS; Sun, 24 Mar 2019 19:30:27 +0100 (CET)
Received: from localhost (demetrius5.irc-it.jacobs-university.de [10.70.0.222]) by hermes.jacobs-university.de (Postfix) with ESMTP id 661D1200A7; Sun, 24 Mar 2019 19:30:27 +0100 (CET)
X-Virus-Scanned: amavisd-new at jacobs-university.de
Received: from hermes.jacobs-university.de ([212.201.44.23]) by localhost (demetrius5.jacobs-university.de [10.70.0.222]) (amavisd-new, port 10028) with ESMTP id WNhY_M3_hIhr; Sun, 24 Mar 2019 19:30:27 +0100 (CET)
Received: from exchange.jacobs-university.de (sxchmb03.jacobs.jacobs-university.de [10.70.0.155]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "exchange.jacobs-university.de", Issuer "DFN-Verein Global Issuing CA" (verified OK)) by hermes.jacobs-university.de (Postfix) with ESMTPS id D39CC200A6; Sun, 24 Mar 2019 19:30:26 +0100 (CET)
Received: from anna.localdomain (10.50.218.117) by sxchmb03.jacobs.jacobs-university.de (10.70.0.155) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.1591.10; Sun, 24 Mar 2019 19:30:26 +0100
Received: by anna.localdomain (Postfix, from userid 501) id 096D330077C320; Sun, 24 Mar 2019 19:30:25 +0100 (CET)
Date: Sun, 24 Mar 2019 19:30:25 +0100
From: Juergen Schoenwaelder <j.schoenwaelder@jacobs-university.de>
To: Ebben Aries <exa@arrcus.com>
CC: Martin Bjorklund <mbj@tail-f.com>, "yang-doctors@ietf.org" <yang-doctors@ietf.org>
Message-ID: <20190324183025.zvicdf47kaoca2bf@anna.jacobs.jacobs-university.de>
Reply-To: Juergen Schoenwaelder <j.schoenwaelder@jacobs-university.de>
Mail-Followup-To: Ebben Aries <exa@arrcus.com>, Martin Bjorklund <mbj@tail-f.com>, "yang-doctors@ietf.org" <yang-doctors@ietf.org>
References: <20190322224711.sglgrvgfrqu7bosw@localhost> <20190323.093742.1114866601397885600.mbj@tail-f.com> <20190323165209.a2mo3c4mxxxs5ghg@localhost> <20190324.162731.1383541781103502220.mbj@tail-f.com> <20190324165941.a6bqjqqcatd4khp6@localhost>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Disposition: inline
In-Reply-To: <20190324165941.a6bqjqqcatd4khp6@localhost>
User-Agent: NeoMutt/20180716
X-ClientProxiedBy: SXCHMB04.jacobs.jacobs-university.de (10.70.0.156) To sxchmb03.jacobs.jacobs-university.de (10.70.0.155)
Archived-At: <https://mailarchive.ietf.org/arch/msg/yang-doctors/x6k6BxtwVwSUCXD94canQygoyXY>
Subject: Re: [yang-doctors] Unsupported schema tree w/ cyclic dependencies + schema node identifier clarification
X-BeenThere: yang-doctors@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Email list of the yang-doctors directorate <yang-doctors.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/yang-doctors>, <mailto:yang-doctors-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/yang-doctors/>
List-Post: <mailto:yang-doctors@ietf.org>
List-Help: <mailto:yang-doctors-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/yang-doctors>, <mailto:yang-doctors-request@ietf.org?subject=subscribe>
X-List-Received-Date: Sun, 24 Mar 2019 18:30:32 -0000

On Sun, Mar 24, 2019 at 04:59:43PM +0000, Ebben Aries wrote:
> > 
> > I view this as a bug in the compiler!
> >
> 
> I agree.  It seems section 9.9 covers some of this to come to the
> conclusion that strict checks as such should not be in order if a
> require-instance statement is not in use however the problem here is a
> bit different in attempting to resolve a schema node that does not exist
> at all due to the deviation (which could fall into the same category I
> suppose)

In the general case, it is desirable that compilers generate warnings
or errors when schema nodes are referenced that have no definition
(regardless of require-instance).  Whether this is a warning of an
error may be context dependent, for example, a typedef with a
reference to something undefined is likely just a warning as long as
the defined type is not used but it becomes an error if the defined
type is used by a leaf or a leaf-list.

In your particular case, the compiler knows that the schema node is
defined and the compiler knows that it got deviated away. Hence, the
compiler can stay silent as long as the typedef is not used.

/js

-- 
Juergen Schoenwaelder           Jacobs University Bremen gGmbH
Phone: +49 421 200 3587         Campus Ring 1 | 28759 Bremen | Germany
Fax:   +49 421 200 3103         <https://www.jacobs-university.de/>