From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 01835456E5; Mon, 29 Jul 2024 18:41:44 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id CB2AA40A6D; Mon, 29 Jul 2024 18:41:43 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.8]) by mails.dpdk.org (Postfix) with ESMTP id 5B31540A6D for ; Mon, 29 Jul 2024 18:41:42 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1722271302; x=1753807302; h=date:from:to:cc:subject:message-id:references: in-reply-to:mime-version; bh=1FCsvQ2HVO8Y1TITyxttlFn4kZqoFhbiBDbSd/HxfD0=; b=XSvxkCYqjhK7Vy7xIozxZDKD84VIw+8cvE3z+/CByCFkiLMwsodSF0AG nggahYocepzrXSlTWG1jWGLd0zkApKjVi5jiJ39d2LqOitS76I7nionEW 9viNa1+JMVo9Iv5iiCTQGL7QwyakUV5Ye+XOMIj4I4m6j/2y5rLH0SreN UrzjmDe/h6gYPF2gOIh5CBCn/tyTQOJrbU4Ri7HmlwG1MrJBSte2fuYJ/ 7XXETD81QBKtVqUKmX0EwYAFJ3VKEVVFsByhLixwW9jKOTSTKYEd4+kgg udV3yL8kF8fuf4/q3z8urhVESas9Vvl4hmOpsH6tfG2jwhyIGQdlT4lSY Q==; X-CSE-ConnectionGUID: 8/dJKgQCTgyYN4zmqhymJw== X-CSE-MsgGUID: 0esSCqK/RY6qsGECupA8Kg== X-IronPort-AV: E=McAfee;i="6700,10204,11148"; a="37549134" X-IronPort-AV: E=Sophos;i="6.09,246,1716274800"; d="scan'208";a="37549134" Received: from orviesa008.jf.intel.com ([10.64.159.148]) by fmvoesa102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Jul 2024 09:41:14 -0700 X-CSE-ConnectionGUID: z2srpHoIS16sEWMZakbo4w== X-CSE-MsgGUID: 7IiT/Zm0TFSekxEiVDIvJQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.09,246,1716274800"; d="scan'208";a="54852980" Received: from fmsmsx602.amr.corp.intel.com ([10.18.126.82]) by orviesa008.jf.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 29 Jul 2024 09:41:14 -0700 Received: from fmsmsx610.amr.corp.intel.com (10.18.126.90) by fmsmsx602.amr.corp.intel.com (10.18.126.82) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Mon, 29 Jul 2024 09:41:13 -0700 Received: from fmsedg602.ED.cps.intel.com (10.1.192.136) by fmsmsx610.amr.corp.intel.com (10.18.126.90) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39 via Frontend Transport; Mon, 29 Jul 2024 09:41:13 -0700 Received: from NAM10-MW2-obe.outbound.protection.outlook.com (104.47.55.45) by edgegateway.intel.com (192.55.55.71) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.39; Mon, 29 Jul 2024 09:41:13 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=T0Buucot1pxP6rh1Bz8c2f8jneSx4WC93qGzuKi3chV35pvisv/cUtmPXbry4z0b4HhaKXECGL1MNTbPHQ8jUKzVpOMO542E7Z32g3v8UQmObdH2zMkD29KoVJeiXUOFYv8FSIyXzZpJVWqjeEHJYmUL14Bu+dVG7VGi8Ymt34gui/GdK106n4K3Dgz7913w9CeseD1w1SHleA2AiW29v0qcI46lhRYYoQus0Dpq0cEXH1uwDyA+Wi9lDzUypR+FwItgaD54/IWvwCq5PxCYfK6yj4BlgvrQX5LIP6hVDYyucT2Rv+Spir07I9khgQN8HFNQfCCBhkqtEmidLmLn0g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=jCjAJWDHbxxIUeIpdmwfnB6ycHEahPR49NdT4lSzeEQ=; b=luDC/D+93gAKZHs8MozvRrLrpXjV8Q4s0mFQpe4Em8rl0SY+vNO0vTS/jahuiBo6sV9GSITPBNpKeWC4X6RSdpY8FIV2Q3Rvx/tRsvQkj58hLDUFGLwVQGyynbLanE2iA2XyWVp+9Ja/aGzBQIARBW+8f/6Oy5CCoyTvzPeFJBgHP3VK+mIkaCf1zhZkatuSMOYWX/8vIF1hkxh93Sh/ifLwRUo/TsI8lW5aYnEim1YW5lKQPqv5qhuwnvEO3XrZ1hZFUdB8o2Wt9buH5YOsxTvR4mRFQdHILqdc0nt4yoh5uUVC1ecEWoUxIg84dlrP80hWuxYpqupKuZk0rC80jQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; Received: from DS0PR11MB7309.namprd11.prod.outlook.com (2603:10b6:8:13e::17) by SJ0PR11MB5152.namprd11.prod.outlook.com (2603:10b6:a03:2ae::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7807.27; Mon, 29 Jul 2024 16:41:10 +0000 Received: from DS0PR11MB7309.namprd11.prod.outlook.com ([fe80::f120:cc1f:d78d:ae9b]) by DS0PR11MB7309.namprd11.prod.outlook.com ([fe80::f120:cc1f:d78d:ae9b%2]) with mapi id 15.20.7807.026; Mon, 29 Jul 2024 16:41:10 +0000 Date: Mon, 29 Jul 2024 17:41:04 +0100 From: Bruce Richardson To: "Burakov, Anatoly" CC: , Subject: Re: [RFC PATCH v2 1/1] devtools: add vscode configuration generator Message-ID: References: <99003582461c7ec772e49dae9b43840496342646.1722258213.git.anatoly.burakov@intel.com> <3edc6421-0923-4371-a7dd-62d3857259ab@intel.com> Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <3edc6421-0923-4371-a7dd-62d3857259ab@intel.com> X-ClientProxiedBy: DU7PR01CA0044.eurprd01.prod.exchangelabs.com (2603:10a6:10:50e::28) To DS0PR11MB7309.namprd11.prod.outlook.com (2603:10b6:8:13e::17) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS0PR11MB7309:EE_|SJ0PR11MB5152:EE_ X-MS-Office365-Filtering-Correlation-Id: 9cc80915-80b9-4731-ba14-08dcafed405c X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|376014|366016; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?BayY+Xg4IZZdUdKdoP3EMX8M+vFcBx6ukwFPBFd30Gi5242KrsUVHC6oRr/p?= =?us-ascii?Q?gBKEfmMARGLSOLpFJQH03dmrzXZruXNBA7D4c/gGfq13LRtQ7i53Zou3HAnI?= =?us-ascii?Q?SS+Ynk+YdhQuzfyWs19MaVKtFwa9jggGJt5q3iamLnndVvrbPOq0D/VE41K+?= =?us-ascii?Q?QgrKxKMz2NxBDh/huShLqvmaGfI0CpeW98x/RUs9WLSQnwM7ly91AAdfjqOh?= =?us-ascii?Q?JisqHpeQqebbbgLpvkBqZdlKQBUj2Plbhf1v7c8+ETlltE0z/u4tk4fWU/sk?= =?us-ascii?Q?QAOfox06W6LPR9yjr8o58Hxmv0JLkIKfq834UWv8BJW6ScLZ/1JkRzvIIwIx?= =?us-ascii?Q?WfqvvjVd7zBaY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rW?= =?us-ascii?Q?K8MhZlwciL2JwUYkvGHoxzGYbBKYLa6oT20SCopNJZQcYicwVUufWpS8b4/L?= =?us-ascii?Q?YbSJtfgZ0wpIHoh6BR5vGHjbPL/ALkybxzZgI/kV0XGejA=3D=3D?= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DS0PR11MB7309.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(1800799024)(376014)(366016); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?J0iUu1s/k+Id/yiHHuvzntspps9BC2JReASF7qGHGGYdd/KqEWzievkuw7zA?= =?us-ascii?Q?1OJEJjfCLNNEe3UwuWpSys284l1GR3qTsycWQWGg/Lk4LhheOHyHnAMLdQwW?= =?us-ascii?Q?80bq04HVe8LihnukjSwEUxgqb2NtcCUfRevgkmuKQBMZZsZMmHTzP4jJOYIE?= =?us-ascii?Q?5GhWf+WNCqAMsUpIStyS+LJ/AXoyOhmq8eHT3XA5zjk1PF3b9F6u5eZz+PJr?= =?us-ascii?Q?fbucX+PK6uxRjG1Fth0SJJ0Dy2OyJknO3dkx/9e/ORM7/ZsBr27iJhlvBciv?= =?us-ascii?Q?L7BAwK3PsV/O7mffRL/fbZayvFmg9VDnL6PlbPiywrSDb9foLKSrhG5F+QQ8?= =?us-ascii?Q?QPqatv+OCCurNdG0XwemR3Y7bNDWPHfpx6q0iRfGRX+yXxpRZ5AdkUyF9Jge?= =?us-ascii?Q?DkZEaLwGfq78iuPDnNliutyEiJSkjXa1xDenO0HDVqiX8PDCObnvv14Vtr8Q?= =?us-ascii?Q?fCHNbEMj6b9XKN3ZaAdNjKy2EFfwXCWejUQHvlb7yP9a9tlrjwFWR2krYwuL?= =?us-ascii?Q?2Svb/SSOTsgjgCjpHRMWM4HoKxGunAtsQOVZVj9RtujyLE5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1uF4AP0UUp4PpQlIIGNTAyyI12ePaF83WloR3xqvYpiclVMoQF6d?= =?us-ascii?Q?IPcW6JI/mfHTukftaFCZhMYhhbNb7IS0x9dRNcR2P4ySk+6IuzCGHaoD0BVl?= =?us-ascii?Q?KaAMpac0nXs2eEWqqOYcakBLNUjkFOJwbqKiAU386I8S9ivBzLToa1k9WIeD?= =?us-ascii?Q?Dg=3D=3D?= X-MS-Exchange-CrossTenant-Network-Message-Id: 9cc80915-80b9-4731-ba14-08dcafed405c X-MS-Exchange-CrossTenant-AuthSource: DS0PR11MB7309.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Jul 2024 16:41:10.3935 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: lTYEtDT0F8c3NXoyBQNAABT5YpawfjTp5DzgjpFaANeahy//GIcerBX0IsSpP7zQqS2RAR7dRV24L/fO93vXrpav173Q/zHhhD4SEqnCR4w= X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ0PR11MB5152 X-OriginatorOrg: intel.com X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org On Mon, Jul 29, 2024 at 06:16:48PM +0200, Burakov, Anatoly wrote: > On 7/29/2024 4:30 PM, Bruce Richardson wrote: > > On Mon, Jul 29, 2024 at 02:05:52PM +0100, Anatoly Burakov wrote: > > > A lot of developers use Visual Studio Code as their primary IDE. This > > > script generates a configuration file for VSCode that sets up basic build > > > tasks, launch tasks, as well as C/C++ code analysis settings that will > > > take into account compile_commands.json that is automatically generated > > > by meson. > > > > > > Files generated by script: > > > - .vscode/settings.json: stores variables needed by other files > > > - .vscode/tasks.json: defines build tasks > > > - .vscode/launch.json: defines launch tasks > > > - .vscode/c_cpp_properties.json: defines code analysis settings > > > > > > The script uses a combination of globbing and meson file parsing to > > > discover available apps, examples, and drivers, and generates a > > > project-wide settings file, so that the user can later switch between > > > debug/release/etc. configurations while keeping their desired apps, > > > examples, and drivers, built by meson, and ensuring launch configurations > > > still work correctly whatever the configuration selected. > > > > > > This script uses whiptail as TUI, which is expected to be universally > > > available as it is shipped by default on most major distributions. > > > However, the script is also designed to be scriptable and can be run > > > without user interaction, and have its configuration supplied from > > > command-line arguments. > > > > > > Signed-off-by: Anatoly Burakov > > > --- > > > > > Just was trying this out, nice script, thanks. > > Thanks for the feedback! Comments below. > > > > > Initial thoughts concerning the build directory: > > - the script doesn't actually create the build directory, so there is no > > guarantee that the build directory created will have the same parameters > > as that specified in the script run. I'd suggest in the case where the > > user runs the script and specifies build settings, that the build > > directory is then configured using those settings. > > I'm not sure I follow. > > The script creates a command for VSCode to create a build directory using > configuration the user has supplied at script's run time. The directory is > not created by the script, that is the job of meson build system. This > script is merely codifying commands for meson to do that, with the > expectation that the user is familiar with VSCode workflow and will go > straight to build commands anyway, and will pick one of them. Are you > suggesting running `meson setup` right after? > Yes, that is what I was thinking, based on the assumption that running "meson setup" should be a once-only task. I suppose overall it's a different workflow to what you have - where you run meson setup repeatedly each time you change a build type. My thinking for the approach to take here is that your script firstly asks for a build directory, and then: * if build-dir exists, pull settings you need from there, such as build type and the apps being built. * if not existing, ask for config settings as you do now, and then run meson setup to create the build dir. Thereafter, the source for all build settings is not in vscode, but in meson, and you just use "meson configure" from vscode to tweak whatever needs tweaking, without affecting any other settings. Since you don't affect any other settings there is no need to record what they should be. > Assuming we do that, it would actually then be possible to adjust launch > tasks to only include *actual* built apps/examples (as well as infer things > like platform, compiler etc.), as that's one weakness of my current "flying > blind" approach, so I wouldn't be opposed to adding an extra step here, just > want to make sure I understand what you're saying correctly. > > > > > - On the other hand, when the build directory already exists - I think the > > script should pull all settings from there, rather than prompting the > > user. > > > > That can be done, however, my own workflow has been that I do not ever keep > build directories inside my source directory, so it would not be possible to > pick up directories anywhere but the source directory. > Why is that, and how does it work now, for e.g. getting the compile_commands.json file from your build folder? > I also think from the point of view of the script it would be easier to > start from known quantities rather than guess what user was trying to do > from current configuration, but I guess a few common-sense heuristics should > suffice for most use cases, such as e.g. inferring debug builds. > What you need depends on whether you want to keep running "meson setup" - which means you need to track all settings - or want to use "meson configure" where you don't really need to track much at all. > > - I'm not sure I like the idea for reconfiguring of just removing the build > > directory and doing a whole meson setup command all over again. This > > seems excessive and also removes the possibility of the user having made > > changes in config to the build dir without re-running the whole config > > script. For example, having tweaked the LTO setting, or the > > instruction_set_isa_setting. Rather than deleting it and running meson > > setup, it would be better to use "meson configure" to adjust the one > > required setting and let ninja figure out how to propagate that change. > > That saves the script from having to track all meson parameters itself. > > Last I checked, meson doesn't have a command that would "setup or configure > existing" a directory, it's either "set up new one" or "configure existing > one". I guess we could set up a fallback of "configure || setup". > This goes back to the whole "create build directory after running the script" option. If the script creates the build dir, the vscode commands never need to use meson setup, only ever meson configure. > > > > - Finally, and semi-related, this script assumes that the user does > > everything in a single build directory. Just something to consider, but > > my own workflow till now has tended to keep multiple build directories > > around, generally a "build" directory, which is either release or > > debugoptimized type, and a separate "build-debug" directory + occasionally > > others for build testing. When doing incremental builds, the time taken to > > do two builds following a change is a lot less noticable than the time taken > > for periodic switches of a single build directory between debug and release > > mode. > > The problem with that approach is the launch tasks, because a launch task > can only ever point to one executable, so if you have multiple build > directories, you'll have to have multiple launch tasks per app/example. I > guess we can either tag them (e.g. "Launch dpdk-testpmd [debug]", "Launch > dpdk-testpmd [asan]" etc.), or use some kind of indirection to "select > active build configuration" (e.g. have one launch task but overwrite > ${config:BUILDDIR} after request for configuration, so that launch tasks > would pick up actual executable path at run time from settings). I would > prefer the latter to be honest, as it's much easier to drop a script into > ./vscode and run it together with "configure" command to switch between > different build/launch configurations. What do you think? > I think I'd prefer the former actually - to have explicit tasks always listed for debug and release builds. Not a big deal for me either way, I'll just hack in the extra tasks as I need them, so it's a low-priority support item for me. > > > > Final thoughts on usability: > > > > - Please don't write gdbsudo to /usr/local/bin without asking the user > > first. Instead I think it should default to $HOME/.local/bin, but with a > > prompt for the user to specify a path. > > It's not creating anything, it's just printing out a snippet, which, if run > by user, would do that - the implication is obviously that the user may > correct it if necessary. The script actually picks up path to `gdbsudo` from > `which` command, so if the user puts their command to $HOME/.local/bin or > something, it would get picked up if it's in PATH. I see your point about > maybe suggesting using a home directory path instead of a system wide path, > I can change that. Yep, thanks, and thanks for the explanation. BTW: even if the user is running as non-root user, they don't always need to use sudo (I set up my system to not need it for running DPDK). I see there is a cmdline option for "no-gdbsudo" but I think you should make that accessible via TUI also if non-root. And for the cmdline parameters, how about shortening them to "--sudo" and "--nosudo". For debug vs release builds you may want to have the latter run without gdb at all, just with or without sudo.] > > > > > - While I realise your primary concern here is an interactive script, I'd > > tend towards requiring a cmdline arg to run in interactive mode and > > instead printing the help usage when run without parameters. Just a > > personal preference on my part though. > > I found it to be much faster to pick my targets, apps etc. using a couple of > interactive windows than to type out parameters I probably don't even > remember ahead of time (especially build configurations!), and I believe > it's more newbie-friendly that way, as I imagine very few people will want > to learn arguments for yet-another-script just to start using VSCode. It > would be my personal preference to leave it as default-to-TUI, but maybe > recognizing a widely used `-i` parameter would be a good compromise for > instant familiarity. > Ok. There's always a -h option for me to get the cmdline parameters. I also think if the script is ok with working off an existing build directory (or directories!), and only prompting for that, it would remove for me the real necessity of asking for a more cmdline-fieldly version.