BitMaker-hub / NerdMiner_v2

Improved version of first ESP32 NerdMiner
Other
1.5k stars 268 forks source link

move libs to common and clean platform config file #172

Closed valerio-vaccaro closed 2 months ago

valerio-vaccaro commented 11 months ago

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

romanmashta commented 11 months ago

Wouldn't it be better to use lib_ignore config parameter and left PlatformIO standard folder structure? example: lib_ignore = rm67162, TFT_eSPI@2.5.23 will ignore local libraries

valerio-vaccaro commented 11 months ago

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

romanmashta commented 11 months ago

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

valerio-vaccaro commented 11 months ago

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

romanmashta commented 11 months ago

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.

valerio-vaccaro commented 11 months ago

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

BitMaker-hub commented 11 months ago

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

valerio-vaccaro commented 11 months ago

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.

Jason2866 commented 3 months ago

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

valerio-vaccaro commented 2 months ago

looks like nobody care about it, closing sadly