Skip to content

Latest commit

 

History

History
218 lines (147 loc) · 8.34 KB

File metadata and controls

218 lines (147 loc) · 8.34 KB

Changelog

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.

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).
  • Clarified the deprecation policy.
  • Significantly refactored the project to improve modularity.
  • Significantly expanded test coverage and reworked the test suite.
  • Reworked introductory examples in the documentation.
  • 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 - 2025-06-16

Fixed

  • Fixed outdated alias definition instructions in the documentation.
  • Fix grammar in the documentation.

v0.2.1 - 2025-06-13

Fixed

  • Fixed Combined parser-combinator helper type and combine! macro.
  • 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.
  • Added publish task to the Taskfile.yml for convenient publishing new versions of the crate.

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.
  • Refactored deprecation mechanism - so that it is fully encapsulated within a single module and has a concise external API.
  • Hardened parsing of alias values.
  • ⚠️ 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 with snake_case() when CamelCase was converted to c_amel_case instead of camel_case.
  • 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 - 2025-05-22

Fixed

  • Fixed argument parsing so that compose_idents! doesn't 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).

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.

v0.0.7 - 2025-04-22

Fixed

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

v0.0.6 - 2025-04-20

Added

  • New pascal_case() function.

v0.0.5 - 2025-04-20

Changed

  • Semicolon as the alias-definition terminator symbol has been replaced with comma. Semicolon support has been preserved for backwards-compatibility.

Deprecated

  • Deprecated usage of a semicolon as a terminator-symbol for alias-definitions.

Fixed

  • Fixed edge case bugs in the snake_case and camel_case functions.

v0.0.4 - 2025-03-21

Added

  • Documented functions and add more clarity to the docs in general.
  • Introduced string formatting with %alias% syntax useful for generating doc-attributes.

Changed

  • Updated syn version to 2.

Fixed

  • Fixed handling of trailing semicolons in the macro.

v0.0.3 - 2025-02-11

Added

  • Added "functions" functionality that allows to apply functions over arguments.
  • Made it possible to pass integers as arguments.
  • Added upper(), lower(), snake_case() and camel_case() functions for case-manipulation.
  • Added hash() function that hashes an input value deterministically within the scope of a single macro invocation.

Fixed

  • Docs/tests fixes.

v0.0.2 - 2025-02-05

Added

  • New tests.
  • Support for specifying types as parts for the composed identifiers.
  • Crates.io/Docs.rs badges to the README.md.

v0.0.1 - 2025-01-22

Added

  • README.md with the roadmap.
  • .gitignore file.
  • pre-commit config.
  • Task config.
  • Basic implementation of the compose-idents macro.
  • GitHub CI setup.

Changed

Removed