Skip to content

Add Generator for RegisterServices#17

Merged
lunny merged 1 commit intolunny:lunny/servicesfrom
zeripath:lunny-services-generate
Apr 11, 2021
Merged

Add Generator for RegisterServices#17
lunny merged 1 commit intolunny:lunny/servicesfrom
zeripath:lunny-services-generate

Conversation

@zeripath
Copy link

This PR adds a reusable services generator that will create an init import file.

Signed-off-by: Andrew Thornton art27@cantab.net

Signed-off-by: Andrew Thornton <art27@cantab.net>
@zeripath
Copy link
Author

So the generated file probably should be .gitignored

And we may need to make the generator a little bit more general to permit passing in the base package name.

It may also need some globbing support to make the excludes and includes a bit better too.

However it's pretty usable as is.

What's really interesting is the possibilities for this beyond this use.

modules/queue could be restructered with that directory simply containing the interfaces and a registry of known implementations. The manager would be moved to manager along with a generated provider importer, and the providers all within their own directories and so on

@lunny lunny merged this pull request into lunny:lunny/services Apr 11, 2021
@zeripath zeripath deleted the lunny-services-generate branch April 11, 2021 06:46
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