Skip to content

Fix Cogl namespace (@girs/cogl-2.0 → @girs/cogl-18)#132

Merged
JumpLink merged 1 commit into
mainfrom
chore/update-girs-4.0.4
Jul 3, 2026
Merged

Fix Cogl namespace (@girs/cogl-2.0 → @girs/cogl-18)#132
JumpLink merged 1 commit into
mainfrom
chore/update-girs-4.0.4

Conversation

@JumpLink

@JumpLink JumpLink commented Jun 29, 2026

Copy link
Copy Markdown
Collaborator

Fixes #126 — the Cogl namespace was incorrect.

Cogl namespace incorrect (#126)

@girs/cogl-2.0@girs/cogl-18. cogl-18 is the version @girs/clutter-18 and @girs/meta-18 depend on; the mismatched 2.0 namespace pulled a second, incompatible copy of the Cogl types into the tree, so a global.d.ts method using both Cairo and Cogl types could not type-check. Switching to cogl-18 dedupes Cogl and lets Cairo + Cogl be used together.

Scope

Per @schnz's suggestion, this PR now does only the Cogl namespace fix — the @girs versioning scheme is left untouched (still on the current rc ranges). Bumping the @girs/* deps off the release candidates (#125) is left to the auto-update workflow in #135, so it can take over and be exercised end-to-end.

Follow-up for #135: now that ts-for-gir#432 is released (release-only version scheme), its updater should emit caret ranges rather than exact pins — exact top-level pins re-diverge from the transitive ^4.x deps of the @girs packages and can re-open the duplicate-copy issue (#431) on the next @girs release.

Validation

yarn install swaps cogl-2.0 for cogl-18 (resolves to the same rc as clutter-18/meta-18) and touches only package.json + yarn.lock. Full CI sequence green locally: build:types, validate:types, build:example, validate:example, prettier:check.

Closes #126

@AmionSky

Copy link
Copy Markdown
Contributor

#128 (comment)

@JumpLink

JumpLink commented Jun 29, 2026

Copy link
Copy Markdown
Collaborator Author

Thanks @AmionSky, agreed that pinning isn't the right long-term fix.

One nuance worth flagging: ^2.88.0-4.0.4 does resolve to the stable on npm (npm prefers the latest dist-tag), but this repo installs with Yarn 4, which picks the highest matching version regardless of latest, so under Yarn the caret resolves back to 2.88.0-4.0.0-rc.17 (the behaviour you reported in #125). I verified this with a yarn install here. So while the rc prereleases that outsort the stable still exist on npm, a caret range can't reach 4.0.4 under Yarn - which is why I reached for pins.

The proper fix is upstream: gjsify/ts-for-gir#432 drops the coupled <lib>-<app> version scheme for release-only versions. Once that lands and @girs/* is republished, a plain ^4.0.x caret dedupes across releases and excludes prereleases (on Yarn too) so no pins are needed.

Plan for this PR: hold it until #432 is published, then swap the exact pins for plain caret ranges. The Cogl namespace fix (@girs/cogl-2.0@girs/cogl-18) is independent of the versioning scheme and stays.

Does that work for you?

@schnz

schnz commented Jul 1, 2026

Copy link
Copy Markdown
Member

Plan for this PR: hold it until #432 is published, then swap the exact pins for plain caret ranges. The Cogl namespace fix (@girs/cogl-2.0 → @girs/cogl-18) is independent of the versioning scheme and stays.

As a suggestion: Just update @girs/cogl-2.0 -> @girs/cogl-18 in this PR , nothing else.
Then let the workflow from #135 take over and see if it works as expected.

@JumpLink JumpLink changed the title Update @girs dependencies to 4.0.4 and fix Cogl namespace Track @girs stable releases via caret ranges (^4.1.0) and fix Cogl namespace Jul 2, 2026
@girs/cogl-2.0 pulled a second, incompatible copy of the Cogl types
into the tree, so a method using both Cairo and Cogl types could not
type-check. @girs/cogl-18 is the version @girs/clutter-18 and
@girs/meta-18 depend on; switching to it dedupes Cogl and lets Cairo
+ Cogl be used together.

Leaves the @Girs versioning scheme untouched (still on the current rc
ranges) so the auto-update workflow in #135 can take over the bumps.

Closes #126
@JumpLink
JumpLink force-pushed the chore/update-girs-4.0.4 branch from c215a46 to 1a0164c Compare July 3, 2026 06:41
@JumpLink JumpLink changed the title Track @girs stable releases via caret ranges (^4.1.0) and fix Cogl namespace Fix Cogl namespace (@girs/cogl-2.0 → @girs/cogl-18) Jul 3, 2026
@JumpLink

JumpLink commented Jul 3, 2026

Copy link
Copy Markdown
Collaborator Author

@schnz Good Idea, this PR now does only the Cogl namespace fix 👍

@JumpLink
JumpLink merged commit 7db001f into main Jul 3, 2026
1 check passed
@JumpLink
JumpLink deleted the chore/update-girs-4.0.4 branch July 3, 2026 13:03
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.

Cogl version is incorrect

3 participants