anchao commented on code in PR #16312: URL: https://github.com/apache/nuttx/pull/16312#discussion_r2083380505
########## tools/Unix.mk: ########## @@ -768,6 +768,7 @@ savedefconfig: apps_preconfig $(Q) rm -f warning.tmp $(Q) rm -f defconfig.tmp $(Q) rm -f sortedconfig.tmp + $(info "The defconfig was generated successfully at $(PWD)/defconfig .If you're building out-of-tree configuration, then don't forget to copy it into your defconfig original location") Review Comment: > @anchao what is the goal of this cmake autosave? If I understood correctly when user run "make savedefconfig" it will replace the original defconfig for current board profile. Although this behavior seems good at first glance, the reason because Greg didn't implement this way it because normally the developer will use a base board:nsh profile to modify and create a local defconfig that he/she will move to a new configs/namedir that will be created. I think the cmake autosave should require a flag to force this behavior, something like "make -f savedefconfig". Maybe @patacongo could give more details here. My view is straightforward: change it in a way that is most convenient for developers. Not replacing the original defconfig with savedefconfig was reasonable before the emergence of git, developers did not have diff tools to check for differences between their work and original config After git, if the original configuration is directly replaced by savedefconfig, developers can easily use git diff to check whether the changes as expectations. If not, they only need to use git checkout to restore the file. I think for 90% of individual developers, this approach will enhance their efficiency. Furthermore, this improvement could also shorten the CI-CD time, and the process of refresh.sh could be optimized. **refresh.sh (6s)** ``` archer@archer:~/code/nuttx/n6/nuttx$ time ./tools/refresh.sh --silent sim/nsh [1/1] Normalize sim/nsh real 0m6.049s user 0m3.137s sys 0m1.988s ``` **autosave (1.5s)** ``` archer@archer:~/code/nuttx/n6/nuttx$ time make savedefconfig Loaded configuration '.config' Minimal configuration saved to 'defconfig.tmp' real 0m1.363s user 0m0.802s sys 0m0.422s ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org