Skip to content

Releases: sam0x17/macro_magic

v0.5.1

04 Jul 14:39
4093d3b
Compare
Choose a tag to compare
  • upgrade derive-syn-parse to 2.0 so syn is fully upgraded to 2.0 now (thanks @jmg-duarte!)
  • clean up some warnings
  • apply some clippy fixes, a few of which will boost performance a tiny tiny tiny bit

v0.5.0

10 Oct 16:53
3b21163
Compare
Choose a tag to compare

Previous release should have been a major release because breaking change, 0.4.3 will be yanked and replaced with this 0.5.0

v0.4.3

10 Oct 05:11
e5ebe09
Compare
Choose a tag to compare

Adds ability to have the auto-generated export_tokens macro name match the name of the exported item, since apparently this does not cause a conflict (#13, thanks @gupnik!)

v0.4.2

24 Jul 16:56
eea86e6
Compare
Choose a tag to compare

Adds a stronger uniqueness guarantee to new_unique_export_tokens_ident by incorporating a compilation-unique tag.

This will resolve situations where crates using separate instances of macro_magic that happen to have #[export_tokens] declarations that use the same name and happen to have the same COUNTER value are glob imported into the same module/scope.

Though these scenarios are already exceedingly rare, after this change for this to happen again two separate macro_magic compilations would also have to have their COMPILATION_TAG: u32 value collide, which is as unlikely as two random u32 values colliding, in addition to all of the other collision requirements laid out above. So this shouldn't be an issue anymore for anyone. If it does happen, you can rest assured it will go away after a fresh compile unless the universe truly despises you.

v0.4.1

13 Jun 13:17
e9e8d35
Compare
Choose a tag to compare
  • fixes mm_override_path / MACRO_MAGIC_ROOT with leading :: not always working
  • fixes user-provided Expr not being isolated from our imports

(#10 / #11)

v0.4.0

13 Jun 04:16
7a69251
Compare
Choose a tag to compare

This release contains breaking changes.

Deprecations/Removals:

  • #[use_attr] has been removed
  • #[use_proc] has been removed
  • pretty_print feature has been removed. For a better alternative see my proc-utils crate.
  • Ability to access #[export_tokens] that would normally be inaccessible due to private modules or inaccessible path has been removed

New Features

  • #[import_tokens_proc] and #[import_tokens_attr] now no longer need #[use_attr] and #[use_proc] to be brought into scope properly or re-exported, thanks to a new self-calling macro structure.
  • The MACRO_MAGIC_ROOT/mm_override_path can now also be overridden on #[import_tokens_proc] and #[import_tokens_attr] by passing a path or an expr (the expr option is new). The expr must evaluate to something compatible with Into<String> and must contain a valid path to a macro_magic re-export.
  • New expansion strategy for #[export_tokens] which allows for multiple items with the same name in the same crate (but not at the same path) and enables streamlined importing and re-exporting of macros created via macro_magic,
  • Improved docs for internal items in the core crate
  • Improved docs for custom parsing
  • Additional doc examples

v0.3.5

05 Jun 03:47
a8bfb78
Compare
Choose a tag to compare

Now properly throws a compile error at parsing time when a non-path is passed in the place of mm_override_path

v0.3.4

05 Jun 03:46
51561b9
Compare
Choose a tag to compare
  • Fixes crates.io badge
  • hotfix to add #[doc(hidden)] to #[export_tokens] generated macro

v0.3.3

26 Apr 04:18
9f48142
Compare
Choose a tag to compare
  • adds #[with_custom_parsing(..)] attribute to be used in tandem with #[import_tokens_attr]
  • updates docs and examples accordingly
  • fixes CI not covering basic cargo test with no features enabled
  • some general cleanup and enhancements
  • docs tweaks
  • README tweaks

v0.3.2

22 Apr 05:19
adf4106
Compare
Choose a tag to compare

Exposes #[export_tokens_no_emit] from the crate root.