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 DC10F456E4; Mon, 29 Jul 2024 16:30:28 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id AC9A040670; Mon, 29 Jul 2024 16:30:28 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.16]) by mails.dpdk.org (Postfix) with ESMTP id 987E74066E for ; Mon, 29 Jul 2024 16:30:27 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1722263428; x=1753799428; h=date:from:to:cc:subject:message-id:references: in-reply-to:mime-version; bh=ieu3Y2+n3J0Y/lJIIv0Y0vgSspPWaDuSCY5GxL6SAKU=; b=hnLo94d5/+nnZ7/BRFfA8Oc6sSgpwK88p6KXdeWzZTHxeY3k7XtI/h6H FjsKD37h1HKWyn7u3xwozf7DMPkZrztj17vGG4rxFmc/3vRGu1xuV5PV0 Th/oDNd2/B+TqdoVJ6a7Rpi6iryJOp3viWF1yIxwoqT+ep1dY3nEycUXU xVlf36EclCbZi/EZRCyppbUI3A9/95Q/PM8ao7Gy794hoU+Q7tfNQS3qk daj+pIzUsLLl3OVYSQnFIN/YU9E/Gpldv1U+kM/haY3lTHJYuZPU6WzZL JFbWinS8LHfzErYsPNCcJqsyyBZkjxS1vgRlZoMZq/iN0xqMM4g87WQND Q==; X-CSE-ConnectionGUID: C/JUepkFQOiOZ4NLwxYlxA== X-CSE-MsgGUID: 2Riv54fnQ1+XZ/v+lsJXVw== X-IronPort-AV: E=McAfee;i="6700,10204,11148"; a="20164143" X-IronPort-AV: E=Sophos;i="6.09,246,1716274800"; d="scan'208";a="20164143" Received: from fmviesa003.fm.intel.com ([10.60.135.143]) by orvoesa108.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Jul 2024 07:30:23 -0700 X-CSE-ConnectionGUID: L8Fq0Qh6QSmDp6HIg5bvlw== X-CSE-MsgGUID: 599vcAXHRD+Ufv/Vcv/3vA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.09,246,1716274800"; d="scan'208";a="58120119" Received: from fmsmsx602.amr.corp.intel.com ([10.18.126.82]) by fmviesa003.fm.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 29 Jul 2024 07:30:22 -0700 Received: from fmsmsx611.amr.corp.intel.com (10.18.126.91) 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 07:30:22 -0700 Received: from fmsmsx612.amr.corp.intel.com (10.18.126.92) by fmsmsx611.amr.corp.intel.com (10.18.126.91) 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 07:30:21 -0700 Received: from fmsedg602.ED.cps.intel.com (10.1.192.136) by fmsmsx612.amr.corp.intel.com (10.18.126.92) 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 07:30:21 -0700 Received: from NAM11-DM6-obe.outbound.protection.outlook.com (104.47.57.169) 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 07:30:21 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=JQFzit9ubVC79tlARyaBYjP7rHGVMQ0iGS7rLsDUgBZd9I/6O0Mz07ig+YaYMfTyLLeX4EaMu4OfJE3GXBuBOWCf9LHGrEsSd0ou1zvnVCLdwWNlu+24+b3GYdoeiug5mlJI2/ytXfJFI/lIWVVIBo9U2ySqj1d/bqB44LE4FS34Nkbu1sFHdzgU592g7WmrsFNqO4ihVAET7ilJSAv4bfSbfouovu1pEwORg8p3fSRiNja4EZPOniTGUxahALoXjQ2j6+P25ulowVUtPc1S/aQ+KEUCMp9Ptmuu0/wcvETahSLyVjyrGlFFtzmLTpjZu7PHZ/XDMf2GlMy6PvgOSg== 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=iQwX8MSfPw70hgTCrTMZNmoT2mLDG9b3K5TBUYZOTyA=; b=cGqxUwoGqMbTzeCWKvVvArkY4ROqKzK7xYyeNa4tfdLYTlCwuAvcQBTpUJyjYrEdSPh5MkP1E0DfGWmaRjRymTojReBHPsmPjGgSrQ3BK64xREkxcYBgS3BU6/9WXG22ZHyp+2+8ylfDVD98UIjkwx6KzAxkC/zQEf74s2We28R5WzR4Gc0XIMANFkARlGb2b/PFPhlyH3qagqphukU/KjtDO0n6/p1DHk65BL5vo/uXoCMLGlahMLCQnbV4fgJt6LsQugfaZErjFTO5dt81k+168utx3S5uI5vO86CbFHQovCq3mKculQLxr9sc6aINfIxQMsMrtkLIZ2aNU02vpw== 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 SN7PR11MB7540.namprd11.prod.outlook.com (2603:10b6:806:340::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7807.28; Mon, 29 Jul 2024 14:30:18 +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 14:30:18 +0000 Date: Mon, 29 Jul 2024 15:30:12 +0100 From: Bruce Richardson To: Anatoly Burakov CC: , Subject: Re: [RFC PATCH v2 1/1] devtools: add vscode configuration generator Message-ID: References: <99003582461c7ec772e49dae9b43840496342646.1722258213.git.anatoly.burakov@intel.com> Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <99003582461c7ec772e49dae9b43840496342646.1722258213.git.anatoly.burakov@intel.com> X-ClientProxiedBy: DU7P194CA0002.EURP194.PROD.OUTLOOK.COM (2603:10a6:10:553::33) To DS0PR11MB7309.namprd11.prod.outlook.com (2603:10b6:8:13e::17) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS0PR11MB7309:EE_|SN7PR11MB7540:EE_ X-MS-Office365-Filtering-Correlation-Id: 277f73de-8147-4afc-5270-08dcafdaf834 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?KH/E5unrQzGFb/FEodhdE9Np0omV9aCA3k8pJnj04UnA5a0n4+esdOA/FYPN?= =?us-ascii?Q?LNQuwfD4z/OFf7gki6CcSn7aevZTsxV0LWFIxLkx//ZYBJKJUSE73AfRwIX4?= =?us-ascii?Q?PrRWFhmUmrb2nZC2cPb2JhOpoCxTTWjd82cWB1bVGEwuQNOOcITA/7IP8BbD?= =?us-ascii?Q?GlwFBqLBtbqF89CbSgC4g0kJwu697Ge89Y5Rcz74QSq8OZTiroClfbwUjZLP?= =?us-ascii?Q?7a66Oyj6Haz39cLNw8DHcqggDbSs8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-ascii?Q?Isk7HcIL2X31LxsouGJOCG7/lTPpvsb5sDrJTOc++wGEBFNQ+TUiJeQj1UVJ?= =?us-ascii?Q?9x8MeC2bOUYoDw4RIwG65SWBy7vP5ZBQx8VxTxpILENlbV194HArsj3Qjd9I?= =?us-ascii?Q?Jlv9GJJAw+7eGfjXt8ldLkwyGF84FB0Jah1WV5dKQRJWN4VWQ9yg/pIm9Hcj?= =?us-ascii?Q?o+TPrnX9SPU9PYot7PztYsQMdZKQ+SDOfaXSR7l2adEJqA=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?vbV9h3ERWOvIHWxL27W6q3MlO8HrcacMoFd/DXHKkNWRwbwYZkvxT+KJvIyA?= =?us-ascii?Q?CJxMHPjSkbmSvw1Qq8PUr2l5HaNL8gpPJXxNak5OP33s8VDjCxac9pp3loV8?= =?us-ascii?Q?MoLrVoPxSoShEfglucMSbfTNI9nR3irc5hdVvE71hIr98hg9iaIJwmP273LT?= =?us-ascii?Q?tNfsf2SqGnpV6vLoi612VwXb7PmNJMU9IRbrxO2rzAz6fk1Agxf7j2ENLM+2?= =?us-ascii?Q?VqsFBXYScd/tjk+X7lpUbPTisj9d1m3WE377wrUgbZmzdDtCBPCnNXX/Bixt?= =?us-ascii?Q?ggvCh/j3TUyIso81v9mR1WquVo1T81onPe/IlvF9u4LaYzUa2jh9w1LkWmzL?= =?us-ascii?Q?IAEMn+pdoXGyGqwjNH5p/feBdQB0SWdV/u4amtywYWj+hZv94ZTQ4oahOtnt?= =?us-ascii?Q?GYBi+9Rq5GPn3YEaF3Ld2Ev8lGzopVbXUzORrZ1u9ZVqPeYwp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2u/mCEBwYufFHfdlnP+tCndjiExv2Ab?= =?us-ascii?Q?13DhaWk10a6d4QoNH61+9iwciB3qr6e7GM4JxQU6vS39ceYNEla9FORiN4jn?= =?us-ascii?Q?vakCZZso8Tmp6S+psvFHKC2hQcE3GyOq6SiQJndhucLGU4SWNlPgS2DmfaGU?= =?us-ascii?Q?i5ZUbphV1jqN7UYIVCWdBveD4pXWVncMtoT2YVaNPXRlEMvZsSj3GukSh0xu?= =?us-ascii?Q?r/zb94oPaPf37UY5O8XjnOGuL4vBkcg4OQygTILXVT9vKKN+N3hmqv+ZR3gC?= =?us-ascii?Q?uQ=3D=3D?= X-MS-Exchange-CrossTenant-Network-Message-Id: 277f73de-8147-4afc-5270-08dcafdaf834 X-MS-Exchange-CrossTenant-AuthSource: DS0PR11MB7309.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Jul 2024 14:30:18.4118 (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: F3vZ1gOZh/66dYu+unGJmUbXxf+mOFZbu1zhWdNCkBSBFZ98qdG9HyLV73VpwU/RL5XG2CkKEaOXUNqTHCH+RbcnihQ111joz9jrvLMTkf0= X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN7PR11MB7540 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 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. 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. - 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. - 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. - 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. 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. - 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. /Bruce