Skip to content

Releases: AndreiPashkin/compose-idents

v0.3.0

04 Sep 14:05

Choose a tag to compare

v0.3.0 - 2025-09-04

Added

  • Introduced new code-repetition capability, that allows to produce multiple variations of user-supplied Rust code
    using for ... in ... syntax.
  • Introduced a type system, overloaded functions, new type casting functions - this would allow users to use much wider
    range of values, up to entirely arbitrary sequences of tokens. Previously values were limited only to idents.
  • Introduced an alternative attribute-style invocation form #[compose_items(...)].
  • Introduced new compose! macro as the preferred entry point (functionally identical to the previous
    compose_idents!).
  • MSRV has been set to 1.80.0.
  • Added syntax reference to the documentation.
  • Added migration guides for deprecated features.
  • Made it possible to escape percent signs when formatting strings by using %% syntax.
  • Added normalize2(...), an evaluated variant of normalize(...) that accepts ident, str, int, path, type,
    expr, or tokens and returns a normalized ident (unlike normalize(...), which consumes raw tokens).

Changed

  • Error messages made to be more precise and informative.
  • Made string formatting syntax more human-readable by enabling % alias %-style placeholders (with whitespace).
  • Reworked introductory examples in the documentation.
  • Significantly expanded project's test suite.
  • Harden the testing of support for both MSRV and stable Rust versions and of usage of the library as a dependency.

Deprecated

  • compose_idents! macro has been deprecated in favor of functionally identical compose!.

Removed

  • ⚠️ BREAKING: Dropped the deprecated bracket-based alias-definition syntax support.

  • ⚠️ BREAKING: Removed interchangeable use of literal strings and ident arguments in functions that accept both.

    Type system and overloaded functions should take care of most use-cases and if necessary - use casting functions:
    to_ident(), to_str(), etc.

v0.2.2

16 Jun 12:05

Choose a tag to compare

v0.2.2 - 2025-06-16

Fixed

  • Minor documentation fixes.

v0.2.1

13 Jun 18:57

Choose a tag to compare

v0.2.1 - 2025-06-13

Fixed

  • Corrected the syntax section in the docs for compose_idents! macro - made it up to date with the recent major
    syntax change that deprecated the bracket-based syntax in favor of expression-based one.
  • Minor internal changes.

v0.2.0

11 Jun 22:03

Choose a tag to compare

v0.2.0 - 2025-06-11

Added

  • It is now possible to define aliases directly from expressions without surrounding brackets,
    for example: alias = expr or alias = concat(arg1, arg2, ...). The old syntax will continue to work, but will
    emit a deprecation warning.
  • New concat() function that concatenates multiple arguments together.
  • Deprecation warning mechanism has been added. Now if a user uses something that is deprecated, the macro
    will try to attach #[deprecated(...)] attribute to the generated code if it's possible.

Changed

  • Refactored the reference - split a single big usage example into commented thematic Markdown sections.
  • Added a minimal example into the beginning of the documentation.
  • Stripped redundant top-level heading in docs.rs so that level-3 headings ("Functions", "Alias reuse", etc.) are now
    visible in the sidebar.
  • Significantly reworked the internal code making it more extensible. Made a lot of smaller fixes and refactorings.
  • ⚠️ BREAKING: case-conversion functions - snake_case(), camel_case(), pascal_case() have been re-implemented
    using the excellent heck crate. It will bring more correctness but also might introduce some small changes in
    how these functions work.

Deprecated

  • Deprecated alias = [arg1, arg2, ...] syntax in favor of expression-based: alias = concat(arg1, arg2, ...) or
    alias = upper(arg) or alias = arg, etc.

Fixed

  • Fixed a bug in normalize() function that could append an extra trailing underscore to the result.
  • Fixed a bug where certain inputs (like Result<T, E>) could be erroneously rejected by normalize().

v0.1.1

22 May 03:33

Choose a tag to compare

v0.1.1 - 2025-05-22

Added

Changed

  • Make argument parsing more robust. In particular make compose_idents! not fail with arguments such as
    normalize(Foo::Bar), where Foo::Bar is an enum variant or anything else that could be ambiguously interpreted
    if not parsed until the end of the token (for example Foo::Bar could be interpreted as an ident Foo and ::Bar
    as a next completely different token).

Removed

v0.1.0

19 May 02:57

Choose a tag to compare

v0.1.0 - 2025-05-19

Added

  • Explicitly restricted defining duplicate aliases.
  • Made it possible to re-use previously defined aliases as parts of definitions of subsequent aliases.
  • Introduce the normalize() function, which transforms arbitrary token sequences into valid identifiers.
    Makes it possible to use things like &'static str in identifiers.

Changed

  • Made it possible to pass arbitrary token sequences as arguments.

Removed

v0.0.7

21 Apr 23:26

Choose a tag to compare

v0.0.7 - 2025-04-22

Added

Changed

  • Fixed a critical bug - incorrectly configured feature flags of "syn" dependency.

Removed

v0.0.6

20 Apr 03:05

Choose a tag to compare

v0.0.6 - 2025-04-20

Added

  • New pascal_case() function.

Changed

Removed

v0.0.5

19 Apr 22:39

Choose a tag to compare

v0.0.5 - 2025-04-20

Added

Changed

  • Semicolon as the argument separator has been replaced with comma. Semicolon support
    has been preserved for backwards-compatibility.
  • Fixed edge case bugs in the snake_case and camel_case functions.

Removed

v0.0.4

21 Mar 04:52

Choose a tag to compare

v0.0.4 - 2025-03-21

Added

  • Documented functions and added more clarity to the docs in general.
  • Updated syn version to 2.
  • Fixed handling of trailing semicolons in the macro.
  • Introduced string formatting with %alias% syntax useful for generating doc-attributes.

Changed

Removed