[Bug 37824] New: Replace webpack with rspack for fun and profit
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37824 Bug ID: 37824 Summary: Replace webpack with rspack for fun and profit Change sponsored?: --- Product: Koha Version: Main Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Architecture, internals, and plumbing Assignee: koha-bugs@lists.koha-community.org Reporter: paul.derscheid@lmscloud.de QA Contact: testopia@bugs.koha-community.org Webpack is slow and nobody likes it. It gives us a lot of flexibility, though (for example in comparison to rollup, which is pretty great). Let's replace it with what's just reached v1 and is advertised as more or less a drop-in-replacement. Full Disclosure: rspack is a ByteDance project (MIT licensed, though). -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37824 Paul Derscheid <paul.derscheid@lmscloud.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- 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=37824 --- Comment #1 from Paul Derscheid <paul.derscheid@lmscloud.de> --- Created attachment 170992 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=170992&action=edit Bug 37824: Replace webpack with rspack for fun and profit I left the webpack.config.js as well as the devDependencies in place for now. We can remove them in a follow-up patch on this bug after testing it out. To test: 1) Run js:build and js:build:prod 2) Note the build time 3) Apply patch 4) Run yarn install 5) Run js:build and js:build:prod again 6) Note the much faster build time 7) Extra credit: take a look at the ERM or preservations module and make sure everything works as expected. 8) Extra credit: run the cypress tests. 9) Sign off or give your opinion -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37824 Paul Derscheid <paul.derscheid@lmscloud.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |paul.derscheid@lmscloud.de |ity.org | -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37824 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=37824 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> 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=37824 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #170992|0 |1 is obsolete| | --- Comment #2 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 171126 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=171126&action=edit Bug 37824: Replace webpack with rspack for fun and profit I left the webpack.config.js as well as the devDependencies in place for now. We can remove them in a follow-up patch on this bug after testing it out. To test: 1) Run js:build and js:build:prod 2) Note the build time 3) Apply patch 4) Run yarn install 5) Run js:build and js:build:prod again 6) Note the much faster build time 7) Extra credit: take a look at the ERM or preservations module and make sure everything works as expected. 8) Extra credit: run the cypress tests. 9) Sign off or give your opinion Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Looks faster to me. Where webpack failed for me (Killed, error 137), this passed. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37824 --- Comment #3 from Paul Derscheid <paul.derscheid@lmscloud.de> --- Concerning the production readiness of rspack, I'd just like to say that ByteDance themselves already use it in production. And I guess what works for a billion $ company should be stable enough for us? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37824 --- Comment #4 from Jonathan Druart <jonathan.druart@gmail.com> --- I don't have the time to test it right now but if it's faster and considered stable we should switch! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37824 --- Comment #5 from Paul Derscheid <paul.derscheid@lmscloud.de> --- There's a solid argument joubu made against mine: ByteDance as well as the big testemonials: - Microsoft - Amazon - Intuit - Discord have time and resources to adapt their codebases to changes in the build tool and we don't. However: they aim to reach as close to 100% compatibility as possible with webpack, which to me means that: - they can't do crazy stuff - we can always fallback onto webpack, it's not going anywhere. Therefore I think we can be a bit bleeding edge here ;) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37824 Paul Derscheid <paul.derscheid@lmscloud.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |37911 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37911 [Bug 37911] Prototype vue islands within static pages -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37824 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |martin.renvoize@ptfs-europe |y.org |.com CC| |martin.renvoize@ptfs-europe | |.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37824 --- Comment #6 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- I'll be taking this for a spin today. Now that I've researched the current state of these sorts of tools I'm happy for us to take the leap too. There's a clear back step should we need to take it, but the project itself does feel well regarded and supported so I don't predict we'll need to take such measures. Assuming I get the same results as prior testers, and I can't see why I wouldn't, 8 think this is well worthwhile and likely to pass today. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37824 --- Comment #7 from Paul Derscheid <paul.derscheid@lmscloud.de> --- Thanks for testing this Martin :) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37824 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #171126|0 |1 is obsolete| | --- Comment #8 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 171438 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=171438&action=edit Bug 37824: Replace webpack with rspack for fun and profit I left the webpack.config.js as well as the devDependencies in place for now. We can remove them in a follow-up patch on this bug after testing it out. To test: 1) Run js:build and js:build:prod 2) Note the build time 3) Apply patch 4) Run yarn install 5) Run js:build and js:build:prod again 6) Note the much faster build time 7) Extra credit: take a look at the ERM or preservations module and make sure everything works as expected. 8) Extra credit: run the cypress tests. 9) Sign off or give your opinion Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Looks faster to me. Where webpack failed for me (Killed, error 137), this passed. Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37824 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA --- Comment #9 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- I'm happy this is a solid improvement and worthwhile. All worked in testing very seamlessly. Passing QA Nice work Paul -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37824 --- Comment #10 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Just wondering: do we need to do anything to make sure the yarn build step is done on other ktd, Jenkins, sandboxes? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37824 --- Comment #11 from Paul Derscheid <paul.derscheid@lmscloud.de> --- Only of they directly call webpack which I hope is not the case. If everything is just yarn *:* and the node_modules is up-to-date, it will just work (and better than before imo). -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37824 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to main Version(s)| |24.11.00 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37824 --- Comment #12 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Pushed for 24.11! Well done everyone, thank you! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37824 --- Comment #13 from Jonathan Druart <jonathan.druart@gmail.com> --- Failure at ktd startup koha-1 | $ rspack build --mode development koha-1 | [rspack-cli] [Error: × Rspack FS Error: Error: EACCES: permission denied, open '/kohadevbox/koha/koha-tmpl/intranet-tmpl/prog/js/vue/dist/erm.js.map' koha-1 | │ koha-1 | ╰─▶ Error: EACCES: permission denied, open '/kohadevbox/koha/koha-tmpl/intranet-tmpl/prog/js/vue/dist/erm.js.map' -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37824 --- Comment #14 from Jonathan Druart <jonathan.druart@gmail.com> --- (In reply to Jonathan Druart from comment #13)
Failure at ktd startup
koha-1 | $ rspack build --mode development koha-1 | [rspack-cli] [Error: × Rspack FS Error: Error: EACCES: permission denied, open '/kohadevbox/koha/koha-tmpl/intranet-tmpl/prog/js/vue/dist/erm.js.map' koha-1 | │ koha-1 | ╰─▶ Error: EACCES: permission denied, open '/kohadevbox/koha/koha-tmpl/intranet-tmpl/prog/js/vue/dist/erm.js.map'
I chowned my whole repo and now ktd is starting correctly. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37824 --- Comment #15 from Jonathan Druart <jonathan.druart@gmail.com> --- Cypress tests failing since this change: % yarn cypress run --spec t/cypress/integration/ERM/Agreements_spec.ts 1) Agreement CRUD operations Delete agreement: Error: The following error originated from your application code, not from Cypress. It was caused by an unhandled promise rejection.
Cannot extend unknown button type: excelHtml5
When Cypress detects uncaught errors originating from your application it will automatically fail the current test. This behavior is configurable, and you can choose to turn this off by listening to the `uncaught:exception` event. https://on.cypress.io/uncaught-exception-from-application -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37824 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |additional_work_needed -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37824 --- Comment #16 from Paul Derscheid <paul.derscheid@lmscloud.de> --- Taking a look! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37824 --- Comment #17 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- We have another failing test here: t/Makefile.t I think we need to put the new config file in this list: https://git.koha-community.org/Koha-community/Koha/src/branch/main/Makefile.... -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37824 --- Comment #18 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 171552 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=171552&action=edit Bug 37824: (follow-up) Add rspack.config.js to Makefile.PL Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37824 --- Comment #19 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Follow-up for Makefile.PL 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=37824 --- Comment #20 from Paul Derscheid <paul.derscheid@lmscloud.de> --- Created attachment 171568 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=171568&action=edit Bug 37824: (QA follow-up) Fix improper handling of jQuery and DataTables libraries by marking them as externals This commit addresses an issue where jQuery and DataTables libraries (datatables.net and related extensions) were not functioning correctly when bundled with rspack. These libraries expect to be loaded in the global scope rather than as bundled modules, leading to initialization issues. To resolve this, jQuery and all related DataTables libraries (datatables.net, datatables.net-buttons, datatables.net-buttons/js/buttons.html5, etc.) are marked as externals in the rspack configuration. This ensures they are treated as global dependencies, preventing conflicts and allowing proper initialization. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37824 --- Comment #21 from Mason James <mtj@kohaaloha.com> --- Created attachment 171909 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=171909&action=edit Bug 37824: remove references to non-existent files in Makefile.PL to test... 0/ install debhelper tool 1/ run 'DEB_BUILD_OPTIONS=nocheck dh build', observe failure make: *** No rule to make target 'koha-tmpl/intranet-tmpl/prog/js/vue/dist/erm.js.LICENSE.txt', needed by 'pm_to_blib'. Stop. dh_auto_build: error: make -j1 returned exit code 2 2/ apply patch 3/ run 'DEB_BUILD_OPTIONS=nocheck dh build', observe success -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37824 Blou <philippe.blouin@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #171909|0 |1 is obsolete| | --- Comment #22 from Blou <philippe.blouin@inlibro.com> --- Created attachment 172113 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=172113&action=edit Bug 37824: remove references to non-existent files in Makefile.PL to test... 0/ install debhelper tool 1/ run 'DEB_BUILD_OPTIONS=nocheck dh build', observe failure make: *** No rule to make target 'koha-tmpl/intranet-tmpl/prog/js/vue/dist/erm.js.LICENSE.txt', needed by 'pm_to_blib'. Stop. dh_auto_build: error: make -j1 returned exit code 2 2/ apply patch 3/ run 'DEB_BUILD_OPTIONS=nocheck dh build', observe success Signed-off-by: Blou <blou@inlibro.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37824 Blou <philippe.blouin@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to main |Failed QA 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=37824 Blou <philippe.blouin@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Priority|P5 - low |P1 - high Status|Failed QA |Passed QA Patch complexity|--- |Trivial patch Severity|enhancement |critical --- Comment #23 from Blou <philippe.blouin@inlibro.com> --- Tested Mason's patch on the main, and it resolved the issue. This otherwise prevents all usage of main (including signoffs, etc..) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37824 --- Comment #24 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- (In reply to Blou from comment #23)
Tested Mason's patch on the main, and it resolved the issue.
This otherwise prevents all usage of main (including signoffs, etc..)
Pushed the follow-up to main. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37824 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- 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=37824 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |38167 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38167 [Bug 38167] ESLint: migrate config to flat format + cleanup some node dependencies -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37824 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords|additional_work_needed | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37824 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |lucas@bywatersolutions.com Version(s)|24.11.00 |24.11.00,24.05.06 released in| | Status|Pushed to main |Pushed to stable --- Comment #25 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- Backported to 24.05.x for 24.05.06 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37824 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to stable |Pushed to oldstable -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37824 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fridolin.somers@biblibre.co | |m --- Comment #26 from Fridolin Somers <fridolin.somers@biblibre.com> --- Does not apply easy on 23.11.x Looks like conflicts are easy to fix but is this safe for backport ? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37824 --- Comment #27 from Fridolin Somers <fridolin.somers@biblibre.com> --- @Paul after trying the rebase of yarn.lock is too difficult for me :( Please rovide patches for 23.11.x if you can. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37824 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |38770 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38770 [Bug 38770] Remove @vue/cli-service and babel -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37824 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |38999 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38999 [Bug 38999] Remove webpack config file -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37824 --- Comment #28 from Paul Derscheid <paul.derscheid@lmscloud.de> --- Hi Frido, just saw this. In this case it might be best just to overwrite yarn.lock by running `yarn install` again. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37824 --- Comment #29 from Paul Derscheid <paul.derscheid@lmscloud.de> --- Created attachment 177341 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=177341&action=edit Bug 37824: (QA follow-up) Remove webpack config, dependencies, uses We need to keep webpack itself to keep compatibility with vue-loader for now. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37824 Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Status|Pushed to oldstable |RESOLVED CC| |wainuiwitikapark@catalyst.n | |et.nz --- Comment #30 from Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz> --- Not backporting to 22.11 unless requested -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org