-
Notifications
You must be signed in to change notification settings - Fork 175
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: enforce extraModules to be a set of strings #888
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #888 +/- ##
==========================================
+ Coverage 76.30% 76.47% +0.17%
==========================================
Files 21 21
Lines 726 727 +1
Branches 136 136
==========================================
+ Hits 554 556 +2
Misses 121 121
+ Partials 51 50 -1 ☔ View full report in Codecov by Sentry. |
For some reason TypeScript is AOK with stuffing `Set` objects with random keys. This is problematic as this is not how `Set` are supposed to be used (like a plain JavaScript object map). Fix the logic to respect the `-w/--which-module` CLI argument.
1acdf85
to
e0ba692
Compare
@malept ping. The |
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.
Code LGTM. Approved, but I'll hold off merging since @malept was pinged in case he wants to review.
@paul-marechal please ping me if nothing happens in a week 😸
@ckerr ping :) |
Can the added unit tests not cause modules to be rebuilt? Trying not to increase the test time when possible. |
@malept I am not familiar with how |
2bd9762
to
1840641
Compare
See electron/rebuild#888 The way we invoke `electron-rebuild` should allow Theia application developers to run `theia rebuild:*` from the root of their monorepos, but because of a bug in `electron-rebuild` it will only build dependencies listed in the `package.json` file located in `cwd`. Implement a workaround that modifies or creates a `package.json` file to list the dependencies to rebuild. Add exit hooks to cleanup in case users do `Ctrl+C` while theia rebuild is running so that we don't pollute user workspaces.
See electron/rebuild#888 The way we invoke `electron-rebuild` should allow Theia application developers to run `theia rebuild:*` from the root of their monorepos, but because of a bug in `electron-rebuild` it will only build dependencies listed in the `package.json` file located in `cwd`. Implement a workaround that modifies or creates a `package.json` file to list the dependencies to rebuild. Add exit hooks to cleanup in case users do `Ctrl+C` while theia rebuild is running so that we don't pollute user workspaces.
See electron/rebuild#888 The way we invoke `electron-rebuild` should allow Theia application developers to run `theia rebuild:*` from the root of their monorepos, but because of a bug in `electron-rebuild` it will only build dependencies listed in the `package.json` file located in `cwd`. Implement a workaround that modifies or creates a `package.json` file to list the dependencies to rebuild. Add exit hooks to cleanup in case users do `Ctrl+C` while theia rebuild is running so that we don't pollute user workspaces.
See electron/rebuild#888 The way we invoke `electron-rebuild` should allow Theia application developers to run `theia rebuild:*` from the root of their monorepos, but because of a bug in `electron-rebuild` it will only build dependencies listed in the `package.json` file located in `cwd`. Implement a workaround that modifies or creates a `package.json` file to list the dependencies to rebuild. Add exit hooks to cleanup in case users do `Ctrl+C` while theia rebuild is running so that we don't pollute user workspaces.
* workaround electron-rebuild bug See electron/rebuild#888 The way we invoke `electron-rebuild` should allow Theia application developers to run `theia rebuild:*` from the root of their monorepos, but because of a bug in `electron-rebuild` it will only build dependencies listed in the `package.json` file located in `cwd`. Implement a workaround that modifies or creates a `package.json` file to list the dependencies to rebuild. Add exit hooks to cleanup in case users do `Ctrl+C` while theia rebuild is running so that we don't pollute user workspaces.
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.
It seems to me like there should be a better way to test this. I need to think about it.
Also I'm not thrilled at the idea that a test has been modified, rather than adding a separate test.
@malept I did it this way because of the above comment, I thought the new test I had added was causing issues... edit: See the commit where I removed the extra tests. With the current way, it won't build (many) more packages than what it used to before, keeping the test run time low. Moreover the specific test modified is specifically trying to rebuild packages that aren't part of dependencies, so this hackish way of modifying the package.json just for this case seemed reasonable to me. If the test is that problematic I can always remove it :) The previous lookup logic was broken without a doubt, and the fix in this PR is trivial. |
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.
Your last commit looks good to me! Thanks for helping with this, I didn't feel familiar enough with the internals to do what you did.
@malept should I do anything? |
@malept any update? |
ping. |
Hello, is this thing on? The PR has been open for 2.5 years and approved for half a year. Can we get a decision, please? |
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.
Looks like all feedback was addressed, so this should be good to land
🎉 This PR is included in version 3.7.1 🎉 The release is available on: Your semantic-release bot 📦🚀 |
For some reason TypeScript is AOK with stuffing
Set
objects withrandom keys. This is problematic as this is not how
Set
are supposedto be used (like a plain JavaScript object map).
Fix the logic to respect the
-w/--which-module
CLI argument.