NerdMiner_v2 icon indicating copy to clipboard operation
NerdMiner_v2 copied to clipboard

move libs to common and clean platform config file

Open valerio-vaccaro opened this issue 2 years ago • 8 comments

move libs to common directory, in that way we don't need to compile libs if are not used plus some cleaning on configuration file

valerio-vaccaro avatar Sep 14 '23 15:09 valerio-vaccaro

Wouldn't it be better to use lib_ignore config parameter and left PlatformIO standard folder structure? example: lib_ignore = rm67162, [email protected] will ignore local libraries

romanmashta avatar Sep 14 '23 16:09 romanmashta

add everything you have in a dir and maybe ignore something you don't need sounds wrong but will works anyway

valerio-vaccaro avatar Sep 15 '23 12:09 valerio-vaccaro

Yes, but that's the purpose of Lib folder. And that's how PlatformIO saw this by design, and why lib_ignore option exists

romanmashta avatar Sep 15 '23 12:09 romanmashta

Are you sure about your statement on global libraries?

This option is DEPRECATED. We do not recommend using global libraries for new projects. Please use a declarative approach for the safety-critical embedded development and declare project dependencies using the lib_deps option

https://docs.platformio.org/en/stable/projectconf/sections/platformio/options/directory/globallib_dir.html

valerio-vaccaro avatar Sep 15 '23 13:09 valerio-vaccaro

If this folder is deprecated, why it is part of new empty project for latest platform.io?

Screenshot 2023-09-15 at 16 09 47

Again, tossing around half thousand files vs adding 10 lines in config also does not looks right.

romanmashta avatar Sep 15 '23 13:09 romanmashta

platformio suggest this changes and I agree, anyway I will not push more this topic and maintain my fork

valerio-vaccaro avatar Sep 15 '23 13:09 valerio-vaccaro

I don't know what to do with this PR but I agree is confusing to have libs_env and then the global lib folder.

Even this, how is afecting moving it to common folder? In fact, each board is picking his own TFT lib

BitMaker-hub avatar Sep 26 '23 11:09 BitMaker-hub

Common is not compiled automatically but you will need to add in the list of libraries, this is good if codebase grow, imagine somebody add a board with LVGL with some custom files based on LVGL, you want avoid that every board builds this custom files and LVGL if not used. Anyway if you are not confident that's a good way you can wait a bit more before merging.

valerio-vaccaro avatar Sep 26 '23 13:09 valerio-vaccaro

Are you sure about your statement on global libraries?

This option is DEPRECATED. We do not recommend using global libraries for new projects. Please use a declarative approach for the safety-critical embedded development and declare project dependencies using the lib_deps option

https://docs.platformio.org/en/stable/projectconf/sections/platformio/options/directory/globallib_dir.html

You are mixing things. globallib_dir is a different setting. The used and recommended is https://docs.platformio.org/en/stable/projectconf/sections/platformio/options/directory/lib_dir.html

Jason2866 avatar May 19 '24 10:05 Jason2866

looks like nobody care about it, closing sadly

valerio-vaccaro avatar Jun 13 '24 08:06 valerio-vaccaro