From 6cd3726a5adb67c067158514db4719fde2e8b58b Mon Sep 17 00:00:00 2001
From: Piotr Osiewicz <24362066+osiewicz@users.noreply.github.com>
Date: Wed, 23 Jul 2025 10:28:06 +0200
Subject: [PATCH] Revert "chore: Bump taffy to 0.8.3" (#34938)
Reverts zed-industries/zed#34876
From our Slack:
https://github.com/user-attachments/assets/828964be-9b6e-4496-9361-9e3a2e9aa208
Release Notes:
- N/A
---
Cargo.lock | 9 +++++----
crates/gpui/Cargo.toml | 2 +-
crates/gpui/src/taffy.rs | 26 +++++++++++++-------------
3 files changed, 19 insertions(+), 18 deletions(-)
diff --git a/Cargo.lock b/Cargo.lock
index 08d29cdc80..c64995b01b 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -7401,9 +7401,9 @@ dependencies = [
[[package]]
name = "grid"
-version = "0.17.0"
+version = "0.14.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "71b01d27060ad58be4663b9e4ac9e2d4806918e8876af8912afbddd1a91d5eaa"
+checksum = "be136d9dacc2a13cc70bb6c8f902b414fb2641f8db1314637c6b7933411a8f82"
[[package]]
name = "group"
@@ -15958,12 +15958,13 @@ dependencies = [
[[package]]
name = "taffy"
-version = "0.8.3"
+version = "0.5.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7aaef0ac998e6527d6d0d5582f7e43953bb17221ac75bb8eb2fcc2db3396db1c"
+checksum = "e8b61630cba2afd2c851821add2e1bb1b7851a2436e839ab73b56558b009035e"
dependencies = [
"arrayvec",
"grid",
+ "num-traits",
"serde",
"slotmap",
]
diff --git a/crates/gpui/Cargo.toml b/crates/gpui/Cargo.toml
index 68c0ea89c7..878794647a 100644
--- a/crates/gpui/Cargo.toml
+++ b/crates/gpui/Cargo.toml
@@ -121,7 +121,7 @@ smallvec.workspace = true
smol.workspace = true
strum.workspace = true
sum_tree.workspace = true
-taffy = "=0.8.3"
+taffy = "=0.5.1"
thiserror.workspace = true
util.workspace = true
uuid.workspace = true
diff --git a/crates/gpui/src/taffy.rs b/crates/gpui/src/taffy.rs
index f7fa54256d..6228a60490 100644
--- a/crates/gpui/src/taffy.rs
+++ b/crates/gpui/src/taffy.rs
@@ -283,7 +283,7 @@ impl ToTaffy for Length {
fn to_taffy(&self, rem_size: Pixels) -> taffy::prelude::LengthPercentageAuto {
match self {
Length::Definite(length) => length.to_taffy(rem_size),
- Length::Auto => taffy::prelude::LengthPercentageAuto::auto(),
+ Length::Auto => taffy::prelude::LengthPercentageAuto::Auto,
}
}
}
@@ -292,7 +292,7 @@ impl ToTaffy for Length {
fn to_taffy(&self, rem_size: Pixels) -> taffy::prelude::Dimension {
match self {
Length::Definite(length) => length.to_taffy(rem_size),
- Length::Auto => taffy::prelude::Dimension::auto(),
+ Length::Auto => taffy::prelude::Dimension::Auto,
}
}
}
@@ -302,14 +302,14 @@ impl ToTaffy for DefiniteLength {
match self {
DefiniteLength::Absolute(length) => match length {
AbsoluteLength::Pixels(pixels) => {
- taffy::style::LengthPercentage::length(pixels.into())
+ taffy::style::LengthPercentage::Length(pixels.into())
}
AbsoluteLength::Rems(rems) => {
- taffy::style::LengthPercentage::length((*rems * rem_size).into())
+ taffy::style::LengthPercentage::Length((*rems * rem_size).into())
}
},
DefiniteLength::Fraction(fraction) => {
- taffy::style::LengthPercentage::percent(*fraction)
+ taffy::style::LengthPercentage::Percent(*fraction)
}
}
}
@@ -320,14 +320,14 @@ impl ToTaffy for DefiniteLength {
match self {
DefiniteLength::Absolute(length) => match length {
AbsoluteLength::Pixels(pixels) => {
- taffy::style::LengthPercentageAuto::length(pixels.into())
+ taffy::style::LengthPercentageAuto::Length(pixels.into())
}
AbsoluteLength::Rems(rems) => {
- taffy::style::LengthPercentageAuto::length((*rems * rem_size).into())
+ taffy::style::LengthPercentageAuto::Length((*rems * rem_size).into())
}
},
DefiniteLength::Fraction(fraction) => {
- taffy::style::LengthPercentageAuto::percent(*fraction)
+ taffy::style::LengthPercentageAuto::Percent(*fraction)
}
}
}
@@ -337,12 +337,12 @@ impl ToTaffy for DefiniteLength {
fn to_taffy(&self, rem_size: Pixels) -> taffy::style::Dimension {
match self {
DefiniteLength::Absolute(length) => match length {
- AbsoluteLength::Pixels(pixels) => taffy::style::Dimension::length(pixels.into()),
+ AbsoluteLength::Pixels(pixels) => taffy::style::Dimension::Length(pixels.into()),
AbsoluteLength::Rems(rems) => {
- taffy::style::Dimension::length((*rems * rem_size).into())
+ taffy::style::Dimension::Length((*rems * rem_size).into())
}
},
- DefiniteLength::Fraction(fraction) => taffy::style::Dimension::percent(*fraction),
+ DefiniteLength::Fraction(fraction) => taffy::style::Dimension::Percent(*fraction),
}
}
}
@@ -350,9 +350,9 @@ impl ToTaffy for DefiniteLength {
impl ToTaffy for AbsoluteLength {
fn to_taffy(&self, rem_size: Pixels) -> taffy::style::LengthPercentage {
match self {
- AbsoluteLength::Pixels(pixels) => taffy::style::LengthPercentage::length(pixels.into()),
+ AbsoluteLength::Pixels(pixels) => taffy::style::LengthPercentage::Length(pixels.into()),
AbsoluteLength::Rems(rems) => {
- taffy::style::LengthPercentage::length((*rems * rem_size).into())
+ taffy::style::LengthPercentage::Length((*rems * rem_size).into())
}
}
}