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

Bump crossfont to 0.8.0 #60

Merged
merged 1 commit into from
Mar 15, 2024
Merged

Conversation

chrisduerr
Copy link
Contributor

This switches the underlying fontconfig-sys crate to yeslogic-fontconfig-sys, due to Servo's lack of maintenance.

This switches the underlying fontconfig-sys crate to
yeslogic-fontconfig-sys, due to Servo's lack of maintenance.
@PolyMeilex PolyMeilex merged commit e777065 into PolyMeilex:master Mar 15, 2024
7 of 8 checks passed
@PolyMeilex
Copy link
Owner

Thanks!

@chrisduerr chrisduerr deleted the bump_crossfont branch March 16, 2024 00:56
@bjorn3
Copy link

bjorn3 commented Mar 29, 2024

When will this be released? crossfont 0.7.0 depends on freetype-rs 0.26.0 which has UB that is detected at runtime on rustc nightly when debug assertions are enabled:

thread 'main' panicked at library/core/src/panicking.rs:156:5:
unsafe precondition(s) violated: slice::from_raw_parts requires the pointer to be aligned and non-null, and the total size of the slice not to exceed `isize::MAX`

Alacritty can't update to crossfont 0.8.0 itself either until winit depends on a version of sctk-adwaita that uses crossfont 0.8.0. Trying to update it right now would result in:

    Updating crates.io index
error: failed to select a version for `freetype-sys`.
    ... required by package `freetype-rs v0.26.0`
    ... which satisfies dependency `freetype-rs = "^0.26"` of package `crossfont v0.6.0`
    ... which satisfies dependency `crossfont = "^0.6.0"` of package `sctk-adwaita v0.8.0`
    ... which satisfies dependency `sctk-adwaita = "^0.8.0"` of package `winit v0.29.15`
    ... which satisfies dependency `winit = "^0.29.15"` of package `alacritty v0.14.0-dev (/home/bjorn/Projects/alacritty/alacritty)`
versions that meet the requirements `^0.13.0` are: 0.13.1, 0.13.0

the package `freetype-sys` links to the native library `freetype`, but it conflicts with a previous package which links to `freetype` as well:
package `freetype-sys v0.20.0`
    ... which satisfies dependency `freetype-sys = "^0.20.0"` of package `freetype-rs v0.36.0`
    ... which satisfies dependency `freetype-rs = "^0.36.0"` of package `crossfont v0.8.0`
    ... which satisfies dependency `crossfont = "^0.8.0"` of package `alacritty v0.14.0-dev (/home/bjorn/Projects/alacritty/alacritty)`
Only one package in the dependency graph may specify the same links value. This helps ensure that only one copy of a native library is linked in the final binary. Try to adjust your dependencies so that only one package uses the `links = "freetype"` value. For more information, see https://doc.rust-lang.org/cargo/reference/resolver.html#links.

failed to select a version for `freetype-sys` which could resolve this conflict

cc @proski assuming you the person who commented at https://lwn.net/Articles/965873/

@PolyMeilex
Copy link
Owner

When will this be released?

Published in 0.8.2

@bjorn3
Copy link

bjorn3 commented Mar 29, 2024

Thanks!

Edit: Alacritty update in alacritty/alacritty#7878

@chrisduerr
Copy link
Contributor Author

Published in 0.8.2

You realize this is a breaking change, right?

@proski
Copy link
Contributor

proski commented Mar 29, 2024

Yes, that was me. Excellent news! I was actually wrong in that post. I was able to get that message without cranelift. I guess I haven't used nightly to compile alacritty for a long time.

I tried adding sctk-adwaita = "0.8.2" to alacritty/Cargo.toml in the current Alacritty sources, but I'm getting an error.

$ cargo +nightly run
    Updating crates.io index
error: failed to select a version for `yeslogic-fontconfig-sys`.
    ... required by package `crossfont v0.8.0`
    ... which satisfies dependency `crossfont = "^0.8.0"` of package `sctk-adwaita v0.8.2`
    ... which satisfies dependency `sctk-adwaita = "^0.8.2"` of package `alacritty v0.14.0-dev (/home/proski/src/alacritty/alacritty)`
versions that meet the requirements `^5.0.0` are: 5.0.0

the package `yeslogic-fontconfig-sys` links to the native library `fontconfig`, but it conflicts with a previous package which links to `fontconfig` as well:
package `servo-fontconfig-sys v5.1.0`
    ... which satisfies dependency `servo-fontconfig-sys = "^5.1.0"` of package `servo-fontconfig v0.5.1`
    ... which satisfies dependency `servo-fontconfig = "^0.5.1"` of package `crossfont v0.7.0`
    ... which satisfies dependency `crossfont = "^0.7.0"` of package `alacritty v0.14.0-dev (/home/proski/src/alacritty/alacritty)`
Only one package in the dependency graph may specify the same links value. This helps ensure that only one copy of a native library is linked in the final binary. Try to adjust your dependencies so that only one package uses the `links = "fontconfig"` value. For more information, see https://doc.rust-lang.org/cargo/reference/resolver.html#links.

failed to select a version for `yeslogic-fontconfig-sys` which could resolve this conflict

No time to dig deeper, sorry.

@bjorn3
Copy link

bjorn3 commented Mar 29, 2024

@proski alacritty/alacritty#7878 updates both crossfont and sctk-adwaits. That PR works for me with cg_clif.

@proski
Copy link
Contributor

proski commented Mar 29, 2024

That works for me, with and without Cranelift. Thank you!

@PolyMeilex
Copy link
Owner

PolyMeilex commented Mar 29, 2024

Published in 0.8.2

You realize this is a breaking change, right?

Yanked and republished as 0.9 (this will now require winit update I suppose, and a braking one as well?)

@chrisduerr
Copy link
Contributor Author

Yanked and republished as 0.9 (this will now require winit update I suppose, and a braking one as well?)

Yes this was the plan and kchibisov should already be aware of that. Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants