Skip to content

Commit

Permalink
devel/pylyzer: Fix build with rust-1.76.0
Browse files Browse the repository at this point in the history
Import upstream patch [1] to fix the following error:

error[E0512]: cannot transmute between types of different sizes, or dependently-sized types
  --> /wrkdirs/usr/ports/devel/pylyzer/work/pylyzer-0.0.51/cargo-crates/rustpython-ast-0.3.0/src/impls.rs:60:1

[1] RustPython/Parser@29c4728

PR:		276920
Approved by:	portmgr (build fix blanket)
  • Loading branch information
MikaelUrankar committed Feb 19, 2024
1 parent f22f38c commit 9d28fde
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 1 deletion.
2 changes: 1 addition & 1 deletion devel/pylyzer/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PORTNAME= pylyzer
DISTVERSIONPREFIX= v
DISTVERSION= 0.0.51
PORTREVISION= 1
PORTREVISION= 2
CATEGORIES= devel python

MAINTAINER= yuri@FreeBSD.org
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
https://github.com/RustPython/Parser/commit/29c4728dbedc7e69cc2560b9b34058bbba9b1303

--- cargo-crates/rustpython-ast-0.3.0/src/impls.rs.orig 2024-02-10 11:55:13
+++ cargo-crates/rustpython-ast-0.3.0/src/impls.rs
@@ -54,11 +54,12 @@ impl<R> Expr<R> {
}
}

-#[cfg(target_arch = "x86_64")]
-static_assertions::assert_eq_size!(crate::Expr, [u8; 72]);
-#[cfg(target_arch = "x86_64")]
-static_assertions::assert_eq_size!(crate::Stmt, [u8; 160]);
-#[cfg(target_arch = "x86_64")]
-static_assertions::assert_eq_size!(crate::Pattern, [u8; 96]);
-#[cfg(target_arch = "x86_64")]
+// TODO: make this a #[test] to avoid eq comparison
+// #[cfg(target_arch = "x86_64")]
+// static_assertions::assert_eq_size!(crate::Expr, [u8; 72]);
+// #[cfg(target_arch = "x86_64")]
+// static_assertions::assert_eq_size!(crate::Stmt, [u8; 160]);
+// #[cfg(target_arch = "x86_64")]
+// static_assertions::assert_eq_size!(crate::Pattern, [u8; 96]);
+// #[cfg(target_arch = "x86_64")]
static_assertions::assert_eq_size!(crate::ExceptHandler, [u8; 64]);

0 comments on commit 9d28fde

Please sign in to comment.