Skip to content

Commit f7830f6

Browse files
committed
Merge branch 'tomas/update-toolchain-follow-up' (#3820)
* tomas/update-toolchain-follow-up: tests: use `extern "C-unwind"` in native host fns to unwind panics ci: rm threads rustflag make fmt
2 parents 463d282 + 7792418 commit f7830f6

File tree

4 files changed

+16
-10
lines changed

4 files changed

+16
-10
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,7 @@ jobs:
291291
run: make test-unit-with-coverage
292292
# run: cargo +${{ env.NIGHTLY }} llvm-cov nextest run -E 'not test(e2e)' -E 'not test(integration)' -E 'not test(pos_state_machine_test)' --features namada/testing --no-fail-fast --lcov --output-path lcov.info
293293
env:
294-
RUSTFLAGS: "-C linker=clang -C link-arg=-fuse-ld=/usr/local/bin/mold -Z threads=8"
294+
RUSTFLAGS: "-C linker=clang -C link-arg=-fuse-ld=/usr/local/bin/mold"
295295
- name: Store coverage file artifact
296296
uses: actions/upload-artifact@v4
297297
with:
@@ -392,7 +392,7 @@ jobs:
392392
run: make test-integration-with-coverage
393393
# run: cargo +${{ env.NIGHTLY }} nextest run -E 'test(integration)' --test-threads 1 --no-fail-fast
394394
env:
395-
RUSTFLAGS: "-C linker=clang -C link-arg=-fuse-ld=/usr/local/bin/mold -Z threads=8"
395+
RUSTFLAGS: "-C linker=clang -C link-arg=-fuse-ld=/usr/local/bin/mold"
396396
- name: Store coverage file artifact
397397
uses: actions/upload-artifact@v4
398398
with:
@@ -451,7 +451,7 @@ jobs:
451451
- name: Run benchmarks tests
452452
run: make test-benches
453453
env:
454-
RUSTFLAGS: "-C linker=clang -C link-arg=-fuse-ld=/usr/local/bin/mold -Z threads=8"
454+
RUSTFLAGS: "-C linker=clang -C link-arg=-fuse-ld=/usr/local/bin/mold"
455455
- name: Clean cargo cache
456456
if: steps.cache.outputs.cache-hit != 'true'
457457
run: cargo cache --autoclean-expensive

crates/sdk/src/lib.rs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,10 @@ pub const DEFAULT_GAS_LIMIT: u64 = 200_000;
8787
/// An interface for high-level interaction with the Namada SDK
8888
#[cfg_attr(feature = "async-send", async_trait::async_trait)]
8989
#[cfg_attr(not(feature = "async-send"), async_trait::async_trait(?Send))]
90-
#[rustversion::attr(nightly, allow(elided_named_lifetimes, reason = "Not actually named"))]
90+
#[rustversion::attr(
91+
nightly,
92+
allow(elided_named_lifetimes, reason = "Not actually named")
93+
)]
9194
pub trait Namada: NamadaIo {
9295
/// Captures the interactive parts of the wallet's functioning
9396
type WalletUtils: WalletIo + WalletStorage + MaybeSend + MaybeSync;
@@ -776,7 +779,10 @@ where
776779

777780
#[cfg_attr(feature = "async-send", async_trait::async_trait)]
778781
#[cfg_attr(not(feature = "async-send"), async_trait::async_trait(?Send))]
779-
#[rustversion::attr(nightly, allow(elided_named_lifetimes, reason = "Not actually named"))]
782+
#[rustversion::attr(
783+
nightly,
784+
allow(elided_named_lifetimes, reason = "Not actually named")
785+
)]
780786
impl<C, U, V, I> Namada for NamadaImpl<C, U, V, I>
781787
where
782788
C: Client + MaybeSend + Sync,

crates/tests/src/vm_host_env/tx.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,7 @@ mod native_tx_host_env {
339339
( $fn:ident ( $($arg:ident : $type:ty),* $(,)?) ) => {
340340
concat_idents!(extern_fn_name = namada, _, $fn {
341341
#[no_mangle]
342-
extern "C" fn extern_fn_name( $($arg: $type),* ) {
342+
extern "C-unwind" fn extern_fn_name( $($arg: $type),* ) {
343343
with(|TestTxEnv {
344344
state,
345345
iterators,
@@ -384,7 +384,7 @@ mod native_tx_host_env {
384384
( $fn:ident ( $($arg:ident : $type:ty),* $(,)?) -> $ret:ty ) => {
385385
concat_idents!(extern_fn_name = namada, _, $fn {
386386
#[no_mangle]
387-
extern "C" fn extern_fn_name( $($arg: $type),* ) -> $ret {
387+
extern "C-unwind" fn extern_fn_name( $($arg: $type),* ) -> $ret {
388388
with(|TestTxEnv {
389389
tx_index,
390390
state,
@@ -429,7 +429,7 @@ mod native_tx_host_env {
429429
( "non-result", $fn:ident ( $($arg:ident : $type:ty),* $(,)?) ) => {
430430
concat_idents!(extern_fn_name = namada, _, $fn {
431431
#[no_mangle]
432-
extern "C" fn extern_fn_name( $($arg: $type),* ) {
432+
extern "C-unwind" fn extern_fn_name( $($arg: $type),* ) {
433433
with(|TestTxEnv {
434434
state,
435435
iterators,

crates/tests/src/vm_host_env/vp.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ mod native_vp_host_env {
226226
( $fn:ident ( $($arg:ident : $type:ty),* $(,)?) ) => {
227227
concat_idents!(extern_fn_name = namada, _, $fn {
228228
#[no_mangle]
229-
extern "C" fn extern_fn_name( $($arg: $type),* ) {
229+
extern "C-unwind" fn extern_fn_name( $($arg: $type),* ) {
230230
with(|TestVpEnv {
231231
addr,
232232
state,
@@ -271,7 +271,7 @@ mod native_vp_host_env {
271271
( $fn:ident ( $($arg:ident : $type:ty),* $(,)?) -> $ret:ty ) => {
272272
concat_idents!(extern_fn_name = namada, _, $fn {
273273
#[no_mangle]
274-
extern "C" fn extern_fn_name( $($arg: $type),* ) -> $ret {
274+
extern "C-unwind" fn extern_fn_name( $($arg: $type),* ) -> $ret {
275275
with(|TestVpEnv {
276276
addr,
277277
state,

0 commit comments

Comments
 (0)