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

Circular imports error between dialogs and widgets files #14347

Closed
ranndev opened this issue Oct 23, 2024 · 2 comments · Fixed by #14352
Closed

Circular imports error between dialogs and widgets files #14347

ranndev opened this issue Oct 23, 2024 · 2 comments · Fixed by #14352
Labels
bug bugs found in the application
Milestone

Comments

@ranndev
Copy link

ranndev commented Oct 23, 2024

Bug Description:

After upgrading from 1.52 to 1.54 some of our unit tests that import the ReactDialog started failing with TypeError: Class extends value undefined is not a constructor or null caused by a circular imports.

To Reproduce:

Create a unit test that will import the ReactDialog and run it:
Screenshot 2024-10-22 at 4 29 26 PM

Upon investigation, the ReactDialog imported the AbstractDialog. However, before the dialogs.ts defines the AbstractDialog, it needs to resolve the import from './widgets/index.ts' which imports packages/core/src/browser/widgets/split-widget.ts -> packages/core/src/browser/saveable.ts which requires the AbstractDialog too.

This can be fixed by changing the widgets import path in the dialogs.ts to './widgets/widget' where the types and methods are exactly located.

Additional Information

  • Operating System: MacOS
  • Theia Version: 1.54
@msujew
Copy link
Member

msujew commented Oct 23, 2024

Hey @ranndev,

thanks for looking into this. Do you mind providing a PR to fix this?

@msujew msujew added the bug bugs found in the application label Oct 23, 2024
@ranndev
Copy link
Author

ranndev commented Oct 24, 2024

@msujew I'll create a PR for this.

rannp-toro-cloud added a commit to rannp-toro-cloud/theia that referenced this issue Oct 25, 2024
Fixes eclipse-theia#14347

Contributed on behalf of Toro Cloud

Signed-off-by: Rannie Peralta <[email protected]>
tsmaeder pushed a commit that referenced this issue Oct 30, 2024
Fixes #14347

Contributed on behalf of Toro Cloud

Signed-off-by: Rannie Peralta <[email protected]>
@jfaltermeier jfaltermeier added this to the 1.55.0 milestone Oct 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug bugs found in the application
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants