Skip to content

New Autoconfigure annotations#387

Merged
Blacksmoke16 merged 14 commits intomasterfrom
autoconfigure-annotation
Apr 6, 2024
Merged

New Autoconfigure annotations#387
Blacksmoke16 merged 14 commits intomasterfrom
autoconfigure-annotation

Conversation

@Blacksmoke16
Copy link
Member

@Blacksmoke16 Blacksmoke16 commented Apr 5, 2024

  • Replaces the ADI.auto_configure macro with ADI::Autoconfigure annotation
    • Can be placed on a parent type and/or module interface to accomplish the same things, while being closer to the related code
    • This does remove the compile time error check when you use an unexpected tag, but with the new bundle system, this is probably for the best
  • Introduces a new ADI::AutoconfigureTag annotation to make setting up tagged services easier
    • Accepts a tag name as the first positional argument, or defaults to FQN of the module/type if not provided
  • Introduces a new ADI::TaggedIterator annotation to make using tagged services easier
    • Expects to be added to a (Iterator, Enumerable, or Indexable) collection type parameter
    • Accepts a tag name as the first positional argument, or defaults to the FQN of the type from the collection's generic arg

Resolves part of #385

@Blacksmoke16 Blacksmoke16 marked this pull request as ready for review April 6, 2024 13:58
@Blacksmoke16 Blacksmoke16 merged commit c67f573 into master Apr 6, 2024
@Blacksmoke16 Blacksmoke16 deleted the autoconfigure-annotation branch April 6, 2024 14:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

1 participant