Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 19 Feb 2024 11:59:50 GMT
From:      Mikael Urankar <mikael@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: 12b616853769 - main - lang/rustpython: Fix build with rust 1.76.0
Message-ID:  <202402191159.41JBxoSL005701@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by mikael:

URL: https://cgit.FreeBSD.org/ports/commit/?id=12b61685376912714439e5c96a18c6d9b29b83a4

commit 12b61685376912714439e5c96a18c6d9b29b83a4
Author:     Mikael Urankar <mikael@FreeBSD.org>
AuthorDate: 2024-02-10 12:56:58 +0000
Commit:     Mikael Urankar <mikael@FreeBSD.org>
CommitDate: 2024-02-19 11:59:03 +0000

    lang/rustpython: Fix build with rust 1.76.0
    
    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/lang/rustpython/work/Parser-0.3.0/ast/src/impls.rs:60:1
    
    [1] https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=270383
    
    PR:             276920
    Approved by:    portmgr (build fix blanket)
---
 .../files/patch-Parser-0.3.0_ast_src_impls.rs      | 34 ++++++++++++++++++++++
 1 file changed, 34 insertions(+)

diff --git a/lang/rustpython/files/patch-Parser-0.3.0_ast_src_impls.rs b/lang/rustpython/files/patch-Parser-0.3.0_ast_src_impls.rs
new file mode 100644
index 000000000000..6ecf8cdfef73
--- /dev/null
+++ b/lang/rustpython/files/patch-Parser-0.3.0_ast_src_impls.rs
@@ -0,0 +1,34 @@
+From 29c4728dbedc7e69cc2560b9b34058bbba9b1303 Mon Sep 17 00:00:00 2001
+From: "Jeong, YunWon" <69878+youknowone@users.noreply.github.com>
+Date: Thu, 28 Dec 2023 01:36:46 +0900
+Subject: [PATCH] remove size assertions to avoid nightly error (#111)
+
+---
+ ast/src/impls.rs | 17 +++++++++--------
+ 1 file changed, 9 insertions(+), 8 deletions(-)
+
+diff --git a/ast/src/impls.rs b/ast/src/impls.rs
+index 594fadb3..8c788593 100644
+--- ../Parser-0.3.0/ast/src/impls.rs
++++ ../Parser-0.3.0/ast/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")]
+-static_assertions::assert_eq_size!(crate::ExceptHandler, [u8; 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]);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202402191159.41JBxoSL005701>