PlummersSoftwareLLC / NightDriverStrip

NightDriver client for ESP32
https://plummerssoftwarellc.github.io/NightDriverStrip/
GNU General Public License v3.0
1.31k stars 213 forks source link

Offline builds stall before any real building starts #471

Open robertlipe opened 11 months ago

robertlipe commented 11 months ago

Bug report

Problem Building offline used to be possible and practical. Sometimes in recent months it's become impractical.

Steps

  1. Disconnect from internet
  2. Pio run target build (doesn't matter which -e)
  3. Experience sadness

Example Adding a -v to the build shows is paused for a couple of minutes between displaying a list of files in assets/, a line showing build options and 80 dashes. It wanders off into the weeds then displaya "app@0.1.0 build" and "webpack --mode production"

There's nothing that really looks like an error and making a 71k zip isn't exactly hard. LDF is slow, taking longer than just complaining everything, but this is pausing before that.

This has bugged me for several weeks, but I've been able to work around it, but I'm asking for someone else to investigate.

I think it's something in the new web UI stuff. Can one of you web wizards please see what going on at this step, before c++ compilation even starts, and see if it can play nicer in the absence of an internet connection.

Notes

KeiranHines commented 11 months ago

Hi @robertlipe,

Have you tried this since this commit was merged?

The issues here would be that the old method used npm ci which would have deleted and attempted to re-install your node_modules. Now it will use the existing node_modules if you have previously downloaded them.

robertlipe commented 11 months ago

I've confirmed that it builds in my doctor's waiting room again. :-) Thanx to all involved in the fix.

robertlipe commented 10 months ago

In recent weeks (I don't know exactly when) this problem has come back.

Pull out your ethernet cable and/or put your device into airplane mode and you'll see a long (many minutes) pause just before this is displayed:

app@0.1.0 build vite build --emptyOutDir

@KeiranHines ,can you please recheck? It's in the web stuff, before the dependency checker burns tens of seconds and before we get to compiling any actual C++ code.

KeiranHines commented 10 months ago

Hi Robert. I am travelling at the moment I probably won't get to it until the new year unless I get time in an airport. I will take a look when I can.

robertlipe commented 10 months ago

I'll admit that my own use case for this will be slowing down through about a similar time frame, so it's more to get it on the record than to solve an immediate need. I should probably just dig into the build and find a way to disable it because for those specific builds, I don't usually care if they run the web interface or not, really; I'm more syntax-checking C++ work.

It can wait. Or i can hack up the build to just not build web stuff if we're not building a web server (ahem). Or I can capture the c++ build command into a compile_commands https://docs.platformio.org/en/latest/integration/compile_commands.html.json and then feed that into CLion or something. We already have the case where you can't do, say, a buddybuild in your 'off'time because Platformio needs to download the 28'th copy of U8g2 or whatever. There are pretty clear lanes you just have to stay in while building this project oflline.

It's not pressing. I just didn't want to slide too much further back from here, so I'll appreciate your attention whenever this comes to the top of your personal queue.

Thanx, and enjoy your holiday travels!

On Tue, Dec 5, 2023 at 12:29 AM Keiran Hines @.***> wrote:

Hi Robert. I am travelling at the moment I probably won't get to it until the new year unless I get time in an airport. I will take a look when I can.

— Reply to this email directly, view it on GitHub https://github.com/PlummersSoftwareLLC/NightDriverStrip/issues/471#issuecomment-1840091341, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACCSD35CWMU34UT3H4CEZ63YH25NNAVCNFSM6AAAAAA6OHSUX6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNBQGA4TCMZUGE . You are receiving this because you modified the open/close state.Message ID: @.*** com>