Skip to content

Commit

Permalink
Fix ABI changes
Browse files Browse the repository at this point in the history
  • Loading branch information
saraedum committed Jan 4, 2022
1 parent 2defe2b commit 1421a4f
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 1 deletion.
30 changes: 30 additions & 0 deletions recipe/0001-Restore-FMT_API-on-error_handler-on_error.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
From 5a05cb93f34bb1bf8d7084b5adede29251c878d6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Julian=20R=C3=BCth?= <julian.rueth@fsfe.org>
Date: Tue, 4 Jan 2022 00:37:58 -0600
Subject: [PATCH] Restore FMT_API on error_handler::on_error()

this fixes a breaking ABI change that was introduce in the upgrade from
8.0.1 to 8.1.0.

Fixes #2695.
---
include/fmt/core.h | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/include/fmt/core.h b/include/fmt/core.h
index c946e12a..bdf51a4a 100644
--- a/include/fmt/core.h
+++ b/include/fmt/core.h
@@ -601,7 +601,8 @@ struct error_handler {
constexpr error_handler(const error_handler&) = default;

// This function is intentionally not constexpr to give a compile-time error.
- void on_error(const char* message) { throw_format_error(message); }
+ // This function is marked as FMT_API for backwards compatibility, see #2695.
+ FMT_NORETURN FMT_API void on_error(const char* message) { throw_format_error(message); }
};
FMT_END_DETAIL_NAMESPACE

--
2.34.1

5 changes: 4 additions & 1 deletion recipe/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,12 @@ package:
source:
url: https://github.com/fmtlib/fmt/archive/{{ version }}.tar.gz
sha256: {{ sha256 }}
patches:
# Backport https://github.com/fmtlib/fmt/pull/2696
- 0001-Restore-FMT_API-on-error_handler-on_error.patch

build:
number: 0
number: 1
skip: true # [win and vc<14]
run_exports:
- {{ pin_subpackage('fmt', max_pin='x') }}
Expand Down

0 comments on commit 1421a4f

Please sign in to comment.