[Bug 40773] New: Improve build of "vue/dist" files
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40773 Bug ID: 40773 Summary: Improve build of "vue/dist" files Change sponsored?: --- Product: Koha Version: Main Hardware: All OS: All Status: NEW Severity: minor Priority: P5 - low Component: Architecture, internals, and plumbing Assignee: koha-bugs@lists.koha-community.org Reporter: dcook@prosentient.com.au QA Contact: testopia@bugs.koha-community.org I've been thinking how the "rm -rf koha-tmpl/intranet-tmpl/prog/js/vue/dist/*" step discussed in "Bug 37911 - Prototype vue islands within static pages" for a build from a git working directory isn't intuitive or easy to know about. I've also heard of stories where people building from git repos are still getting files included even though they've run "rm -rf koha-tmpl/intranet-tmpl/prog/js/vue/dist/*". This should be impossible, so there's probably something else going on there, but I think I have a solution which removes the necessity for this step anyway. (Note that for Debian package installs and regular tarball installs, the step isn't needed at all, because the tarballs are generating using "git archive" which doesn't include "vue/dist" files.) Anyway, the solution is to tell Makefile.PL specifically not to include "koha-tmpl/intranet-tmpl/prog/js/vue/dist/*" in the "$file_map" data structure. That way, it should be impossible for these files to wind up in the "blib" except where we copy them in via the "move_compiled_js" target from bug 39849 -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40773 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |37911, 39849 Assignee|koha-bugs@lists.koha-commun |dcook@prosentient.com.au |ity.org | Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37911 [Bug 37911] Prototype vue islands within static pages https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39849 [Bug 39849] Target dependency issue in Makefile -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40773 --- Comment #1 from David Cook <dcook@prosentient.com.au> --- Created attachment 186271 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=186271&action=edit Bug 40773: Do not map "vue/dist" files in Makefile This change ensures that "vue/dist" files are not mapped into the pm_to_blib target of the Makefile, so that they are only handled by the explicit compile steps in the top targets of the Makefile. Test plan: 0. Apply the patch 1. perl build-resources.PL 2. ls ./koha-tmpl/intranet-tmpl/prog/js/vue/dist 3. Note that files are present 4. perl Makefile.PL 5. Take all the defaults 6. vi Makefile 7. Search for vue\/dist 8. Note that the only hit is for "cp -r koha-tmpl/intranet-tmpl/prog/js/vue/dist blib/INTRANET_TMPL_DIR/prog/js/vue/" -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40773 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40773 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |philippe.blouin@inlibro.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40773 --- Comment #2 from David Cook <dcook@prosentient.com.au> --- Note that anything in "koha-tmpl/intranet-tmpl/prog/js/vue/dist/" will be copied across into the "blib". I wonder if rspack.config.js or something else should have a step that ensures that "koha-tmpl/intranet-tmpl/prog/js/vue/dist/" is empty before doing a build? I suppose build-resources.PL could also do that. Anyway, I'd say that's a bit of a side issue really. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40773 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@gmail.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40773 Paul Derscheid <paul.derscheid@lmscloud.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40773 Paul Derscheid <paul.derscheid@lmscloud.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #186271|0 |1 is obsolete| | --- Comment #3 from Paul Derscheid <paul.derscheid@lmscloud.de> --- Created attachment 186279 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=186279&action=edit Bug 40773: Do not map "vue/dist" files in Makefile This change ensures that "vue/dist" files are not mapped into the pm_to_blib target of the Makefile, so that they are only handled by the explicit compile steps in the top targets of the Makefile. Test plan: 0. Apply the patch 1. perl build-resources.PL 2. ls ./koha-tmpl/intranet-tmpl/prog/js/vue/dist 3. Note that files are present 4. perl Makefile.PL 5. Take all the defaults 6. vi Makefile 7. Search for vue\/dist 8. Note that the only hit is for "cp -r koha-tmpl/intranet-tmpl/prog/js/vue/dist blib/INTRANET_TMPL_DIR/prog/js/vue/" Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40773 Paul Derscheid <paul.derscheid@lmscloud.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |paul.derscheid@lmscloud.de --- Comment #4 from Paul Derscheid <paul.derscheid@lmscloud.de> --- Hi David, great change. Thanks. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40773 --- Comment #5 from Paul Derscheid <paul.derscheid@lmscloud.de> --- Btw, there's a webpack/rspack option: output: { ... clean: true, } that does exactly that. But we should probably work on the structure beforehand. This should be configured for prod, not for dev where you might want to keep old assets. Meaning should be a follow-up, out of scope for this bug. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40773 --- Comment #6 from Paul Derscheid <paul.derscheid@lmscloud.de> --- For reference: https://rspack.rs/config/output#outputclean -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40773 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40773 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #186279|0 |1 is obsolete| | --- Comment #7 from Jonathan Druart <jonathan.druart@gmail.com> --- Created attachment 186281 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=186281&action=edit Bug 40773: Do not map "vue/dist" files in Makefile This change ensures that "vue/dist" files are not mapped into the pm_to_blib target of the Makefile, so that they are only handled by the explicit compile steps in the top targets of the Makefile. Test plan: 0. Apply the patch 1. perl build-resources.PL 2. ls ./koha-tmpl/intranet-tmpl/prog/js/vue/dist 3. Note that files are present 4. perl Makefile.PL 5. Take all the defaults 6. vi Makefile 7. Search for vue\/dist 8. Note that the only hit is for "cp -r koha-tmpl/intranet-tmpl/prog/js/vue/dist blib/INTRANET_TMPL_DIR/prog/js/vue/" Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40773 --- Comment #8 from David Cook <dcook@prosentient.com.au> --- (In reply to Paul Derscheid from comment #5)
Btw, there's a webpack/rspack option: output: { ... clean: true, } that does exactly that.
But we should probably work on the structure beforehand. This should be configured for prod, not for dev where you might want to keep old assets. Meaning should be a follow-up, out of scope for this bug.
I had a feeling that you'd know what to do! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40773 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |25.11.00 released in| | Status|Passed QA |Pushed to main -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40773 --- Comment #9 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- Nice work everyone! Pushed to main for 25.11 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40773 Paul Derscheid <paul.derscheid@lmscloud.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)|25.11.00 |25.11.00,25.05.04 released in| | Status|Pushed to main |Pushed to stable -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40773 --- Comment #10 from Paul Derscheid <paul.derscheid@lmscloud.de> --- Nice work everyone! Pushed to 25.05.x -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40773 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to stable |Needs documenting CC| |fridolin.somers@biblibre.co | |m --- Comment #11 from Fridolin Somers <fridolin.somers@biblibre.com> --- Depends on Bug 37911 not in 24.11.x -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40773 Bug 40773 depends on bug 37911, which changed state. Bug 37911 Summary: Prototype vue islands within static pages https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37911 What |Removed |Added ---------------------------------------------------------------------------- Status|Needs documenting |RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40773 Bug 40773 depends on bug 39849, which changed state. Bug 39849 Summary: Target dependency issue in Makefile https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39849 What |Removed |Added ---------------------------------------------------------------------------- Status|Needs documenting |RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40773 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |david@davidnind.com Resolution|--- |FIXED Status|Needs documenting |RESOLVED --- Comment #12 from David Nind <david@davidnind.com> --- No update required to the manual. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org