Skip to content

Release v1.2.0#708

Merged
kris-jusiak merged 9 commits into
boost-ext:masterfrom
PavelGuzenfeld:docs/since-v1.1.13
Jun 1, 2026
Merged

Release v1.2.0#708
kris-jusiak merged 9 commits into
boost-ext:masterfrom
PavelGuzenfeld:docs/since-v1.1.13

Conversation

@PavelGuzenfeld
Copy link
Copy Markdown
Contributor

@PavelGuzenfeld PavelGuzenfeld commented May 31, 2026

Release v1.2.0 — finalizes everything merged since v1.1.13 and prepares the tag.

Why 1.2.0 (minor, not patch): this release introduces new public API
(sm::flush_queue, sml::clear_defer, sml::deps<Ts...>, sml::make_action) and
changes observable behavior (empty-SM sizeof under #249), so it warrants a minor
bump per semver.

Version bump (:arrow_up: v1.2.0)

  • BOOST_SML_VERSION 1'1'131'2'0; inline namespace v1_1_13v1_2_0
  • CMakeLists.txt package version 1.1.131.2.0
  • doc/CHANGELOG.md entry finalized as [1.2.0] - 2026-06-01; README TOC regenerated
  • get_type_name offsets retuned for the 1-char-shorter namespace (MSVC 65→64,
    GCC 69→68, IAR 72→71; clang elides the inline namespace so it is unchanged) — the
    shortened namespace otherwise broke test_type_traits/test_policies_logging.

What's in the release

New API

Behavior changes

Bug fixes

Template-depth, -Wshadow, -Wextra-semi, UBSan, final-class, null-deref, double-pop, reserved-identifier and related fixes — full list: v1.1.13...v1.2.0

Documentation

  • CHANGELOG / overview / user_guide / tutorial / faq — document all of the above (Configuration macro table, flush_queue, deps, defer/clear_defer, make_action, and the on_entry<_> / operator, limitations).
  • Code polish (docs: document pool mechanism design, try_get overload order, and bug history #697-style): high-level comments in sml.hpp explaining the new API — make_action/action_wrap, clear_defer, the explicit_deps/deps policy, and flush_queue — so the rationale and issue cross-references live next to the code. No functional change.
  • "Run on Compiler Explorer" links beside every ![CPP] embed (plus a standalone make_action link). Links use Compiler Explorer's client-side #include-from-URL so the editor shows the example itself (the header is fetched from the raw GitHub URL on open), rather than inlining ~3600 lines. Each was validated by compiling its fully-inlined equivalent (GCC 14.2, -std=c++14; arduino c++20; error demos compile-only, showing their diagnostic). Regenerable via doc/scripts/gen_godbolt_links.sh.
  • Fixed the dead in-page "Compile & Run" buttons (boost-modern theme): http://melpon.org/wandboxhttps://wandbox.org/api/compile.json, drop the invalid boost-1.60 option, supply dispatch_table.hpp, fix the footer link.

Also: pre-existing broken doc links fixed

  • user_guide.md: example/action_guards.cppexample/actions_guards.cpp (typo)
  • user_guide.md: example/errors/not_*.cpptest/ft/errors/not_*.cpp (directory doesn't exist)

Post-merge

Tag v1.2.0 on the merge commit so the v1.1.13...v1.2.0 changelog link resolves.

@PavelGuzenfeld PavelGuzenfeld changed the title docs: document API and behavior changes since v1.1.13 Release v1.2.0 May 31, 2026
PavelGuzenfeld added a commit to PavelGuzenfeld/sml that referenced this pull request May 31, 2026
The v1.1.13 -> v1.2.0 inline-namespace rename (v1_1_13 -> v1_2_0) shortened the
namespace string by one character. get_type_name() skips a hardcoded prefix
length into __FUNCSIG__/__PRETTY_FUNCTION__, and that prefix includes the inline
namespace on MSVC/GCC/IAR (clang elides it). The stale offsets made
get_type_name<int>() return the wrong substring, failing test_type_traits (all
compilers) and test_policies_logging (GCC).

Adjust the affected offsets by -1: MSVC 65->64, GCC 69->68, IAR 72->71; clang
(50/63) is namespace-length-independent and unchanged. GCC 68 matches the
pre-1.1.10 value for a 6-char namespace.

Verified: full ctest suite 68/68 on GCC (C++17); MSVC type_traits passes under
msvc-wine (and fails at offset 65, confirming 64). Added a comment so the offsets
are re-tuned on future namespace-length changes.

Fixes CI on PR boost-ext#708 (ubuntu g++, windows MSVC).
- CHANGELOG: new entry covering flush_queue, clear_defer, deps policy,
  min-size default flip, and other behavior changes since v1.1.13
- overview: document config macros (min-size opt-in, exceptions, default-
  constructible deps) and the sizeof(sm) behavior change (boost-ext#249)
- user_guide: add sm::flush_queue() (boost-ext#456) and sml::deps<Ts...> policy (boost-ext#437)
- tutorial: document defer/clear_defer (boost-ext#643) and flush_queue usage
- faq: seed with on_entry<_> multi-TU limitation (boost-ext#565) and operator,
  two-MFP limitation + wrap() workaround (boost-ext#389)

make_action (boost-ext#629) intentionally omitted; it ships with open PR boost-ext#706.
Every example in the docs is verified to compile + run at -std=c++14 (GCC 14.3
locally in Docker, incl. SDL2 for sdl2.cpp; arduino compiles to an empty main
without Arduino.h) and on Compiler Explorer (GCC 14.2). A 'Run on Compiler
Explorer' link is added beside each ![CPP] embed across examples.md, tutorial.md,
user_guide.md, index.md and overview.md (65 links total).

Since Boost.SML is not a Compiler Explorer library, each link inlines sml.hpp
(and dispatch_table.hpp where used); BOOST_SML_* config macros are hoisted above
the header so they still apply (e.g. data.cpp). The error/* examples get
compile-only links that show their intended diagnostic.

Also fixes broken doc links:
- user_guide.md: example/action_guards.cpp -> example/actions_guards.cpp (typo)
- user_guide.md: example/errors/not_*.cpp -> test/ft/errors/not_*.cpp (wrong path)

Adds doc/scripts/gen_godbolt_links.sh to regenerate the links reproducibly.
The in-page 'Compile & Run' buttons POSTed to http://melpon.org/wandbox
(plain HTTP -> mixed-content blocked on the HTTPS site, and a dead host).

- Repoint to https://wandbox.org/api/compile.json (alive; sends
  Access-Control-Allow-Origin: * so the cross-origin XHR works).
- Drop the now-invalid 'boost-1.60' compile option (it makes the API reject
  the request; SML has no Boost dependency anyway).
- Supply boost/sml/utility/dispatch_table.hpp alongside boost/sml.hpp so the
  dispatch_table and sdl2 examples also run.
- Update the 'Powered by Wandbox' footer link to https://wandbox.org.

Verified end-to-end against the live API at -std=c++14 (clang-head):
hello_world, composite, data, transitions, dispatch_table and sdl2 all
return status 0 (sdl2 prints its expected output).
- Run doc/scripts/update_readme_toc.py so the README's auto-generated table of
  contents reflects the new FAQ 'Limitations' section and the '[Unreleased] -
  since 1.1.13' CHANGELOG entry.
- Adjust faq.md heading levels (page title -> h1) so the generator does not emit
  a redundant 'FAQ' child entry under the FAQ link.
Cut the next release. Minor bump (not patch): this release adds new public API
(sm::flush_queue, sml::clear_defer, sml::deps<Ts...>) and changes observable
behavior (empty-SM sizeof under boost-ext#249), so it is 1.2.0 per semver.

- BOOST_SML_VERSION 1'1'13 -> 1'2'0; inline namespace v1_1_13 -> v1_2_0
- CMakeLists package version 1.1.13 -> 1.2.0
- CHANGELOG: finalize the entry as [1.2.0] - 2026-06-01 (compare link -> v1.2.0)
- README: regenerate documentation TOC for the 1.2.0 changelog entry
The v1.1.13 -> v1.2.0 inline-namespace rename (v1_1_13 -> v1_2_0) shortened the
namespace string by one character. get_type_name() skips a hardcoded prefix
length into __FUNCSIG__/__PRETTY_FUNCTION__, and that prefix includes the inline
namespace on MSVC/GCC/IAR (clang elides it). The stale offsets made
get_type_name<int>() return the wrong substring, failing test_type_traits (all
compilers) and test_policies_logging (GCC).

Adjust the affected offsets by -1: MSVC 65->64, GCC 69->68, IAR 72->71; clang
(50/63) is namespace-length-independent and unchanged. GCC 68 matches the
pre-1.1.10 value for a 6-char namespace.

Verified: full ctest suite 68/68 on GCC (C++17); MSVC type_traits passes under
msvc-wine (and fails at offset 65, confirming 64). Added a comment so the offsets
are re-tuned on future namespace-length changes.

Fixes CI on PR boost-ext#708 (ubuntu g++, windows MSVC).
boost-ext#706 (sml::make_action<Deps...>, issue boost-ext#629) is now merged into master, so this
rebases onto it and documents it:
- CHANGELOG: add make_action to the 1.2.0 additions
- user_guide: new 'make_action [utility]' reference section with a verified run-link
- tutorial: note make_action in the guards/actions section
- README: regenerate TOC (adds the make_action entry)

Regenerate every Compiler Explorer link against the v1.2.0 header (inline namespace
v1_2_0) and re-verify each compiles + runs at -std=c++14 on godbolt (arduino c++20);
replace the stale v1_1_13-era links across examples/tutorial/user_guide/index/overview.

Also fix a bug in gen_godbolt_links.sh exposed during regeneration: the config-macro
hoist strip (#define BOOST_SML*) was applied to dispatch_table.hpp too, deleting its
deliberate re-#define of BOOST_SML_DETAIL_REQUIRES (sml.hpp #undef's it before that
point) and breaking the dispatch_table/sdl2 links. Strip only the sml.hpp include
from dispatch_table.hpp; keep its #define/#undef. The standalone make_action link is
now preserved across --insert re-runs.
Replace the inlined-header Godbolt links with thin ones that keep the example
source intact and pull the header via Compiler Explorer's client-side
#include-from-URL feature:

  #include <https://raw.githubusercontent.com/boost-ext/sml/master/include/boost/sml.hpp>

CE fetches and pastes the header in the browser when the link is opened (this is
NOT resolved by the compile API, which is why links are validated by compiling
the fully-inlined equivalent instead). Sources shrink from ~3600 lines to the
example itself (hello_world 101 lines, 1 include).

dispatch_table.hpp does a relative #include "boost/sml.hpp" that CE's fetcher
cannot resolve, so for dispatch_table and sdl2 the small utility header is inlined
with its own sml.hpp include rewritten to the URL form (still no 3600-line header).

All 25 examples + 4 error demos + make_action validated via their fully-inlined
equivalents (GCC 14.2, -std=c++14; arduino c++20) before linking. gen_godbolt_links.sh
updated to emit the thin form.
@PavelGuzenfeld PavelGuzenfeld marked this pull request as ready for review June 1, 2026 13:59
In the spirit of boost-ext#697, add high-level comments explaining the v1.2.0 additions
so contributors don't have to reverse-engineer them:
- make_action / action_wrap — why generic/constrained callables need an explicit
  signature for function_traits to read (boost-ext#629)
- clear_defer — counterpart to defer; clear the defer queue on scope exit (boost-ext#643)
- explicit_deps policy + get_explicit_deps — why a dep reached only via a generic
  lambda is dropped from the pool, and how sml::deps<Ts...> widens it (boost-ext#437)
- flush_queue (impl + public entry) — draining events queued after process_event
  returned, e.g. from an async back::process<> handle (boost-ext#456)

Comments only; full suite 69/69 on GCC 14 (C++17).
@kris-jusiak kris-jusiak merged commit 7e25a8a into boost-ext:master Jun 1, 2026
5 checks passed
kris-jusiak pushed a commit that referenced this pull request Jun 1, 2026
The v1.1.13 -> v1.2.0 inline-namespace rename (v1_1_13 -> v1_2_0) shortened the
namespace string by one character. get_type_name() skips a hardcoded prefix
length into __FUNCSIG__/__PRETTY_FUNCTION__, and that prefix includes the inline
namespace on MSVC/GCC/IAR (clang elides it). The stale offsets made
get_type_name<int>() return the wrong substring, failing test_type_traits (all
compilers) and test_policies_logging (GCC).

Adjust the affected offsets by -1: MSVC 65->64, GCC 69->68, IAR 72->71; clang
(50/63) is namespace-length-independent and unchanged. GCC 68 matches the
pre-1.1.10 value for a 6-char namespace.

Verified: full ctest suite 68/68 on GCC (C++17); MSVC type_traits passes under
msvc-wine (and fails at offset 65, confirming 64). Added a comment so the offsets
are re-tuned on future namespace-length changes.

Fixes CI on PR #708 (ubuntu g++, windows MSVC).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants