software-mansion / software-mansion/TypeGPU

chore: `typegpu/common` should not import library internals

Open
#2,985 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
3.2k
Forks
122
Avg merge
3d 5h
Merged PRs (30d)
34

Description

Came up in #2641 review. Both common/writeChannels.ts and common/writeSoA.ts import straight from core/, data/ and shared/:

import { writeTextureChannels } from '../core/texture/textureUtils.ts';
import { $internal, $soul } from '../shared/symbols.ts';

If common is supposed to be buildable from the public API (or typegpu/~internal at most) then neither of these belongs there as is.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with common/writeChannels.ts and common/writeSoA.ts, then inspect the public API and typegpu/~internal exports they can use. Trace the referenced imports from core/, data/, and shared/ to determine the intended boundary. Done means common no longer imports those library internals directly and remains buildable through the allowed API surface.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
api
Issue type
Refactor
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.