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

[localize] Move setup code to own file to resolve import loop #4679

Merged
merged 2 commits into from
Jun 24, 2024

Conversation

codingjoe
Copy link
Contributor

@codingjoe codingjoe commented Jun 22, 2024

Localize has an import loop because submodules are importing from their root. To resolve the loop, msg, installed and _installMsgImplementation are moved to a new submodule.

Imports to msg remain intact, through an explicit export.

Copy link

changeset-bot bot commented Jun 22, 2024

🦋 Changeset detected

Latest commit: 0cc69a0

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@lit/localize Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@codingjoe codingjoe changed the title Fixes #4655 -- Move import localize setup functions Fixes #4655 -- Move localize setup to resolve import loop Jun 22, 2024
Localize has an import loop, because submodules are importing
from their root. To resolve this `msg`, `installed` and `_installMsgImplementation`
have moved to a new submodule.

Imports to `msg` stay intact, through an explicit export.
@codingjoe codingjoe marked this pull request as ready for review June 22, 2024 15:17
@augustjk augustjk linked an issue Jun 24, 2024 that may be closed by this pull request
Copy link
Member

@augustjk augustjk left a comment

Choose a reason for hiding this comment

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

This is great, thank you!

@augustjk augustjk changed the title Fixes #4655 -- Move localize setup to resolve import loop [localize] Move setup code to own file to resolve import loop Jun 24, 2024
@augustjk augustjk merged commit eb84beb into lit:main Jun 24, 2024
7 checks passed
justinfagnani pushed a commit that referenced this pull request Jun 24, 2024
* Fixes #4655 -- Move localize setup to resolve import loop

Localize has an import loop, because submodules are importing
from their root. To resolve this `msg`, `installed` and `_installMsgImplementation`
have moved to a new submodule.

Imports to `msg` stay intact, through an explicit export.
@lit-robot lit-robot mentioned this pull request Jul 31, 2024
@codingjoe codingjoe deleted the issues/4655/import-loop branch August 7, 2024 14:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Import loop in @lit/localize
2 participants