Skip to content

Commit 9386c86

Browse files
committed
Bump to v2.0.0
1 parent 6e15a7d commit 9386c86

File tree

2 files changed

+93
-7
lines changed

2 files changed

+93
-7
lines changed

CHANGELOG.md

Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
- [libassert 2.0.0](#libassert-200)
12
- [libassert 2.0.0-beta](#libassert-200-beta)
23
- [libassert 2.0.0-alpha](#libassert-200-alpha)
34
- [libassert 1.2.2](#libassert-122)
@@ -6,6 +7,94 @@
67
- [libassert 1.1](#libassert-11)
78
- [libassert 1.0 🎉](#libassert-10-)
89

10+
## libassert 2.0.0
11+
12+
Changes since v1:
13+
14+
**Assertion macros:**
15+
- Replaced the previous `ASSERT`/`VERIFY` nomenclature with `DEBUG_ASSERT` and `ASSERT`
16+
- Updated assertion macros to no longer return a value by default
17+
- Debug-only assertions no longer have to evaluate the assertion expression, and removed `NO_ASSERT_RELEASE_EVAL`
18+
- Added `DEBUG_ASSERT_VAL`, `ASSERT_VAL`, and `ASSUME_VAL` variants that return values
19+
- Added `PANIC` and `UNREACHABLE`
20+
- Added `LIBASSERT_PREFIX_ASSERTIONS` option to only add assertion macros with a `LIBASSERT_` prefix
21+
22+
**Assertion behavior:**
23+
- Removed default throwing behavior for some assertion failures, all assertions now abort by default
24+
- Removed `libassert::verification_failure`
25+
- Removed non-fatal assertions
26+
27+
**Custom failure handlers:**
28+
- Removed macro-based custom assertion failure handler system
29+
- Added `libassert::set_failure_handler`
30+
- Removed default safe signed-unsigned comparison behavior
31+
- Added `LIBASSERT_SAFE_COMPARISONS` to opt into safe signed-unsigned comparisons
32+
- Simplified assertion failure handler signatures
33+
34+
**Assertion information:**
35+
- Removed `libassert::assertion_printer`
36+
- Added `libassert::assertion_info` with much more comprehensive information and methods for working with assertion
37+
information
38+
39+
**Testing library support:**
40+
- Added Catch2 and GoogleTest integrations
41+
42+
**Library structure:**
43+
- Removed `libassert::utility` and `libassert::config` namespaces
44+
- Updated the library's cmake target name to `libassert::assert`
45+
- Updated the library's header to `<libasssert/assert.hpp>`
46+
47+
**Configuration:**
48+
- Added configuration for literal formatting
49+
- Added configuration for path shortening modes
50+
- Added setting for output separator with `libassert::set_separator`
51+
- Removed `libassert::set_color_output` and `libassert::set_rgb_output`
52+
- Added `libassert::set_color_scheme`
53+
54+
**Stringification:**
55+
- Improved stringification generation to handle more types and better decide when there is useful information to print
56+
- Added stringification customization point instead of relying on `operator<<(std::ostream, const T&)`
57+
- Added `LIBASSERT_NO_STRINGIFY_SMART_POINTER_OBJECTS` option
58+
- Added limit to the number of items stringified for containers
59+
- Added {fmt} support with `LIBASSERT_USE_FMT`
60+
61+
**Utilities:**
62+
- Added `libassert::enable_virtual_terminal_processing_if_needed()` to the public interface
63+
- Added `libassert::isatty` to the public interface as well as stdin/stdout/stderr constants
64+
- Updated `libassert::stacktrace` to take color scheme and skip parameters
65+
- Removed `libassert::replace_rgb`
66+
- Removed `libassert::strip_colors`
67+
68+
**Output:**
69+
- Improved stacktrace format to make "click to jump to source" possible in some IDEs
70+
71+
**Analysis:**
72+
- Type prettifying
73+
- Added normalization for `std::__cxx11::` to to `std::`
74+
- Added normalization for msvc ``​`anonymous namespace'`` to `(anonymous namespace)`
75+
- Overhauled C++ tokenizer to use a much better implementation
76+
77+
**Bug fixes:**
78+
- Resolved long-standing crash caused by libc++'s std::regex implementation
79+
80+
**Internal improvements:**
81+
- Improved how data is stored in `binary_diagnostics_descriptor`, `assert_static_parameters`, and `assertion_info`
82+
- Improved internal argument processing
83+
- Improved assertion macro expansion
84+
- Added C++23 specialization for how static assertion information is stored which is hopefully faster for compile times
85+
- Improved handling of literal formatting
86+
- Removed the global lock used while processing assertions
87+
- Improved assertion processing logic
88+
- Lots of internal refactoring, cleanup, and changes to improve maintainability
89+
- Overhauled CMake thanks to a contributor, fixing a lot of issues and greatly improving the setup
90+
- Removed need for user to manually specify `LIBASSERT_STATIC` if using the project with cmake and a static build
91+
- Magic enum is now grabbed with FetchContent or externally from an existing install or package manager
92+
- Resolved inconsistent use of `ASSERT` vs `LIBASSERT` for the library's macro prefix
93+
- Updated internal error handling to use cpptrace exceptions
94+
- Added cmake integration testing on mingw to CI
95+
- General CI improvements
96+
- General testing improvements
97+
998
## libassert 2.0.0-beta
1099

11100
Changes:

README.md

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,6 @@
1212

1313
<p align="center">The most over-engineered C++ assertion library</p>
1414

15-
> [!IMPORTANT]
16-
> The current page corresponds to a pre-release for version 2.0. For version 1 refer to https://github.com/jeremy-rifkin/libassert/tree/v1.2.2.
17-
1815
## Table of Contents: <!-- omit in toc -->
1916
- [30-Second Overview](#30-second-overview)
2017
- [CMake FetchContent Usage](#cmake-fetchcontent-usage)
@@ -116,7 +113,7 @@ include(FetchContent)
116113
FetchContent_Declare(
117114
libassert
118115
GIT_REPOSITORY https://github.com/jeremy-rifkin/libassert.git
119-
GIT_TAG v2.0.0-beta # <HASH or TAG>
116+
GIT_TAG v2.0.0 # <HASH or TAG>
120117
)
121118
FetchContent_MakeAvailable(libassert)
122119
target_link_libraries(your_target libassert::assert)
@@ -805,7 +802,7 @@ include(FetchContent)
805802
FetchContent_Declare(
806803
libassert
807804
GIT_REPOSITORY https://github.com/jeremy-rifkin/libassert.git
808-
GIT_TAG v2.0.0-beta # <HASH or TAG>
805+
GIT_TAG v2.0.0 # <HASH or TAG>
809806
)
810807
FetchContent_MakeAvailable(libassert)
811808
target_link_libraries(your_target libassert::assert)
@@ -820,7 +817,7 @@ information.
820817

821818
```sh
822819
git clone https://github.com/jeremy-rifkin/libassert.git
823-
git checkout v2.0.0-beta
820+
git checkout v2.0.0
824821
mkdir libassert/build
825822
cd libassert/build
826823
cmake .. -DCMAKE_BUILD_TYPE=Release
@@ -856,7 +853,7 @@ you when installing new libraries.
856853

857854
```ps1
858855
git clone https://github.com/jeremy-rifkin/libassert.git
859-
git checkout v2.0.0-beta
856+
git checkout v2.0.0
860857
mkdir libassert/build
861858
cd libassert/build
862859
cmake .. -DCMAKE_BUILD_TYPE=Release

0 commit comments

Comments
 (0)