Fix circular import issues from lack of type-based imports.

Review Request #13944 — Created June 5, 2024 and submitted

Information

Ink
master

Reviewers

We had some circular imports in the build that were due to modules
referencing up to a parent module in order to get a type. Many of these
should arguably not be circular imports, but nonetheless, Rollup was
complaining.

We now consistently import using type ... wherever appropriate, rather
than importing everything normally. This helps Rollup handle the
references correctly.

There are still some legitimate circular imports between core/craft ->
core/paint -> core/craft, which is harder to solve. This isn't
preventing builds, just generating some major complaints in Rollup.

Compared the new builds vs. the old ones, and verified that there were
no actual changes in the built JavaScript, which is what we'd hope for
here.

Unit tests pass.

Summary ID
Fix circular import issues from lack of type-based imports.
We had some circular imports in the build that were due to modules referencing up to a parent module in order to get a type. Many of these should arguably not be circular imports, but nonetheless, Rollup was complaining. We now consistently import using `type ...` wherever appropriate, rather than importing everything normally. This helps Rollup handle the references correctly. There are still some legitimate circular imports between `core/craft` -> `core/paint` -> `core/craft`, which is harder to solve. This isn't preventing builds, just generating some major complaints in Rollup.
7fd448b8dfc5fbfae96bb3bae6341887c555f772
david
  1. Ship It!
  2. 
      
chipx86
Review request changed
Status:
Completed
Change Summary:
Pushed to master (ee914f6)