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 D2B85456E5; Mon, 29 Jul 2024 18:17:08 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7223E40A67; Mon, 29 Jul 2024 18:17:08 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.17]) by mails.dpdk.org (Postfix) with ESMTP id 59AD04060B for ; Mon, 29 Jul 2024 18:17:04 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1722269825; x=1753805825; h=message-id:date:subject:to:cc:references:from: in-reply-to:content-transfer-encoding:mime-version; bh=8RUz9nd38do2Ju02dXQPv9HbL9afWwZlDjgSTY4kv6c=; b=Hi+B5rgFagXZ/++LGM0uoEfhRu0UUofVicWpgEuuvOD1NFcBdtRYgq6h aEgGDqsp0rDEzp8CTXaH5XgfWQgaPWYZuR6/tZrhVrQDyLH3c1e5H9LHQ rjxcN9eQIyONRfMJnwGsvPJrN3zeXby/8f6JrR40xNBkBHeoXTB6PWZU4 4GgCBrXMWwNu3/rxlNispcsSUgZfPY90SOqXwsU9LzkXYIdRTCVxaPq/g MtywM/t6R8FEjSh96ZzhQ18C09O40FflbKotJusdVHk5uF94oeMb8vT9c 6XsSw+71Q6u5CS+WNPpG3Gj3uarB0pyT+6Mv68HyEgWOqZcf2m6hk+qQY w==; X-CSE-ConnectionGUID: xjH5yiuoT7iPZs2V1t+9kg== X-CSE-MsgGUID: WQQQRmADRC+LKXgch3wemg== X-IronPort-AV: E=McAfee;i="6700,10204,11148"; a="20167315" X-IronPort-AV: E=Sophos;i="6.09,246,1716274800"; d="scan'208";a="20167315" Received: from fmviesa002.fm.intel.com ([10.60.135.142]) by orvoesa109.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Jul 2024 09:17:00 -0700 X-CSE-ConnectionGUID: 9qSgG3nzRv6/55V1ZkJSBQ== X-CSE-MsgGUID: 74GNB9PHQyW+erFknwd22w== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.09,246,1716274800"; d="scan'208";a="77243773" Received: from orsmsx603.amr.corp.intel.com ([10.22.229.16]) by fmviesa002.fm.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 29 Jul 2024 09:16:59 -0700 Received: from orsmsx610.amr.corp.intel.com (10.22.229.23) by ORSMSX603.amr.corp.intel.com (10.22.229.16) 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:16:59 -0700 Received: from ORSEDG602.ED.cps.intel.com (10.7.248.7) by orsmsx610.amr.corp.intel.com (10.22.229.23) 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:16:59 -0700 Received: from NAM12-MW2-obe.outbound.protection.outlook.com (104.47.66.41) by edgegateway.intel.com (134.134.137.103) 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:16:58 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=kZ3KfR6xuADaA9pD+Cy82f1tbT/FCg6VpHiloNyhcUd3+ay7RUzXRKkmNCL4DgZpzqmKE+EAgL5q6Oi1fWZDCZQJOohaYM1lJomTTh6ZICULQ+8uUu0LHkIm69SkapDTgnTi5BvWXkpWALPMlrQYGO6DcpLvxbIxPTvlQ5L1U2nSGqWKGiBmIwFhtF1I8kDD1vvoZ/ed8RgkDReNa5DnIONRoQ3IULPfzBTo4Rq3vNeX5Dp3cz0sjm9JN+qPfrFEyD4PnNxcl5nXc7KpnVz4Sqoy1RO3cNiuH2wW/D8ENsg0zQMsqw11BbWuZELnTmzXKyRBbAyS5jg/AIYZ3p9FrA== 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=OyljyRnvMvt+gGcvN2syCX7b1AeG8WClwqLaFGyOL28=; b=QWa5vlkBO/70DyKHj9lm8PszMkhQFD2gASxWrnxZrixE29iTim0OMyAgJhlK3pYQqQyX3qVaCj8sWsAktu+wOkkm1m/9RhkQ1j5HTLijt6v+fEl0u7IeD/5CVjyHtU6pHKZdjLjwrH7/APagbymsNxq1Gk6as5a3HsUYCJE7mdiufuUm/Efvfq8PICvyBgX48cQ1GkHj7wlrYXmfZE/qgBYGp3n1sfOMMPWaGxwh/IaG2SRf2On326Eq1RaEEDYIzfQClXKRund3ohlfQVRkGMOp/GngJeC/Bp40T2j4smbfXRv7iynAFjKSDm4wD7Mg4d52sQMKNrCM6BaOR/NnIg== 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 DM4PR11MB6502.namprd11.prod.outlook.com (2603:10b6:8:89::7) by CH3PR11MB7321.namprd11.prod.outlook.com (2603:10b6:610:150::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7807.26; Mon, 29 Jul 2024 16:16:56 +0000 Received: from DM4PR11MB6502.namprd11.prod.outlook.com ([fe80::21e4:2d98:c498:2d7a]) by DM4PR11MB6502.namprd11.prod.outlook.com ([fe80::21e4:2d98:c498:2d7a%7]) with mapi id 15.20.7807.026; Mon, 29 Jul 2024 16:16:56 +0000 Message-ID: <3edc6421-0923-4371-a7dd-62d3857259ab@intel.com> Date: Mon, 29 Jul 2024 18:16:48 +0200 User-Agent: Mozilla Thunderbird Subject: Re: [RFC PATCH v2 1/1] devtools: add vscode configuration generator To: Bruce Richardson CC: , References: <99003582461c7ec772e49dae9b43840496342646.1722258213.git.anatoly.burakov@intel.com> Content-Language: en-US From: "Burakov, Anatoly" In-Reply-To: Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: DUZP191CA0050.EURP191.PROD.OUTLOOK.COM (2603:10a6:10:4fa::23) To DM4PR11MB6502.namprd11.prod.outlook.com (2603:10b6:8:89::7) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM4PR11MB6502:EE_|CH3PR11MB7321:EE_ X-MS-Office365-Filtering-Correlation-Id: c34c1578-01a2-4cb2-987e-08dcafe9ddab X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|366016|1800799024|376014; X-Microsoft-Antispam-Message-Info: =?utf-8?B?NmwrNXJXbTFQZ0Z5VjRUTzUyU2p4b3htcXJnRW9scm5xTlZVTXdTOWg2NHVT?= =?utf-8?B?aXNHTUpPY3BzNVQyMDVVUUJOUHcwZHVaeGRjY2tWSFpXY0JjRUFWQzlROUtL?= =?utf-8?B?aWd1a28rVkxEdmRsbFpkNU5mQ3lyLzhleGtsSXkrRXFkNkZ1R1lLK2VyVlhl?= =?utf-8?B?cEpQMzFXdkhSRzdZM1d1MDhxcXRMQ0xKSHVDZTFGVVBJUkdoSnB2c2dDMk9M?= =?utf-8?B?NExGTnM1TmZDU0dSeENyQUVDM0prVjVzYkhpaUJtZXE5R1E5TWlZLzdrM2tw?= =?utf-8?B?U1o5VlVHK01ERjN3ZVhCemNWMEVNbFM3NjlWVlQrUHJYVnhDTDVVNnZ1eWJL?= =?utf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0JjSEI2SDZw?= =?utf-8?B?R0tHNEFoRFIzalNnZlk3eWpRTXhsVE1uK1BhR01LZzFzUXNtK2xEQjVLOTBz?= =?utf-8?B?UU5JTnlMblNJVzBjcGNpQ2xYUlRzV0hjcU5GakkzMUZkMityTnl4Y3Z5QzBr?= =?utf-8?B?SlRCUnpzMU1xSWlMeE02dGJPN3laMkpFZ3RKRnhORjlWbzFEc3lFOHNuUmM5?= =?utf-8?B?b3dPZUZwOFhsL0E1Y2NpMzhVcXFoV2VZd05vTGgwdFp3MUdNR2Rlem5xVC9C?= =?utf-8?B?cURlRWVNblpYVWxLcGpWM2ZZdk5PVXY3RHFELzk0S0FsZEF6bzJyYitDb3h0?= =?utf-8?B?SzFtVlVJb21SeEsrVmpFMzhLbUlpSmIyTlpuOCs5R1ZtZ0Npa3pBZzA3dXZD?= =?utf-8?B?cVdaMVpQaVYrZkhEV09kbTZkbnQ2WjdzWkVZWWZkRDFuTkliakxTY2VyYjJx?= =?utf-8?B?bWJqd284OGhNRElOVFBWanlsekRsdW9RbDZvZEhzNTlwQm9XekRNQkRGSHNW?= =?utf-8?B?SjE4NGp0R1hFQlU5YWFMQWZxUXFnaWhVUElFMG0xYm13eVlNYzNIS0hTVVJV?= =?utf-8?B?dDNDWTBPd1B3U0U5akxuQT09?= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM4PR11MB6502.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(366016)(1800799024)(376014); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?b3FDOFNyNUNsZXdFQ3JGdGFUbWtiZFVJZlA2L2w4cWd6aTlxVktmRGNTNVlC?= =?utf-8?B?aW1XRVBuL3M5N2pid1FGeEVCcFozZjZlendNNXNCNWQyUW5oREFTSXdiQytn?= =?utf-8?B?b2pQbVVaU2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XhnM2tPbGNybjdTa1B2?= =?utf-8?B?YUR4WFpQTXhKd25mNnZZYko2RHNkQ291c2FrZWFBT0srZWx4b3RYZ2oxTzFl?= =?utf-8?B?Nzl5YVorNTRmZHhGQ1JZQmxIcUNPSW5qK1hoOTJ4S2g1WVNuOWcxNHo1YllR?= =?utf-8?B?c1BmdjFmeHJFbzRnc25RTWNKTGloNGduRW1OUjF0SGZ1SGZJM0lObjBZT0lJ?= =?utf-8?B?Y0s0QmRpK2xaSE9xSXQ1Vkh1VG5FYmd3MHBDSjFuVCtTTWYrREU1d1hhY2to?= =?utf-8?B?eFE9PQ==?= X-MS-Exchange-CrossTenant-Network-Message-Id: c34c1578-01a2-4cb2-987e-08dcafe9ddab X-MS-Exchange-CrossTenant-AuthSource: DM4PR11MB6502.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Jul 2024 16:16:56.3347 (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: r3dTre0NaXSRZKtkZxUHTjOVDOavQ/wT4jPoDw9g7pmeEDEBYOzeNTTxnaZbsn28GWY/uRZA3CN+H7kj3VfOJh4ZsLyWdI53aPe+bZ2HzkY= X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH3PR11MB7321 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 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? 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. 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. > - 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". > > - 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? > > 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. > > - 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. > > /Bruce -- Thanks, Anatoly