-
Notifications
You must be signed in to change notification settings - Fork 2
Changed SDK's structure to align with other C++ projects. #41
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
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,110 @@ | ||
| package( | ||
| default_visibility = ["//visibility:public"], | ||
| ) | ||
|
|
||
| cc_library( | ||
| name = "client", | ||
| hdrs = ["client.h"], | ||
| deps = [ | ||
| ":evaluation_context", | ||
| ":features", | ||
| ":metadata", | ||
| ":provider_status", | ||
| ], | ||
| ) | ||
|
|
||
| cc_library( | ||
| name = "error_code", | ||
| hdrs = ["error_code.h"], | ||
| ) | ||
|
|
||
| cc_library( | ||
| name = "evaluation_context", | ||
| hdrs = ["evaluation_context.h"], | ||
| ) | ||
|
|
||
| cc_library( | ||
| name = "feature_provider_status_manager", | ||
| srcs = ["feature_provider_status_manager.cpp"], | ||
| hdrs = ["feature_provider_status_manager.h"], | ||
| deps = [ | ||
| "@abseil-cpp//absl/status", | ||
| "@abseil-cpp//absl/status:statusor", | ||
| ":evaluation_context", | ||
| ":provider", | ||
| ":provider_status", | ||
| ], | ||
| ) | ||
|
|
||
| cc_library( | ||
| name = "features", | ||
| hdrs = ["features.h"], | ||
| deps = [ | ||
| ":evaluation_context", | ||
| ], | ||
| ) | ||
|
|
||
| cc_library( | ||
| name = "flag_metadata", | ||
| hdrs = ["flag_metadata.h"], | ||
| ) | ||
|
|
||
| cc_library( | ||
| name = "metadata", | ||
| hdrs = ["metadata.h"], | ||
| ) | ||
|
|
||
| cc_library( | ||
| name = "noop_provider", | ||
| srcs = ["noop_provider.cpp"], | ||
| hdrs = ["noop_provider.h"], | ||
| deps = [ | ||
| ":evaluation_context", | ||
| ":metadata", | ||
| ":provider", | ||
| ":resolution_details", | ||
| ], | ||
| ) | ||
|
|
||
| cc_library( | ||
| name = "openfeature", | ||
| hdrs = ["openfeature.h"], | ||
| deps = [ | ||
| ":client", | ||
| ":evaluation_context", | ||
| ":metadata", | ||
| ":provider", | ||
| ], | ||
| ) | ||
|
|
||
| cc_library( | ||
| name = "provider_status", | ||
| hdrs = ["provider_status.h"], | ||
| ) | ||
|
|
||
| cc_library( | ||
| name = "provider", | ||
| hdrs = ["provider.h"], | ||
| deps = [ | ||
| "@abseil-cpp//absl/status", | ||
| ":evaluation_context", | ||
| ":metadata", | ||
| ":resolution_details", | ||
| ], | ||
| ) | ||
|
|
||
| cc_library( | ||
| name = "reason", | ||
| hdrs = ["reason.h"], | ||
| ) | ||
|
|
||
| cc_library( | ||
| name = "resolution_details", | ||
| srcs = ["resolution_details.cpp"], | ||
| hdrs = ["resolution_details.h"], | ||
| deps = [ | ||
| ":error_code", | ||
| ":flag_metadata", | ||
| ":reason", | ||
| ], | ||
| ) | ||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,4 @@ | ||
| #include "include/openfeature/noop_provider.h" | ||
| #include "openfeature/noop_provider.h" | ||
|
|
||
| namespace openfeature { | ||
|
|
||
|
|
||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To improve maintainability and reduce boilerplate, you can define the simple header-only libraries using a loop. This makes the
BUILDfile more concise and easier to manage as you add more header-only components.For example, you could group
error_code,evaluation_context,flag_metadata,metadata,provider_status, andreasonlike this, replacing their individualcc_librarydefinitions:There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Following on that, I don't think loop is a good option, but I would consider grouping them more together.
Maybe we could add F.e.
error_code as part of resolution details library
metadata as part of provider
I'm not sure if that's best practice but wanted to consider that. @oxddr what do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, definitely don't follow this advice - it's wrong.