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: delete gen-webpack.node.config.js with theia clean command #12975

Merged
merged 1 commit into from
Oct 24, 2023

Conversation

ozfox
Copy link
Contributor

@ozfox ozfox commented Oct 3, 2023

What it does

Fixes #12974 by adding gen-webpack.node.config.js to the clean() method of ApplicationPackageManager.

How to test

  1. cd examples/browser
  2. yarn build
  3. yarn clean && ls -la
  4. Verify that gen-webpack.node.config.js
    • was not deleted (without this patch)
    • has been deleted (with this patch

Follow-ups

none

Review checklist

Reminder for reviewers

Signed-off-by: Leo Graf <leograf@posteo.de>
@msujew msujew added the theia-cli issues related to the theia-cli label Oct 3, 2023
Copy link
Member

@vince-fugnitto vince-fugnitto left a comment

Choose a reason for hiding this comment

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

@ozfox thank you for the contribution, I can confirm that it works as expected:

electron before:

drwxr-xr-x 6 foobar 4096 Oct  5 13:09 .
drwxr-xr-x 7 foobar 4096 Jun 21 15:22 ..
-rw-r--r-- 1 foobar  230 Oct 19  2022 .eslintrc.js
-rw-r--r-- 1 foobar 8495 Oct  5 13:09 gen-webpack.config.js
-rw-r--r-- 1 foobar 4372 Oct  5 13:09 gen-webpack.node.config.js
drwxr-xr-x 7 foobar 4096 Oct  5 13:09 lib
drwxr-xr-x 3 foobar 4096 Oct  5 13:04 node_modules
-rw-r--r-- 1 foobar 2956 Oct  5 13:08 package.json
drwxr-xr-x 4 foobar 4096 Oct  5 13:09 src-gen
drwxr-xr-x 2 foobar 4096 Jun 21 15:22 test
-rw-r--r-- 1 foobar 2577 Sep 28 10:13 tsconfig.json
-rw-r--r-- 1 foobar  640 Jun 21 15:22 webpack.config.js

electron after clean:

drwxr-xr-x 4 foobar 4096 Oct  5 13:15 .
drwxr-xr-x 7 foobar 4096 Jun 21 15:22 ..
-rw-r--r-- 1 foobar  230 Oct 19  2022 .eslintrc.js
drwxr-xr-x 3 foobar 4096 Oct  5 13:04 node_modules
-rw-r--r-- 1 foobar 2956 Oct  5 13:08 package.json
drwxr-xr-x 2 foobar 4096 Jun 21 15:22 test
-rw-r--r-- 1 foobar 2577 Sep 28 10:13 tsconfig.json
-rw-r--r-- 1 foobar  640 Jun 21 15:22 webpack.config.js

browser before:

drwxr-xr-x 5 foobar 4096 Oct  5 13:16 .
drwxr-xr-x 7 foobar 4096 Jun 21 15:22 ..
-rw-r--r-- 1 foobar 8043 Oct  5 13:16 gen-webpack.config.js
-rw-r--r-- 1 foobar 4239 Oct  5 13:16 gen-webpack.node.config.js
drwxr-xr-x 6 foobar 4096 Oct  5 13:17 lib
drwxr-xr-x 3 foobar 4096 Oct  5 13:04 node_modules
-rw-r--r-- 1 foobar 3094 Oct  4 14:28 package.json
drwxr-xr-x 4 foobar 4096 Oct  5 13:16 src-gen
-rw-r--r-- 1 foobar 2587 Sep 29 12:05 tsconfig.json
-rw-r--r-- 1 foobar  645 Jun 21 15:22 webpack.config.js

browser after clean:

drwxr-xr-x 3 foobar 4096 Oct  5 13:18 .
drwxr-xr-x 7 foobar 4096 Jun 21 15:22 ..
drwxr-xr-x 3 foobar 4096 Oct  5 13:04 node_modules
-rw-r--r-- 1 foobar 3094 Oct  4 14:28 package.json
-rw-r--r-- 1 foobar 2587 Sep 29 12:05 tsconfig.json
-rw-r--r-- 1 foobar  645 Jun 21 15:22 webpack.config.js

@bryanchenmchp
Copy link
Contributor

theia clean also doen't remove webpack.config.js, would it be possible to add that change to this PR?

@msujew
Copy link
Member

msujew commented Oct 17, 2023

@bryanchenmchp The webpack.config.js file is supposed to be used to create adopter defined overrides of the build process. Deleting that file would also delete any adopter modifications. That is not intended.

@msujew msujew merged commit 41c17dd into eclipse-theia:master Oct 24, 2023
@vince-fugnitto vince-fugnitto added this to the 1.43.0 milestone Oct 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
theia-cli issues related to the theia-cli
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Command theia clean doesn't remove gen-webpack.node.config.js
4 participants