Skip to content

Bump core-graphics version to 0.25#603

Open
zolkko wants to merge 2 commits intolinebender:mainfrom
blumenplace:bump_cg_version
Open

Bump core-graphics version to 0.25#603
zolkko wants to merge 2 commits intolinebender:mainfrom
blumenplace:bump_cg_version

Conversation

@zolkko
Copy link
Copy Markdown

@zolkko zolkko commented Mar 2, 2026

Hi,

I need to bump the version of core-graphics up to 0.25.0, otherwise the compilation fails.

@xStrom
Copy link
Copy Markdown
Member

xStrom commented Mar 2, 2026

You need to also update Cargo.lock, you can do so by running e.g. cargo clippy -p piet-coregraphics locally.

It would also be useful to know what compilation error you get with the current 0.24 version.

@zolkko
Copy link
Copy Markdown
Author

zolkko commented Mar 2, 2026

I have a tiny (I hope yet :-) ) "test" program. [https://github.com/blumenplace/skju/blob/main/mobile/common/Cargo.toml]

If I define my cargo dependecies as:

piet = { git = "https://github.com/blumenplace/piet" }
piet-coregraphics =  { git = "https://github.com/blumenplace/piet"  }
core-graphics = "0.24.0"

it fails with:

error[E0308]: mismatched types
   --> /Users/zolkko/.cargo/git/checkouts/piet-a264ecacfc2e7cdc/5283329/piet-coregraphics/src/ct_helpers.rs:216:48
    |
216 |         let frame = self.0.create_frame(range, path);
    |                            ------------        ^^^^ expected `core_graphics::path::CGPathRef`, found `CGPathRef`
    |                            |
    |                            arguments to this method are incorrect
    |
note: there are multiple different versions of crate `core_graphics` in the dependency graph

In the cargo tree you can see:

├── piet-coregraphics v0.8.0 (https://github.com/blumenplace/piet#52833291)
│   ├── associative-cache v2.0.0
│   ├── core-foundation v0.10.1 (*)
│   ├── core-foundation-sys v0.8.7
│   ├── core-graphics v0.24.0 (*)
│   ├── core-text v21.1.0
│   │   ├── core-foundation v0.10.1 (*)
│   │   ├── core-graphics v0.25.0
│   │   │   ├── bitflags v2.11.0
│   │   │   ├── core-foundation v0.10.1 (*)
│   │   │   ├── core-graphics-types v0.2.0 (*)
│   │   │   ├── foreign-types v0.5.0 (*)
│   │   │   └── libc v0.2.182

@zolkko
Copy link
Copy Markdown
Author

zolkko commented Mar 2, 2026

The compilation error is:

error[E0308]: mismatched types
   --> /Users/zolkko/.cargo/git/checkouts/piet-a264ecacfc2e7cdc/5283329/piet-coregraphics/src/ct_helpers.rs:216:48
    |
216 |         let frame = self.0.create_frame(range, path);
    |                            ------------        ^^^^ expected `core_graphics::path::CGPathRef`, found `CGPathRef`
    |                            |
    |                            arguments to this method are incorrect
    |
note: there are multiple different versions of crate `core_graphics` in the dependency graph

If I have the following cargo dependencies:

piet = { git = "https://github.com/linebender/piet" }
piet-coregraphics =  { git = "https://github.com/linebender/piet"  }
core-graphics = "0.24.0"

I think compilation errors are caused by:

── piet-coregraphics v0.8.0 (https://github.com/blumenplace/piet#52833291)
│   ├── associative-cache v2.0.0
│   ├── core-foundation v0.10.1 (*)
│   ├── core-foundation-sys v0.8.7
│   ├── core-graphics v0.24.0 (*)
│   ├── core-text v21.1.0
│   │   ├── core-foundation v0.10.1 (*)
│   │   ├── core-graphics v0.25.0
│   │   │   ├── bitflags v2.11.0
│   │   │   ├── core-foundation v0.10.1 (*)
│   │   │   ├── core-graphics-types v0.2.0 (*)
│   │   │   ├── foreign-types v0.5.0 (*)
│   │   │   └── libc v0.2.182

Multiple versions of the core-graphics crate.

Another crate that may cause compilation errors is:

piet-svg v0.8.0 (/Users/zolkko/projects/piet/piet-svg)
├── base64 v0.13.1
├── font-kit v0.14.3
│   ├── bitflags v2.9.3
│   ├── byteorder v1.5.0
│   ├── core-foundation v0.9.4
│   │   ├── core-foundation-sys v0.8.7
│   │   └── libc v0.2.175
│   ├── core-graphics v0.23.2
│   │   ├── bitflags v1.3.2
│   │   ├── core-foundation v0.9.4 (*)
│   │   ├── core-graphics-types v0.1.3
│   │   │   ├── bitflags v1.3.2
│   │   │   ├── core-foundation v0.9.4 (*)
│   │   │   └── libc v0.2.175
│   │   ├── foreign-types v0.5.0 (*)
│   │   └── libc v0.2.175
│   ├── core-text v20.1.0
│   │   ├── core-foundation v0.9.4 (*)
│   │   ├── core-graphics v0.23.2 (*)
│   │   ├── foreign-types v0.5.0 (*)
│   │   └── libc v0.2.175

but I did not check it.
Shall I check it as well?

@xStrom
Copy link
Copy Markdown
Member

xStrom commented Mar 3, 2026

Hmm, CI is still complaining about Cargo.lock being out of date. Are you on macOS? Try running cargo check --all --all-features so it affects all the Piet packages. It won't compile but it should at least update Cargo.lock.

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.

2 participants