[Koha-bugs] [Bug 32609] Remove compiled files from src

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Wed Feb 1 03:02:13 CET 2023


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32609

--- Comment #34 from David Cook <dcook at prosentient.com.au> ---
(In reply to Jonathan Druart from comment #31)
> I have one concern about the `yarn install` step. At some point we want to
> freeze the node_modules directory, or we may get expected regressions at a
> very bad time.
> Imagine we are testing a beta version D-15 before the release, everything is
> working great, we decide to release on D-day, package maintainer releases
> using `yarn install && yarn build:prod`. If something changed in the node
> modules, we haven't tested it and we release a broken version.

If we use "yarn install --frozen-lockfile" when running via Makefile.PL, that
should avoid that scenario. We'd be using only the versions from yarn.lock that
hypothetically were tested.

That said, testing will be interesting. I suppose you'll get generated files at
ktd startup time, and those should be OK until you change branches. At that
point, you might have the wrong generated files and not know it. 

When it comes to local dev/test, we might need to just get into the habit of
being mindful of doing yarn install/build when we switch branches (if
required).

Sandboxes shouldn't be a problem since we could automate the file
re-generation...

> It's tricky and I don't have a solution right now, but we need to:
> * Let developers yarn install whenever they want
> (/kohadevbox/koha/node_modules will be used/tested)
> * Have a generated (when?) version (/kohadevbox/node_modules) that would be
> used to generate the compiled files on ktd startup (sandboxes and devs). We
> could run build:prod to avoid last minute bugs to popup.
> * Pick the last generated version for the release

I suppose test/QA theoretically should catch if there's a problem with
generated files. So the "last generated version for the release" will just be
what's in the package.json and yarn.lock files. 

Maybe we're overthinking it a bit?

Although I think changing "yarn install" to "yarn install --frozen-lockfile"
sounds necessary for sure.

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list