Received: by 2002:a05:6358:a55:b0:ec:fcf4:3ecf with SMTP id 21csp2648890rwb; Fri, 20 Jan 2023 05:49:19 -0800 (PST) X-Google-Smtp-Source: AMrXdXs1XY2RIdCG6oKvzbs/DQ33olbvlx7tuUgk30jhSqe4qtcOcSqYBNiCczbhnIsTC6Ub94kL X-Received: by 2002:a17:902:f791:b0:194:4981:2018 with SMTP id q17-20020a170902f79100b0019449812018mr17972380pln.60.1674222559261; Fri, 20 Jan 2023 05:49:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674222559; cv=none; d=google.com; s=arc-20160816; b=IXPKhGkai7rde2o5x32D785qIYWBnqyrr+BXmOhnOWhQnxcom3UMLNvFVwMXe7Klbd UCPm3wEiJ7rHY6XALcWU5oxUarV2MWJtrda1Rv2LI5PLT7ihp3I9fkdgsq9ywZAw5yaf VrxXWcqJYjJlXhYzcdyOBqCbLmAlvEsqyHGDCFHMtLRgWwFpsmaK09365RUEB72sYLf3 uq1kQRGmp/ho12u7k1WhrL0N2khlFO8X46piO83MgSl3/V1i/w3GQNOQMusOdGkq6Z4J uqrfxUPOKplArxWn5qnbn/8heU6P0fCGls67DKNGcWantkIKglEpXy0JvW7yScMJf1fA TJnw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :feedback-id:references:in-reply-to:message-id:subject:cc:from:to :dkim-signature:date; bh=QhMp/bJy0FGOBVYNVHwQ4CQSJ/T8ml1Q7a0jq2CQsIE=; b=VMzO6tib1xDIRSigz1wLEwnYMneeblFwRI6smK4JGswE82mOmtyZFqy6Sq3IAOhF2C aZGz7EYdl+gXo6Id+85fMpnbwf64yfSeQ36zlq7p46PtL01LeDnEixcilTBqrZ1N1qs0 O9K9/nESRysBn4d4KSDz0aZJbk31QuuKeyhBUARLQjrKqKBqKZRvy19IhXPfcjYrPVl3 5bgPZo5jYmUNa62zubrcfoOb7nHl/ittAr0kdPkFk+wa8RToCZZVBiyHQ63RSgOeK+wf xB7d9yGXvTWY9RQrJhgU78kiclJt8mFuI4euwliUhQ56QFgxx0btaerwaSdY9UWYj+r7 f+5A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@protonmail.com header.s=protonmail3 header.b=vcRrEAPk; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=protonmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e2-20020a17090301c200b00175449cf6f8si45425296plh.606.2023.01.20.05.49.13; Fri, 20 Jan 2023 05:49:19 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@protonmail.com header.s=protonmail3 header.b=vcRrEAPk; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=protonmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230072AbjATNTY (ORCPT + 49 others); Fri, 20 Jan 2023 08:19:24 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35920 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230501AbjATNSi (ORCPT ); Fri, 20 Jan 2023 08:18:38 -0500 Received: from mail-0301.mail-europe.com (mail-0301.mail-europe.com [188.165.51.139]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 93B347DFAF; Fri, 20 Jan 2023 05:17:46 -0800 (PST) Date: Fri, 20 Jan 2023 13:17:33 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1674220659; x=1674479859; bh=QhMp/bJy0FGOBVYNVHwQ4CQSJ/T8ml1Q7a0jq2CQsIE=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector; b=vcRrEAPk5ltBexkrxiCPGVyRIf3cNplOwB24sChYLMOj3bb1gnLtTBlrPIAawoaLR 16rj4lvt2zDbvXmiZU849BaeC5YSFqik0ieX157d+fE6OwRFkBJC/dKfl5AXv0vhtR jC9Lpvpl75pyup5PtOdbegXpOTkcsj9nEjiNF8+KHv0wZiprzHhFVBUwwv9rExHHSO NqVITOBL0jNN3ySQbsUhJXPkAHRLUb7rfFNV5M3Tc0zkc33V2+aV0eZCRm2Fx6G1Jd +ztDJKzoSrGblaXdo3F6whX3/q71i++1SlHJVwpX50p55wpx6zLF3ippjbNnt0s+L2 719v8rYxXzgyg== To: Vinay Varma From: =?utf-8?Q?Bj=C3=B6rn_Roy_Baron?= Cc: Masahiro Yamada , Michal Marek , Nick Desaulniers , Miguel Ojeda , Alex Gaynor , Wedson Almeida Filho , Boqun Feng , Gary Guo , linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org, rust-for-linux@vger.kernel.org Subject: Re: [PATCH] scripts: `make rust-analyzer` for out-of-tree modules Message-ID: In-Reply-To: <20230118160220.776302-1-varmavinaym@gmail.com> References: <20230118160220.776302-1-varmavinaym@gmail.com> Feedback-ID: 27884398:user:proton MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org ------- Original Message ------- On Wednesday, January 18th, 2023 at 17:02, Vinay Varma wrote: > Adds support for out-of-tree rust modules to use the `rust-analyzer` > make target to generate the rust-project.json file. >=20 > The change involves adding an optional parameter `external_src` to the > `generate_rust_analyzer.py` which expects the path to the out-of-tree > module's source directory. When this parameter is passed, I have chosen > not to add the non-core modules (samples and drivers) into the result > since these are not expected to be used in third party modules. Related > changes are also made to the Makefile and rust/Makefile allowing the > `rust-analyzer` target to be used for out-of-tree modules as well. >=20 > Signed-off-by: Vinay Varma varmavinaym@gmail.com >=20 > --- I tested this with https://github.com/Rust-for-Linux/rust-out-of-tree-modul= e using "make -C ../rust-for-linux M=3D$(pwd) rust-analyzer". It produces a= rust-project.json file, however it misses the actual rust_out_of_tree crat= e. This is due to the fact that generate_rust_analyzer.py only checks Makef= ile to find the crate roots, but rust-out-of-tree-module defines it in Kbui= ld instead. Apart from this issue, all paths I checked in the generated rust-project.js= on are correct. Cheers, Bjorn