[Cbor] 0.8.16: ENV["CDDL_FEATURE_OK"]: comma-separated list to suppress feature warnings

Carsten Bormann <cabo@tzi.org> Thu, 25 February 2021 23:28 UTC

Return-Path: <cabo@tzi.org>
X-Original-To: cbor@ietfa.amsl.com
Delivered-To: cbor@ietfa.amsl.com
Received: from localhost (localhost []) by ietfa.amsl.com (Postfix) with ESMTP id 2D13F3A110B for <cbor@ietfa.amsl.com>; Thu, 25 Feb 2021 15:28:45 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.898
X-Spam-Status: No, score=-1.898 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Received: from mail.ietf.org ([]) by localhost (ietfa.amsl.com []) (amavisd-new, port 10024) with ESMTP id jnbZvW5QU5Qy for <cbor@ietfa.amsl.com>; Thu, 25 Feb 2021 15:28:41 -0800 (PST)
Received: from gabriel-vm-2.zfn.uni-bremen.de (gabriel-vm-2.zfn.uni-bremen.de []) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 881273A110A for <cbor@ietf.org>; Thu, 25 Feb 2021 15:28:40 -0800 (PST)
Received: from [] (p5089a828.dip0.t-ipconnect.de []) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by gabriel-vm-2.zfn.uni-bremen.de (Postfix) with ESMTPSA id 4DmprN4lNNzyT8; Fri, 26 Feb 2021 00:28:36 +0100 (CET)
From: Carsten Bormann <cabo@tzi.org>
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Mao-Original-Outgoing-Id: 635988518.001523-2bbfff0cf9a45489027ba1a92b10720c
Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.\))
Date: Fri, 26 Feb 2021 00:28:38 +0100
Message-Id: <04F7BB62-A40D-48F0-BCED-B0AB7EED28BD@tzi.org>
To: cbor@ietf.org
X-Mailer: Apple Mail (2.3608.
Archived-At: <https://mailarchive.ietf.org/arch/msg/cbor/Zb2rqn0fBT3dcdTEDbTiPQoElA0>
Subject: [Cbor] 0.8.16: ENV["CDDL_FEATURE_OK"]: comma-separated list to suppress feature warnings
X-BeenThere: cbor@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Concise Binary Object Representation \(CBOR\)" <cbor.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/cbor>, <mailto:cbor-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/cbor/>
List-Post: <mailto:cbor@ietf.org>
List-Help: <mailto:cbor-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/cbor>, <mailto:cbor-request@ietf.org?subject=subscribe>
X-List-Received-Date: Thu, 25 Feb 2021 23:28:45 -0000

One other thing that I had put into the cddl tool for the SDF work is support for “accepted” features.  The CDDL tool can be run with an environment variable CDDL_FEATURE_OK that is set to a comma-separated list of feature names; the CDDL tool will not warn about the use of this feature in its validation mechanism (all other features being used are warned about).

So this is how I check the OneDM playground now:


for i in */*.sdf.json
do echo "$i"
   cddl ../sdf/sdf-feature.cddl v "$I"

Do a
grep -B1 "Features potentially used:"
on the output to get just the relevant lines.

This warns me of the extant 1.0 syntax, but is quiet about the 1.1 one.
I believe this example really validates the usefulness of the .feature control.

Grüße, Carsten