-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Move from Webpack to Esbuild #18447
Move from Webpack to Esbuild #18447
Conversation
3c8148d
to
c0dccb9
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! I'm excited to see some progress here. Happy to help with the Debian copyright generation etc.
This comment was marked as resolved.
This comment was marked as resolved.
4b2f9cd
to
9712875
Compare
f62652e
to
6a6d298
Compare
Yay, there's a new esbuild: https://github.com/evanw/esbuild/releases/tag/v0.17.13 I confirmed that wasm can now build this just fine, without the mega-commit 6a6d298 (saving the link here in case we need it again) @KKoukiou : I squashed this again, as it needed a force-push anyway. Looks much cleaner now! |
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
all the rest pixel tests failures from This run don't look like regressions, rather are expected changes because of the breakpoints redefinition approach change. |
This comment was marked as outdated.
This comment was marked as outdated.
053b612
to
f92ea3c
Compare
I implemented a proper watch mode like in cockpit-project/cockpit-podman#1243 . Pushing it as a separate commit for review and history, but I'll squash it now, update pixel tests, and drop no-test. This will be the first push which has a chance to actually land. |
This comment was marked as resolved.
This comment was marked as resolved.
The Python bridge stitches these files together with manifests.js. But esbuild does not auto-terminate the chunks with semicolons, so the call ended up as `cockpit.locale(...)cockpit.locale(...)`, which is invalid. Ensure to always terminate the cockpit.locale() call to fix that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I went through this again with my reviewer goggles on, and found a few small cleanups. But before I push again, I want to see a fully green test set.
tests: [ | ||
"base1/test-base64", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Follow-up: Replace with a glob.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.. except that node.js does not have an API for globbing, meh..
We don't need the `$ESLINT`/`$STYLELINT` env variables any more to coordinate between build.js and webpack-config.js, as everything is in build.js now. Update HACKING.md accordingly. Implement our own watch mode due to the deficiencies of esbuild's [1]. This is similar to podman's [2], but with recursive watching. Because the approach for redefining breakpoints changed, update pixel tests for the spacing noise. Co-Authored-By: Martin Pitt <mpitt@redhat.com> Fixes cockpit-project#17629 [1] evanw/esbuild#1204 (comment) [2] cockpit-project/cockpit-podman#1243
Patternfly-react is in freeze right now, essentially till June when v5 is first released. This is a super hacky work around - but better than having UI regressions. This can be undone once patternfly with patternfly/patternfly-react#8864 is released.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
".sh": "text", | ||
}, | ||
}; | ||
|
||
const parser = (await import('argparse')).default.ArgumentParser(); | ||
parser.add_argument('-c', '--config', { help: "Path to webpack.config.js", default: "webpack.config.js" }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oops this option can now be dropped.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's wait for @mvollmer 's review, as this is otherwise green, and rather "expensive" (pixel tests, node_modules rebuild). I want to do a follow-up anyway to simplify tests
in files.js, happy to clean it up then. Of course, when Marius finds other issues, we can fix this right away.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in #18565
Dependencies:
TODO:
!!! -> LICENSE
debugging leftover in tools/build-debian-copyright , then it looks fine{ES,STYLE}LINT
env varsmkdirPlugin
hack