You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2021/10/04 15:44:59 UTC

[GitHub] [superset] villebro opened a new pull request #16958: fix(build): make npm linking work pt. 2

villebro opened a new pull request #16958:
URL: https://github.com/apache/superset/pull/16958


   ### SUMMARY
   
   The recent upgrade to Webpack 5 broke npm linking. While #16867 added watching for changed files, it still didn't update the browser with the new assets. This switches from using `watchOptions.followSymlinks` to the more conventional `config.symlinks` setting, and adds an alias for `react` to point to the one pulled in by the Superset application.
   
   ### TESTING INSTRUCTIONS
   1. npm link a `superset-ui` package/plugin
   2. make code changes to the package/plugin
   3. watch the command line triccker the rebuild and the code changes reflected in the browser
   
   ### ADDITIONAL INFORMATION
   <!--- Check any relevant boxes with "x" -->
   <!--- HINT: Include "Fixes #nnn" if you are fixing an existing issue -->
   - [ ] Has associated issue:
   - [ ] Required feature flags:
   - [ ] Changes UI
   - [ ] Includes DB Migration (follow approval process in [SIP-59](https://github.com/apache/superset/issues/13351))
     - [ ] 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
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] kgabryje commented on a change in pull request #16958: fix(build): make npm linking work pt. 2

Posted by GitBox <gi...@apache.org>.
kgabryje commented on a change in pull request #16958:
URL: https://github.com/apache/superset/pull/16958#discussion_r721531290



##########
File path: superset-frontend/webpack.config.js
##########
@@ -289,9 +289,10 @@ const config = {
         APP_DIR,
         './node_modules/@superset-ui/chart-controls',
       ),
+      react: path.resolve('./node_modules/react'),

Review comment:
       Huh, then it's rather strange that it requires resolving




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] villebro commented on a change in pull request #16958: fix(build): make npm linking work pt. 2

Posted by GitBox <gi...@apache.org>.
villebro commented on a change in pull request #16958:
URL: https://github.com/apache/superset/pull/16958#discussion_r721496805



##########
File path: superset-frontend/webpack.config.js
##########
@@ -289,9 +289,10 @@ const config = {
         APP_DIR,
         './node_modules/@superset-ui/chart-controls',
       ),
+      react: path.resolve('./node_modules/react'),

Review comment:
       It apparently already is:
   ![image](https://user-images.githubusercontent.com/33317356/135883184-a4a4b1ab-d3e3-4e30-a5b2-62c241e616e7.png)
   




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] kgabryje commented on a change in pull request #16958: fix(build): make npm linking work pt. 2

Posted by GitBox <gi...@apache.org>.
kgabryje commented on a change in pull request #16958:
URL: https://github.com/apache/superset/pull/16958#discussion_r721496618



##########
File path: superset-frontend/webpack.config.js
##########
@@ -289,9 +289,10 @@ const config = {
         APP_DIR,
         './node_modules/@superset-ui/chart-controls',
       ),
+      react: path.resolve('./node_modules/react'),
     },
     extensions: ['.ts', '.tsx', '.js', '.jsx', '.yml'],
-    symlinks: false,
+    symlinks: true,

Review comment:
       We can remove that line, `symlinks: true` is the default




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] kgabryje commented on a change in pull request #16958: fix(build): make npm linking work pt. 2

Posted by GitBox <gi...@apache.org>.
kgabryje commented on a change in pull request #16958:
URL: https://github.com/apache/superset/pull/16958#discussion_r721494332



##########
File path: superset-frontend/webpack.config.js
##########
@@ -289,9 +289,10 @@ const config = {
         APP_DIR,
         './node_modules/@superset-ui/chart-controls',
       ),
+      react: path.resolve('./node_modules/react'),

Review comment:
       Perhaps we should have react as peer dep in superset-ui then?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] villebro merged pull request #16958: fix(build): make npm linking work pt. 2

Posted by GitBox <gi...@apache.org>.
villebro merged pull request #16958:
URL: https://github.com/apache/superset/pull/16958


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] villebro commented on a change in pull request #16958: fix(build): make npm linking work pt. 2

Posted by GitBox <gi...@apache.org>.
villebro commented on a change in pull request #16958:
URL: https://github.com/apache/superset/pull/16958#discussion_r721496805



##########
File path: superset-frontend/webpack.config.js
##########
@@ -289,9 +289,10 @@ const config = {
         APP_DIR,
         './node_modules/@superset-ui/chart-controls',
       ),
+      react: path.resolve('./node_modules/react'),

Review comment:
       It apparently already is (`superset-ui/core`):
   ![image](https://user-images.githubusercontent.com/33317356/135883184-a4a4b1ab-d3e3-4e30-a5b2-62c241e616e7.png)
   




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] villebro commented on a change in pull request #16958: fix(build): make npm linking work pt. 2

Posted by GitBox <gi...@apache.org>.
villebro commented on a change in pull request #16958:
URL: https://github.com/apache/superset/pull/16958#discussion_r721495726



##########
File path: superset-frontend/webpack.config.js
##########
@@ -289,9 +289,10 @@ const config = {
         APP_DIR,
         './node_modules/@superset-ui/chart-controls',
       ),
+      react: path.resolve('./node_modules/react'),

Review comment:
       Hmm, that's a very good point. Let me try that.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org