Github messages for voidlinux
 help / color / mirror / Atom feed
From: jbenden <jbenden@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: [PR PATCH] wezterm: update to 20221119-145034-49b9839f
Date: Mon, 21 Nov 2022 02:40:40 +0100	[thread overview]
Message-ID: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-40654@inbox.vuxu.org> (raw)

[-- Attachment #1: Type: text/plain, Size: 509 bytes --]

There is a new pull request by jbenden against master on the void-packages repository

https://github.com/jbenden/void-packages wezterm-20221119
https://github.com/void-linux/void-packages/pull/40654

wezterm: update to 20221119-145034-49b9839f
#### Testing the changes
- I tested the changes in this PR: **YES**

#### Local build testing
- I built this PR locally for my native architecture, (`x86_64`-`glibc`)


A patch file from https://github.com/void-linux/void-packages/pull/40654.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-wezterm-20221119-40654.patch --]
[-- Type: text/x-diff, Size: 12131 bytes --]

From 667ed067a66afef461f3320a103a3462e0240850 Mon Sep 17 00:00:00 2001
From: Joseph Benden <joe@benden.us>
Date: Sun, 20 Nov 2022 18:38:18 -0700
Subject: [PATCH] wezterm: update to 20221119-145034-49b9839f

Signed-off-by: Joseph Benden <joe@benden.us>
---
 srcpkgs/wezterm/patches/0001-32bit.patch      | 232 ------------------
 .../patches/0002-remove-distro-fonts.patch    |  22 --
 srcpkgs/wezterm/template                      |  12 +-
 3 files changed, 7 insertions(+), 259 deletions(-)
 delete mode 100644 srcpkgs/wezterm/patches/0001-32bit.patch
 delete mode 100644 srcpkgs/wezterm/patches/0002-remove-distro-fonts.patch

diff --git a/srcpkgs/wezterm/patches/0001-32bit.patch b/srcpkgs/wezterm/patches/0001-32bit.patch
deleted file mode 100644
index d374a275d235..000000000000
--- a/srcpkgs/wezterm/patches/0001-32bit.patch
+++ /dev/null
@@ -1,232 +0,0 @@
-From 7b904f05eb4de9ed44d2068355a571b117eba0e1 Mon Sep 17 00:00:00 2001
-From: Wez Furlong <wez@wezfurlong.org>
-Date: Sat, 15 Oct 2022 16:45:02 -0700
-Subject: [PATCH] termwiz: fixup for 32-bit systems
-
-I noticed from https://github.com/void-linux/void-packages/pull/36903
-that 32-bit systems were failing to pass the test suite.
-
-Running `cargo test --target i686-unknown-linux-gnu  -- --nocapture
-teeny_string` showed that we were faulting in the teenystring code
-and digging a bit deeper showed that it was because our assumptions
-about the high bits were wrong for 32-bit systems.
-
-Fix this by making TeenyString based around a u64 rather than usize
-so that we guarantee its size on all current systems.
----
- Cargo.lock          |  1 -
- termwiz/Cargo.toml  |  1 -
- termwiz/src/cell.rs | 87 ++++++++++++++-------------------------------
- 3 files changed, 26 insertions(+), 63 deletions(-)
-
-diff --git a/Cargo.lock b/Cargo.lock
-index 4f976535be..243e3a2b24 100644
---- a/Cargo.lock
-+++ b/Cargo.lock
-@@ -4739,7 +4739,6 @@ dependencies = [
-  "base64",
-  "bitflags",
-  "cassowary",
-- "cfg-if 1.0.0",
-  "criterion",
-  "env_logger",
-  "filedescriptor",
-diff --git a/termwiz/Cargo.toml b/termwiz/Cargo.toml
-index d8d7ab543c..e843bac261 100644
---- a/termwiz/Cargo.toml
-+++ b/termwiz/Cargo.toml
-@@ -15,7 +15,6 @@ readme = "README.md"
- base64 = "0.13"
- bitflags = "1.3"
- cassowary = {version="0.3", optional=true}
--cfg-if = "1.0"
- anyhow = "1.0"
- filedescriptor = { version="0.8", path = "../filedescriptor" }
- finl_unicode = "1.1"
-diff --git a/termwiz/src/cell.rs b/termwiz/src/cell.rs
-index ddf38a93bb..70d6099dd0 100644
---- a/termwiz/src/cell.rs
-+++ b/termwiz/src/cell.rs
-@@ -590,7 +590,7 @@ where
-     s.serialize(serializer)
- }
- 
--/// TeenyString encodes string storage in a single machine word.
-+/// TeenyString encodes string storage in a single u64.
- /// The scheme is simple but effective: strings that encode into a
- /// byte slice that is 1 less byte than the machine word size can
- /// be encoded directly into the usize bits stored in the struct.
-@@ -603,60 +603,40 @@ where
- /// calling grapheme_column_width; if it is set, then the TeenyString
- /// has length 2, otherwise, it has length 1 (we don't allow zero-length
- /// strings).
--struct TeenyString(usize);
-+struct TeenyString(u64);
- struct TeenyStringHeap {
-     bytes: Vec<u8>,
-     width: usize,
- }
- 
- impl TeenyString {
--    const fn marker_mask() -> usize {
-+    const fn marker_mask() -> u64 {
-         if cfg!(target_endian = "little") {
--            cfg_if::cfg_if! {
--                if #[cfg(target_pointer_width = "64")] {
--                    0x80000000_00000000
--                } else if #[cfg(target_pointer_width = "32")] {
--                    0x80000000
--                } else if #[cfg(target_pointer_width = "16")] {
--                    0x8000
--                } else {
--                    panic!("unsupported target");
--                }
--            }
-+            0x80000000_00000000
-         } else {
-             0x1
-         }
-     }
- 
--    const fn double_wide_mask() -> usize {
-+    const fn double_wide_mask() -> u64 {
-         if cfg!(target_endian = "little") {
--            cfg_if::cfg_if! {
--                if #[cfg(target_pointer_width = "64")] {
--                    0xc0000000_00000000
--                } else if #[cfg(target_pointer_width = "32")] {
--                    0xc0000000
--                } else if #[cfg(target_pointer_width = "16")] {
--                    0xc000
--                } else {
--                    panic!("unsupported target");
--                }
--            }
-+            0xc0000000_00000000
-         } else {
-             0x3
-         }
-     }
- 
--    const fn is_marker_bit_set(word: usize) -> bool {
-+    const fn is_marker_bit_set(word: u64) -> bool {
-         let mask = Self::marker_mask();
-         word & mask == mask
-     }
- 
--    const fn is_double_width(word: usize) -> bool {
-+    const fn is_double_width(word: u64) -> bool {
-         let mask = Self::double_wide_mask();
-         word & mask == mask
-     }
- 
--    const fn set_marker_bit(word: usize, width: usize) -> usize {
-+    const fn set_marker_bit(word: u64, width: usize) -> u64 {
-         if width > 1 {
-             word | Self::double_wide_mask()
-         } else {
-@@ -689,18 +669,18 @@ impl TeenyString {
-         let len = bytes.len();
-         let width = width.unwrap_or_else(|| grapheme_column_width(s, unicode_version));
- 
--        if len < std::mem::size_of::<usize>() {
-+        if len < std::mem::size_of::<u64>() {
-             debug_assert!(width < 3);
- 
--            let mut word = 0usize;
-+            let mut word = 0u64;
-             unsafe {
-                 std::ptr::copy_nonoverlapping(
-                     bytes.as_ptr(),
--                    &mut word as *mut usize as *mut u8,
-+                    &mut word as *mut u64 as *mut u8,
-                     len,
-                 );
-             }
--            let word = Self::set_marker_bit(word, width);
-+            let word = Self::set_marker_bit(word as u64, width);
-             Self(word)
-         } else {
-             let vec = Box::new(TeenyStringHeap {
-@@ -708,35 +688,15 @@ impl TeenyString {
-                 width,
-             });
-             let ptr = Box::into_raw(vec);
--            Self(ptr as usize)
-+            Self(ptr as u64)
-         }
-     }
- 
-     pub const fn space() -> Self {
-         Self(if cfg!(target_endian = "little") {
--            cfg_if::cfg_if! {
--                if #[cfg(target_pointer_width = "64")] {
--                    0x80000000_00000020
--                } else if #[cfg(target_pointer_width = "32")] {
--                    0x80000020
--                } else if #[cfg(target_pointer_width = "16")] {
--                    0x8020
--                } else {
--                    panic!("unsupported target");
--                }
--            }
-+            0x80000000_00000020
-         } else {
--            cfg_if::cfg_if! {
--                if #[cfg(target_pointer_width = "64")] {
--                    0x20000000_00000001
--                } else if #[cfg(target_pointer_width = "32")] {
--                    0x20000001
--                } else if #[cfg(target_pointer_width = "16")] {
--                    0x2001
--                } else {
--                    panic!("unsupported target");
--                }
--            }
-+            0x20000000_00000001
-         })
-     }
- 
-@@ -753,7 +713,7 @@ impl TeenyString {
-                 1
-             }
-         } else {
--            let heap = self.0 as *const usize as *const TeenyStringHeap;
-+            let heap = self.0 as *const u64 as *const TeenyStringHeap;
-             unsafe { (*heap).width }
-         }
-     }
-@@ -766,17 +726,17 @@ impl TeenyString {
- 
-     pub fn as_bytes(&self) -> &[u8] {
-         if Self::is_marker_bit_set(self.0) {
--            let bytes = &self.0 as *const usize as *const u8;
-+            let bytes = &self.0 as *const u64 as *const u8;
-             let bytes =
--                unsafe { std::slice::from_raw_parts(bytes, std::mem::size_of::<usize>() - 1) };
-+                unsafe { std::slice::from_raw_parts(bytes, std::mem::size_of::<u64>() - 1) };
-             let len = bytes
-                 .iter()
-                 .position(|&b| b == 0)
--                .unwrap_or(std::mem::size_of::<usize>() - 1);
-+                .unwrap_or(std::mem::size_of::<u64>() - 1);
- 
-             &bytes[0..len]
-         } else {
--            let heap = self.0 as *const usize as *const TeenyStringHeap;
-+            let heap = self.0 as *const u64 as *const TeenyStringHeap;
-             unsafe { (*heap).bytes.as_slice() }
-         }
-     }
-@@ -1072,6 +1032,11 @@ mod test {
- 
-     #[test]
-     fn teeny_string() {
-+        assert!(
-+            std::mem::size_of::<usize>() <= std::mem::size_of::<u64>(),
-+            "if a pointer doesn't fit in u64 then we need to change TeenyString"
-+        );
-+
-         let s = TeenyString::from_char('a');
-         assert_eq!(s.as_bytes(), &[b'a']);
- 
diff --git a/srcpkgs/wezterm/patches/0002-remove-distro-fonts.patch b/srcpkgs/wezterm/patches/0002-remove-distro-fonts.patch
deleted file mode 100644
index 1d8e21384ae9..000000000000
--- a/srcpkgs/wezterm/patches/0002-remove-distro-fonts.patch
+++ /dev/null
@@ -1,22 +0,0 @@
---- a/wezterm-font/src/parser.rs	2022-09-05 10:28:02.000000000 -0700
-+++ b/wezterm-font/src/parser.rs	2022-10-24 09:06:02.529054286 -0700
-@@ -715,19 +715,6 @@
-         font!("../../assets/fonts/JetBrainsMono-Regular.ttf"),
-         font!("../../assets/fonts/JetBrainsMono-ThinItalic.ttf"),
-         font!("../../assets/fonts/JetBrainsMono-Thin.ttf"),
--        font!("../../assets/fonts/Roboto-Black.ttf"),
--        font!("../../assets/fonts/Roboto-BlackItalic.ttf"),
--        font!("../../assets/fonts/Roboto-Bold.ttf"),
--        font!("../../assets/fonts/Roboto-BoldItalic.ttf"),
--        font!("../../assets/fonts/Roboto-Italic.ttf"),
--        font!("../../assets/fonts/Roboto-Light.ttf"),
--        font!("../../assets/fonts/Roboto-LightItalic.ttf"),
--        font!("../../assets/fonts/Roboto-Medium.ttf"),
--        font!("../../assets/fonts/Roboto-MediumItalic.ttf"),
--        font!("../../assets/fonts/Roboto-Regular.ttf"),
--        font!("../../assets/fonts/Roboto-Thin.ttf"),
--        font!("../../assets/fonts/Roboto-ThinItalic.ttf"),
--        font!("../../assets/fonts/NotoColorEmoji.ttf"),
-         font!("../../assets/fonts/Symbols-Nerd-Font-Mono.ttf"),
-         font!("../../assets/fonts/LastResortHE-Regular.ttf"),
-     ] {
diff --git a/srcpkgs/wezterm/template b/srcpkgs/wezterm/template
index abd2a245845c..936f2051d4ee 100644
--- a/srcpkgs/wezterm/template
+++ b/srcpkgs/wezterm/template
@@ -1,8 +1,8 @@
 # Template file for 'wezterm'
 pkgname=wezterm
-version=20220905
+version=20221119
 revision=1
-_srcver=${version}-102802-7d4b8249
+_srcver=${version}-145034-49b9839f
 archs="x86_64* i686* aarch64* arm*" # ring
 build_style=cargo
 configure_args="--no-default-features --features wezterm-gui/distro-defaults,wezterm-gui/wayland"
@@ -17,15 +17,17 @@ license="MIT"
 homepage="https://wezfurlong.org/wezterm/"
 changelog="https://wezfurlong.org/wezterm/changelog.html"
 distfiles="https://github.com/wez/wezterm/releases/download/${_srcver}/wezterm-${_srcver}-src.tar.gz"
-checksum="5898af2bb2dbedcae2648764d5b7abd3d98b0aa3d05d171b09e0e3f76b7dd545"
+checksum=6ad923d48c76e5175128f40cd70d3a0c9fd2dc3e3f573af44b9c2ae7608ab7c4
 
 do_check() {
 	# NOTE: cannot use build_style cargo do_check because of --release flag.
 	# NOTE: e2e::sftp is skipped due to missing ssh
-	# NOTE: shapecache::test::ligatures_jetbrains is skipped due to removal of fonts
+	# NOTE: escape::action_size has bad size due to discriminate
+	# NOTE: surface::line::storage::test::memory_usage has bad size due to discriminate
 	cargo test --target ${RUST_TARGET} --workspace --locked -- \
 		--skip e2e::sftp \
-		--skip shapecache::test::ligatures_jetbrains
+		--skip escape::action_size \
+		--skip surface::line::storage::test::memory_usage
 }
 
 do_install() {

             reply	other threads:[~2022-11-21  1:40 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-21  1:40 jbenden [this message]
2022-11-21  8:13 ` classabbyamp
2022-11-21 20:35 ` jbenden
2022-11-24  2:56 ` [PR PATCH] [Merged]: " classabbyamp

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-40654@inbox.vuxu.org \
    --to=jbenden@users.noreply.github.com \
    --cc=ml@inbox.vuxu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).