Received: by 2002:a89:413:0:b0:1fd:dba5:e537 with SMTP id m19csp671223lqs; Fri, 14 Jun 2024 02:00:47 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXNWpQQEHff8qSghchaMvlRDbEP0KJ83Fn8Wdu8wcIsuqtUS68muPTgB/VWyaIF8mT2XGi+WMatBgkIOoGgbU4O4r1/OyynRuz0GqaBgw== X-Google-Smtp-Source: AGHT+IG6uy9PPKjb9uL4i4kfkROd2//vhooaKQE3/3CkWYk8cnm3ddHC5uMbzrB0vCfyLbu/t8Zp X-Received: by 2002:a05:622a:cf:b0:441:2089:1c17 with SMTP id d75a77b69052e-44216b3596fmr25447281cf.55.1718355647357; Fri, 14 Jun 2024 02:00:47 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718355647; cv=pass; d=google.com; s=arc-20160816; b=wV8WxUVoRJWR8V8R4xafwGQDAA+7Q+VMC6F0yuhiq7aP7avLFs+ONkvjDPW00xvD3K Vw9iCE43OleZzGXHIBU6Su9AB8PeFXtcborOSQ+bCDKRAtuNYqOpZA9zNb7QjnqJ/X9G t/oM8anyZp1bLU+NUGsAdlbfycRIq7v7hXeggZ63B6uIBg5GXBPulc5XiehT4A06creF TMyOUe+NjhcdnWkBuyEHuHRlzlPhKXwmfv4yQE41ESZQyC4Ram1Q3h/NrEELX4MTrYNl bjc8ZMpuSv4+iH1hNcdb56elaZahF1rUGpJ5Qv7Uz8IMo1cRGtxdaB93/gaK1LB82ime 63QA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=zkjEfE5W3OSfNWGJdTHQ8Hm/JHwwsjW4jrKA6Avs2YU=; fh=j4HWueLLQQUq4heqGHOOKZATq3r/DZJsBcJdYBnXb3A=; b=AM9g3XhgSfTMZfxV1OsHekqK1kwuG1drX+OcFmXHOmjM3sac0Giq8MHztyNr7Rsd8y erSq59wiDgRXXOLVTBVRfbHjNu0t4fz6n+y1nDUcKALPnwR3IntibgvNAZaxnNV6ZH92 uPFku1RkTlo3bvOpsCF0e/2TntQqILjeKXHxv+1q2wJ5I2tHuSjCER6cKKIvFEGwfslq qkIRHXxwG5bpHVMkdqdONUI9Zr0kybg/V83GdQZBVucl4h1ZzqGPuISbvCQyH0o5kb7E zS5Oq6mTgvQ1+B/cR92P87VAF3Zo66fYPlL0PLEFygHhmtRwetLIaw/zk4UyZ26JUPos Qy/A==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=A+7+Mxo2; arc=pass (i=1 spf=pass spfdomain=google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-214592-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-214592-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id d75a77b69052e-441ef3d8dacsi24549011cf.180.2024.06.14.02.00.47 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 14 Jun 2024 02:00:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-214592-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=A+7+Mxo2; arc=pass (i=1 spf=pass spfdomain=google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-214592-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-214592-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 78C9D1C220B6 for ; Fri, 14 Jun 2024 09:00:26 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 93B5C1922CF; Fri, 14 Jun 2024 09:00:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="A+7+Mxo2" Received: from mail-wr1-f45.google.com (mail-wr1-f45.google.com [209.85.221.45]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4D96118FC9E for ; Fri, 14 Jun 2024 09:00:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.45 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718355618; cv=none; b=gQb6Rm9o05hIuUTyt/EiLUuY1Vtf9oq6IlekBRRPLyLh9rx9JcsAbPQDI+uUXd3XUE3ox9yykzmNu1RgLbL761tmQmURbu10JAgznfqhh2QrMqMWE/GMpCDjXMfMk6NqzhbAY+KYRXHqfF7M648qUe86ngzfgaVnaA6VUyfY1xw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718355618; c=relaxed/simple; bh=vuue96tIfWgsHiuEfmQb0PzqCqBFJ6nsE7tv6QKBDGM=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=S2slzJUj23GzaOlCfcYFfmLL3sfYIirfA0bFRal2hwQEhrPiu/cn2yR/5SkvxqkqjtKLHp1u4zCr0y5TXs6o2ii4P3F7yxXqD+ZsY8QdKRB9lng2Esxu0+J6pWQctg+y/sRGodArWABvJoaOqTudU4fQ/nWM+KxV/IzjYrHBEYI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=A+7+Mxo2; arc=none smtp.client-ip=209.85.221.45 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=google.com Received: by mail-wr1-f45.google.com with SMTP id ffacd0b85a97d-35f1bc2ab37so1806142f8f.1 for ; Fri, 14 Jun 2024 02:00:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1718355616; x=1718960416; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=zkjEfE5W3OSfNWGJdTHQ8Hm/JHwwsjW4jrKA6Avs2YU=; b=A+7+Mxo2p92MjY95gtY/ZscTo6hbEHslQFT5vSyph0Rj/vYOZf5gifSIafewF0Ig5/ TaxtxwMjiDT9wbHHXzwTxK/w/GEMnt1rojNWcPR8j3LTTW6v0EuViLB6sYz/C04PIF6Q o0me77UR1cSGTaxHF1pgjPKKAqFBJcs6I28Ca7GGhNRjK1Akz7ALvi/FeFNYst4KJHhO DDE8a249ZIFyWxIpJPfAwm33l9xLNkzglqoSejvHQlYqX7L8tWK78Ib8KR8TqGELIN7r ucW+CqAU7iQ2iB2McAyBFReNdKpOvouH8UubSHFD40s8yiSvx5sQtzbMu/jyfC87hBkc MC1Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718355616; x=1718960416; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=zkjEfE5W3OSfNWGJdTHQ8Hm/JHwwsjW4jrKA6Avs2YU=; b=alm6JXJjNMlulLglIf2JkxApvYq6E6q1L2ZuF7TQ/GAc4hEMe6XixkDVva0gua887z ZZpOJVbBP+4KQC03Tz8TkHCKczoAQZeZeTeOWn7YvHpUlhYqjEJcYLZT8Wyt6HtNBjMo Kdjh/CnpDkmUUj5B/pZ+Pw7Y5Mym2ffEsLvUIze0OG7nudgBtnUx1icWfSZnkxnw8Jol 4t6NAOXsdVMKY0fVw2GT1Trr0jqiv35zGPrkig1cdh0tI1DDa8TtmLewlOEmC3a4rYFK 2eTcGikyXDJXsvlfsFZFwpniKPrXegvBUo603E/0dF6+7kDkHCUksYnl6qFoeZD9VzT3 bxzg== X-Forwarded-Encrypted: i=1; AJvYcCVct1H7EUdsRtsnb0VLo0XYuq5UwKQvy6Eg0o4Hrl1rsrTRkH+o/v0+AF0g+ls4hECCDmdZ306gil/9ls/1Sy1rQNz2jZ2NwXK3aqag X-Gm-Message-State: AOJu0Yy5rAtY+DBWXDpt/I5mLG4JH+NvI9GCYsJzLt2N6VHQil+BLdsT oDYSZTsT/BvtE2rwhOL7uYin9UFqOLR9LFDrvsMZ1OfmBulsCB9Ru74zc3Mx5Bd3Xumz/LzWJH+ Ld3DHbP01jDhmR76M2zVQ36+eeLiPdZuD0Xt1 X-Received: by 2002:adf:ce10:0:b0:360:7284:969 with SMTP id ffacd0b85a97d-3607a76be82mr1562172f8f.42.1718355615440; Fri, 14 Jun 2024 02:00:15 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240601004856.206682-1-jhubbard@nvidia.com> In-Reply-To: <20240601004856.206682-1-jhubbard@nvidia.com> From: Alice Ryhl Date: Fri, 14 Jun 2024 11:00:02 +0200 Message-ID: Subject: Re: [PATCH] Makefile: rust-analyzer target: better error handling and comments To: John Hubbard Cc: Miguel Ojeda , Masahiro Yamada , Nathan Chancellor , Nicolas Schier , Alex Gaynor , Wedson Almeida Filho , Boqun Feng , Gary Guo , =?UTF-8?Q?Bj=C3=B6rn_Roy_Baron?= , Benno Lossin , Andreas Hindborg , linux-kbuild@vger.kernel.org, rust-for-linux@vger.kernel.org, LKML Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Sat, Jun 1, 2024 at 2:49=E2=80=AFAM John Hubbard w= rote: > > 1) Provide a more self-explanatory error message for the "Rust not > available" case. Without this patch, if Rust is not set up properly > (which happens a lot, seeing as how one must routinely run "rustup > override ..." with each new kernel release), the "make rust-analyzer" > invocation generates a somewhat confusing message: > > "No rule to make target 'rust-analyzer" > > This is confusing at first, because there is, in fact, a rust-analyzer > build target. It's just not set up to handle errors gracefully. > > Instead of inflicting that on the developer, just print that Rust is > not available, with a blank line above and below, so it doesn't get lost > in the noise. Now the error case looks like this: > > $ make rust-analyzer > > Rust is not available > > make[1]: *** [/kernel_work/linux-github/Makefile:1975: rust-analyzer]= Error 1 > make: *** [Makefile:240: __sub-make] Error 2 > > 2) As long as I'm there, also add some documentation about what > rust-analyzer provides. > > Signed-off-by: John Hubbard Reviewed-by: Alice Ryhl Tested-by: Alice Ryhl