Skip to content
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

fix(build): enable hot reloading of linked packages #16867

Merged
merged 1 commit into from
Sep 28, 2021

Conversation

villebro
Copy link
Member

@villebro villebro commented Sep 28, 2021

SUMMARY

The recent upgrade of Webpack to version 5 (#16701) broke hot reloading of linked packages. This fixes hot reloading by enabling the config.watchOptions.followSymlinks flag (https://webpack.js.org/configuration/watch/#watchoptionsfollowsymlinks) . Enabling config.resolve.symlinks doesn't work, as it breaks a bunch of dependencies. We also ignore a few type errors that are raised when linking superset-ui/core. It is unclear why this error is raised when npm linking, but appears to be happening due to fairly complex polymorphism in the registry classes.

TESTING INSTRUCTIONS

  1. npm ci
  2. Link core and chart-controls and a chart plugin, e.g. npm link ../../superset-ui/packages/superset-ui-core ../../superset-ui/packages/superset-ui-chart-controls ../../superset-ui/plugins/plugin-chart-echarts
  3. npm run dev-server

ADDITIONAL INFORMATION

  • Has associated issue:
  • Required feature flags:
  • Changes UI
  • Includes DB Migration (follow approval process in SIP-59)
    • Migration is atomic, supports rollback & is backwards-compatible
    • Confirm DB migration upgrade and downgrade tested
    • Runtime estimates and downtime expectations provided
  • Introduces new feature or API
  • Removes existing feature or API

@codecov
Copy link

codecov bot commented Sep 28, 2021

Codecov Report

Merging #16867 (643b0d4) into master (27a40d2) will not change coverage.
The diff coverage is n/a.

❗ Current head 643b0d4 differs from pull request most recent head c40e73c. Consider uploading reports for the commit c40e73c to get more accurate results
Impacted file tree graph

@@           Coverage Diff           @@
##           master   #16867   +/-   ##
=======================================
  Coverage   77.05%   77.05%           
=======================================
  Files        1021     1021           
  Lines       54693    54693           
  Branches     7457     7457           
=======================================
  Hits        42141    42141           
  Misses      12307    12307           
  Partials      245      245           
Flag Coverage Δ
javascript 71.19% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
superset-frontend/src/setup/setupColors.ts 100.00% <ø> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 27a40d2...c40e73c. Read the comment docs.

@stephenLYZ
Copy link
Member

LGTM! Thanks for the fix!

Copy link
Member

@zhaoyongjie zhaoyongjie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, Thanks for the fix!

@villebro villebro merged commit 9ac55d9 into apache:master Sep 28, 2021
@villebro villebro deleted the villebro/webpack-hmr branch September 28, 2021 14:21
opus-42 pushed a commit to opus-42/incubator-superset that referenced this pull request Nov 14, 2021
QAlexBall pushed a commit to QAlexBall/superset that referenced this pull request Dec 28, 2021
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 1.4.0 labels Mar 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels preset-io size/XS 🚢 1.4.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants