-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
Compiling does not include usermods #4597
Comments
None of the usermods (except Audioreactive) are automatically compiled with WLED. |
i did say that i am adding them in platformio.ini, first compile works with audioreactive, second is with audioreactive and Temperature but only Temperature is added, after that none will be added. |
Then perhaps @willmmiles may know more. Reopen if needed. |
I can't replicate this in my development environment; changes to platformio.ini are always picked up on the next build, and seem to build correctly with the specified usermods. @C0oL3r , are you using an IDE or building with platformio at the command prompt? What platform is your build system (Linux, Windows, macOS, GitHub codespaces, etc.)? |
Actually, let me hazard another guess. For this custom environment:
you will get the default usermods with esp32dev (ie. audioreactive). For this environment spec:
you will get only Temperature; the For this environment spec:
you will get no usermods at all (it's being overriden with the empty string). I think maybe you want:
...where it keeps the inherited value (as it is explicitly referenced), plus adds the extra module you want. |
@willmmiles can confirm that building different configurations of usermods using VScode can lead to some or all of them not being added properly: after changing usermod configuration, a full clean must be executed prior to building, otherwise the usermods don't get pulled in properly. Can you confirm? |
@willmmiles i am building it in VS Code with platformio, and i am using windows. |
It is not unstable, if you do a full clean it works just fine. The question is just: is that expected or not. |
It works only for the first compile, after that things starts to get weird. Maybe it’s a problem with the platform on Windows |
I can confirm that compiling it in a Docker container works well, compiling is done everytime with success and everything is added. |
It's meant to work correctly every build with up-to-date PlatformIO; I do know there's some bugs with older releases that cause problems with library building. I'll retest some cases -- I do recall seeing an issue with removed modules not actually being removed, but I thought it'd been resolved with a PlatformIO update. Could be there's still something lurking there. |
I couldn't reproduce this on my build system (Win11, VSCode 1.98.2, PlatformIO 6.1.18). I ran a series of verbose builds of a test environment:
For each build the linker invocation included the correct files and only those for the specified usermods. @C0oL3r could you please check your PlatformIO version on your windows machine? |
I ran a few tests, there is definitely something weird going on. this is the sequence I ran as a test with comments what I observed: ;-> full clean what I checked was the UM config menu, always with full browser refresh (ctrl+F5), in the last instance where deep_sleep showed up but was not actually added, I checked if it was still working and it was not, just the menu showed up (where the menu should have shown AR) |
FYI sometimes you need to save usermod configuration for it to appear. This is due to the fact that usermods settings page reads cfg.json file directly and if there is no configuration saved for a usermod then it will not be present in UI. |
thanks for that info. I checked again:
continuing the sequence from above: |
That would mean they are not linked in. |
correct, which is what this issue is about. |
Thanks for the bug report @C0oL3r Can I confirm, were you waiting to try out the "bleeding edge" unreleased version of WLED or just wanting to do a regular build with certain usermods enabled. If it's the latter, please checkout a release tag or the 0_15 stable release branch |
I instrumented @DedeHai , when you say "full clean", are you removing I'm going to see about fixing the settings page to always use the live state instead, so we can test cleanly without all the jankiness from outdated configurations. |
I did not manually delete folders for the test, just the button 'full clean' in pio |
Thanks. I've found the 'full clean' button does basically nothing, since the "real" storage is |
Live cfg fix currently pushed to #4601. I'll break it out to a separate PR later I think. |
When i was testing i tried to delete .pio, .buildcache, even reinstalled platformio entirely, the compiling was fixed only for a new clone of the repository, i didn’t tried anymore as i used docker to compile it but when i will have some time i will send you the versions (it should be the latest platformio as i reinstalled it). Even in my docker environment there are some sketchy things happening as sometimes i need to remove .buildcache in order for the compiler to rebuild my firmware file, especially when i modify only some defines in platformio.ini |
Write the current usermod list to a file, and add it as a dependency to the linked output file. This should hopefully overcome potential poisoning of SCons' build cache with incorrect matches. Meant to fix wled#4597
Write the current usermod list to a file, and add it as a dependency to the linked output file. This should hopefully overcome potential poisoning of SCons' build cache with incorrect matches. Meant to fix wled#4597
What happened?
When i'm trying to compile WLED usermods are not included in the firmware.
To Reproduce Bug
If i clone the repository and try to build it like it is it will compile good with audioreactive. But if i add for example Temperature usermod and compile it again it will add Temperature usermod but it will not include audioreactive.
Then if i remove again Temperature it will not include any usermod anymore. I tried to delete .buildcache, .pio but no luck. Searching for string in the firmware file first compile it shows me about audioreactive, second about the Temperature and the third compile it will not find anything about any usermod.
Also even adding ${common.debug_flags} it will not change anything, the firmware will not be recompiled
Expected Behavior
It should add the usermods i set to custom_usermods in platformio.ini. And also recompile if anything changes in platformio.ini.
Install Method
Self-Compiled
What version of WLED?
Nightly Release 20250316 0.16.0
Which microcontroller/board are you seeing the problem on?
ESP32
Relevant log/trace output
Anything else?
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: