From patchwork Thu Jan 4 15:15:47 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 19368 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id D9B3CC323E for ; Thu, 4 Jan 2024 15:15:52 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 85C1C62B67; Thu, 4 Jan 2024 16:15:52 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1704381352; bh=ZVjXpCa8iYp7upMBxrkhyGOLX0Ij7qQyzvW814Y/hdk=; h=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=1sq78B1gtgvSiB4q2+XU/4jtaStiS7CM2MOnElXKRUVaKY2mkDH0ISw1BDEVN/Nim s0wiPDKFv2NQrPpvgRczEFLxM/tFkZGEtpoSOPSJKV1zID+OW3ppCt+b3QCXHMuSvK m0pcFweVhrFkCEAVO5EVG4R2CB9T6VWvLktrAgTlsPWo/pRy0zaSCd150BkFjhFDgk nI8Sru3CGFFpphwl7/WXwF3ZPz3qchrGRs3lyUQI/ml1RHJp4/k9UDpwYqhaorNbmC iN9RgEYXVxWPKZIcED26vhrTpqi1hmeVFnwBATY9OCyBJsKsAVD+12t1AfJSZoJRVM XGIbDAow7d+qg== Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 85C4662B5B for ; Thu, 4 Jan 2024 16:15:49 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="BLJcD95z"; dkim-atps=neutral Received: from pendragon.ideasonboard.com (213-243-189-158.bb.dnainternet.fi [213.243.189.158]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id C89322D8; Thu, 4 Jan 2024 16:14:48 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1704381289; bh=ZVjXpCa8iYp7upMBxrkhyGOLX0Ij7qQyzvW814Y/hdk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=BLJcD95zGnlPtkjmaqVH63fzI2TJlOtuRN/Bxowp4k++XfBBiwbCZE7gcy3iMkP2I vY3P2xWhsRKC3iVDrWpKT7w0OtMM+UkQW1LYkOeA0xg3gf1kYjm3ydoC6e9sa+WcgT kYPZHicZJeInfR0PolXUNZfRYPiJ8ptZ0uIHgLD4= To: libcamera-devel@lists.libcamera.org Date: Thu, 4 Jan 2024 17:15:47 +0200 Message-ID: <20240104151548.2589-8-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240104151548.2589-1-laurent.pinchart@ideasonboard.com> References: <20240104151548.2589-1-laurent.pinchart@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH 7/8] utils: ipc: generate.py: Disable attributes checker X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Laurent Pinchart via libcamera-devel From: Laurent Pinchart Reply-To: Laurent Pinchart Cc: Khem Raj Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" The attributes checker ensures that .mojom files don't contain unknown attributes. These check fail with the custom 'skipSerdes' and 'async' libcamera attributes. Ideally the list of supported attributes should be extended, but that can't easily be done without modifying the mojo sources that we try to keep identical to the upstream version to make updates easier. Disable the attributes checker completely for now to fix this issue. While at it, fix an indentation issue reported by checkstyle.py. Signed-off-by: Laurent Pinchart Reviewed-by: Milan Zamazal Reviewed-by: Kieran Bingham --- utils/ipc/generate.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/utils/ipc/generate.py b/utils/ipc/generate.py index afaf018b49d1..71bdee3b7545 100755 --- a/utils/ipc/generate.py +++ b/utils/ipc/generate.py @@ -17,7 +17,15 @@ sys.path.insert(0, f'{os.path.dirname(__file__)}/mojo/public/tools/bindings') import mojo.public.tools.bindings.mojom_bindings_generator as generator def _GetModulePath(path, output_dir): - return os.path.join(output_dir, path.relative_path()) + return os.path.join(output_dir, path.relative_path()) + + +# Disable the attribute checker to support our custom attributes. Ideally we +# should add the attributes to the list of allowed attributes in +# utils/ipc/mojo/public/tools/bindings/checks/mojom_attributes_check.py, but +# we're trying hard to use the upstream mojom as-is. +if hasattr(generator, '_BUILTIN_CHECKS'): + del generator._BUILTIN_CHECKS['attributes'] # Override the mojo code generator's generator list to only contain our # libcamera generator