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

fix!: Rename namespace from OpenFeature.SDK to OpenFeatureSDK #62

Merged
merged 1 commit into from
Sep 22, 2022

Conversation

benjiro
Copy link
Member

@benjiro benjiro commented Sep 22, 2022

Discovered when implementing a provider, I noticed due conflict with OpenFeature.SDK namespace and the singleton class being called OpenFeature.
It requires the full namespace to use the OpenFeature singleton.

Avoid this by making the root namespace OpenFeatureSDK instead of OpenFeature.SDK

An example of the issue
image

After the proposed change

using OpenFeatureSDK;

OpenFeature.Instance.SetProvider(new CloudBeesProvider());
services.AddSingleton(provider => OpenFeature.Instance.GetClient());

Discovered when implementing a provider I noticed due conflict with OpenFeature.SDK namespace and the singleton class being called OpenFeature.
It requires the full namespace to use the OpenFeature singleton.

Avoid this by making the root namepsace OpenFeatureSDK instead of OpenFeature.SDK

Signed-off-by: Benjamin Evenson <2031163+benjiro@users.noreply.github.com>
@benjiro benjiro force-pushed the refactor/openfeature-singleton branch from e31bf72 to 3a6b08f Compare September 22, 2022 12:07
@benjiro benjiro changed the title Rename namespace from OpenFeature.SDK to OpenFeatureSDK refactor!: Rename namespace from OpenFeature.SDK to OpenFeatureSDK Sep 22, 2022
@toddbaert
Copy link
Member

toddbaert commented Sep 22, 2022

I would say this is a fix, which will include it in the changelog. I recommend you change the PR title.

I updated the title. If you disagree feel free to revert.

@toddbaert toddbaert changed the title refactor!: Rename namespace from OpenFeature.SDK to OpenFeatureSDK fix!: Rename namespace from OpenFeature.SDK to OpenFeatureSDK Sep 22, 2022
toddbaert
toddbaert approved these changes Sep 22, 2022
@benjiro benjiro merged commit 430ffc0 into main Sep 22, 2022
@benjiro benjiro deleted the refactor/openfeature-singleton branch September 22, 2022 21:39
benjiro added a commit to open-feature/docs.openfeature.dev that referenced this pull request Sep 24, 2022
open-feature/dotnet-sdk#62

Signed-off-by: Benjamin Evenson <2031163+benjiro@users.noreply.github.com>
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