Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chore: Making the public API interface of grate more maintainable beore exposing as a nuget package #437

Merged
merged 2 commits into from
Feb 12, 2024

Conversation

erikbra
Copy link
Owner

@erikbra erikbra commented Feb 12, 2024

When exposing grate as a nuget package, all of the source code is effectively a "user interface", as opposed to when we only publish the command line artifact, where the command line is the only user interface.

We don't want a huge API interface that users start to use and rely on, that we have to keep stable, so I narrowed down the number of public types significantly (hope I didn't go too far).

In addition, I changed the unit tests to use the DI builders, so that we know that we support a lot of common usage scenarios (which I hope the unit tests represent).

Some highlights:

  • Use TryAddTransient and ..Singleton to avoid concurrency issues in dependency registration
  • Removed ServiceCollection from GrateConfgurationBuilder
  • Rewrote unit tests to use dependency injection - getting a feel on how it is to use

…ore exposing as a nuget package

When exposing grate as a nuget package, all of the source code is effectively a "user interface",
as opposed to when we only publish the command line artifact, where the command line is the only
user interface.

We don't want a huge API interface that users start to use and rely on, that we have to keep stable,
so I narrowed down the number of public types significantly (hope I didn't go too far).

In addition, I changed the unit tests to use the DI builders, so that we know that we support a lot
of common usage scenarios (which I hope the unit tests represent).

Some highlights:

* Use TryAddTransient and ..Singleton to avoid concurrency issues in dependency registration
* Removed ServiceCollection from GrateConfgurationBuilder
* Rewrote unit tests to use dependency injection - getting a feel on how it is to use
@erikbra erikbra changed the title Chore: Making the public API interface of grate more maintainable bef… Chore: Making the public API interface of grate more maintainable beore exposing as a nuget package Feb 12, 2024
@erikbra erikbra marked this pull request as ready for review February 12, 2024 18:01
@erikbra erikbra self-assigned this Feb 12, 2024
@erikbra erikbra merged commit eacf216 into main Feb 12, 2024
17 of 18 checks passed
@erikbra erikbra deleted the chore/more-cleanups-before-public-api branch February 12, 2024 18:03
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.

1 participant