newspeaklanguage / newspeak

Newspeak is a live object-capability language in the Smalltalk tradition
https://newspeaklanguage.org/
Other
132 stars 11 forks source link

TL;DR: This commit fixes the failure of the Newspeak service worker (sw.js) to update its caches. See description for (much more) details. #124

Closed mzimmerm closed 8 months ago

mzimmerm commented 8 months ago

Motivation for change:

Service worker lifecycle - summary

Changes in more detail:

mzimmerm commented 8 months ago

Gilad, one comment inline

On Sat, Dec 23, 2023 at 6:11 PM Gilad Bracha @.***> wrote:

@.**** commented on this pull request.

In build.sh https://github.com/newspeaklanguage/newspeak/pull/124#discussion_r1435733318 :

@@ -11,6 +11,20 @@ pushd ../primordialsoup ./build os=emscripten arch=wasm popd

+# Back in 'newspeak'. +# Increase the pwaVersion in the PWA service worker, the newspeak/platforms/webIDE/sw.js +# This is required on every Newspeak build (strictly speaking, +# only on every Newspeak deployment to HTTP server), for the PWA clients +# to refresh all caches. +# Without the pwaVersion increase, PWA clients would not replace +# the cached HopscotchWebIDE.vfuel with the new version, +# unless forced by manual cache clean or similar + +. ./increase-pwa-version.sh

why is this ../increase-pwa-version.sh and not ./increase-pwa-version.sh?

I thought for sure the README.md recommended running the build.sh sourced as '. ./build.sh' .. although I am not able to find that now.

So I just followed the assumption and sourced the script as well: '. ./increase-pwa-version.sh'. I can make the script executable and execute it instead of source-ing it, although I would have to make a minor change: I took the opportunity it is sourced and slipped a return there in one branch, which would only work as sourced (although that branch is unlikely to run anyway, it is a ).

Let me know if you prefer to change the source-ing to executing.

Milan

— Reply to this email directly, view it on GitHub https://github.com/newspeaklanguage/newspeak/pull/124#pullrequestreview-1795505862, or unsubscribe https://github.com/notifications/unsubscribe-auth/AALGQ7GVUL4O6NZYSE7UBE3YK5QKBAVCNFSM6AAAAABBATWUF6VHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMYTOOJVGUYDKOBWGI . You are receiving this because you authored the thread.Message ID: @.***>

gbracha commented 8 months ago

I think this is fine.