Skip to content

Remove unnecessary library setting #1487

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
May 15, 2025
Merged

Remove unnecessary library setting #1487

merged 3 commits into from
May 15, 2025

Conversation

Noschvie
Copy link
Contributor

No description provided.

@s-hadinger
Copy link
Collaborator

I'm wondering, maybe you need both lib_audio and libesp32_audio

@Noschvie
Copy link
Contributor Author

With these settings, it compiles without errors. But I can't test it until this evening.

lib_extra_dirs              = ${common.lib_extra_dirs}
                              lib/libesp32
                              lib/libesp32_audio

@Noschvie
Copy link
Contributor Author

@Staars
Copy link
Collaborator

Staars commented May 14, 2025

There is no folder lib/libesp32_audio in Tasmota.

@s-hadinger
Copy link
Collaborator

Oh you are right. There was a ghost libesp32_audio directory locally on my machine, but it's empty indeed.

@Noschvie
Copy link
Contributor Author

Fixed to lib/libesp32

@Staars
Copy link
Collaborator

Staars commented May 14, 2025

The current documentation is still correct.
lib/lib_audio is needed and the only specific lib folder for audio. But it may be part of the default lib folder list, which is not guaranteed forever. Thus the user must ensure, that it is included.
lib/libesp32 is of course needed for audio on the ESP32 too, but it is always mandatory for every ESP32 build. There is nothing audio related in it and it is pretty much guaranteed, that it is part of the default lib list for ever.

@Noschvie
Copy link
Contributor Author

It seems that no additional libs are necessary. If it's okay with you, I'll delete the line in the documentation.

[env:tasmota32-audio]
extends                     = env:tasmota32
;lib_extra_dirs              = ${common.lib_extra_dirs}
;                              lib/libesp32
build_flags                 = ${env:tasmota32.build_flags}
                              -DCODE_IMAGE_STR='"nosch audio"'
                              -DFIRMWARE_AUDIO

@Staars
Copy link
Collaborator

Staars commented May 15, 2025

There is really no guesswork or surprising stuff happening.

The current included library folder are defined here:
https://github.com/arendst/Tasmota/blob/28f4a07fd611d9c04ad2b5ef684e927f1ae0476d/platformio.ini#L48-L55

Unless someone completely overrides the entry lib_extra_dirs in a projects build section, then these libs are always compiled. At the moment the audio libs are included and thus compiled with every ESP32-xx-build.
I would even say, this should NOT be the case for such a niche application, because every build will be slowed down by the audio lib compilation. But this is another story.

The title of this PR is not correct and you could rename it to something like: remove unnecessary library setting
But keep in mind, that the current default is subject to change and it might be necessary to manually include the audio libraries to lib_extra_dirs for an audio related project again.

@Noschvie Noschvie changed the title Fix library name Remove unnecessary library setting May 15, 2025
@Noschvie
Copy link
Contributor Author

Now I have deleted the line.

@Noschvie
Copy link
Contributor Author

If desired, I can remove the lib/lib_audio line from the code and adjust the documentation accordingly. If I understand correctly, there's no difference between the ESP8266 and ESP32 in this regard, right?

@Staars Staars merged commit d826da9 into tasmota:master May 15, 2025
1 check passed
Noschvie added a commit to Noschvie/docs that referenced this pull request May 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants