-
Notifications
You must be signed in to change notification settings - Fork 117
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
ConfigValueConfigSource to retrieve Configuration value location. #262
Conversation
implementation/src/main/java/io/smallrye/config/ConfigValue.java
Outdated
Show resolved
Hide resolved
implementation/src/main/java/io/smallrye/config/TracedConfigSource.java
Outdated
Show resolved
Hide resolved
implementation/src/main/java/io/smallrye/config/TracedPropertiesConfigSource.java
Outdated
Show resolved
Hide resolved
implementation/src/main/java/io/smallrye/config/TracedPropertiesConfigSource.java
Outdated
Show resolved
Hide resolved
implementation/src/main/java/io/smallrye/config/TracedPropertiesConfigSource.java
Outdated
Show resolved
Hide resolved
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.
I think we might need to explore some different ideas for this.
Sure. This was not meant to be a final implementation, but just to get the discussion going. For instance, the Properties API is somehow limited, so if we want to load the keys and values, plus keep track of the line number, I believe we need to write our own Properties Loader. Once that one is in place, then we can actually have a single lookup per key and improve the rest of the code. Do you think we should do it? |
Yes, I think we should. |
Ok, I'll work on a custom implementation for Properties that allows us to do this more cleanly. |
Ok, I've redone the PR to take into account our discussions. |
implementation/src/main/java/io/smallrye/config/ConfigValueConfigSourceInterceptor.java
Outdated
Show resolved
Hide resolved
implementation/src/main/java/io/smallrye/config/ConfigValueProperties.java
Show resolved
Hide resolved
implementation/src/main/java/io/smallrye/config/MapBackedConfigValueConfigSource.java
Outdated
Show resolved
Hide resolved
implementation/src/main/java/io/smallrye/config/MapBackedConfigValueConfigSource.java
Outdated
Show resolved
Hide resolved
implementation/src/main/java/io/smallrye/config/SmallRyeConfig.java
Outdated
Show resolved
Hide resolved
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.
I'm OK with this now, but note that we're missing a lot of JavaDoc here.
I'm writing the documentation as well :) |
@dmlloyd actually just pushed it now. I can also add the javadoc portions. |
@dmlloyd Check if this is better now :) |
implementation/src/main/java/io/smallrye/config/ConfigValueConfigSourceInterceptor.java
Outdated
Show resolved
Hide resolved
implementation/src/main/java/io/smallrye/config/ConfigValue.java
Outdated
Show resolved
Hide resolved
implementation/src/main/java/io/smallrye/config/ConfigValueConfigSource.java
Show resolved
Hide resolved
implementation/src/main/java/io/smallrye/config/ConfigValueConfigSource.java
Outdated
Show resolved
Hide resolved
Ok, so I hope I've fixed all of your comments. Thank you :) |
implementation/src/main/java/io/smallrye/config/ConfigValueMapView.java
Outdated
Show resolved
Hide resolved
d71a70b
to
60e365b
Compare
implementation/src/main/java/io/smallrye/config/ConfigValueMapView.java
Outdated
Show resolved
Hide resolved
implementation/src/main/java/io/smallrye/config/ConfigValueMapView.java
Outdated
Show resolved
Hide resolved
implementation/src/main/java/io/smallrye/config/ConfigValueMapView.java
Outdated
Show resolved
Hide resolved
implementation/src/main/java/io/smallrye/config/ConfigValue.java
Outdated
Show resolved
Hide resolved
@dmlloyd Do you think this is now ready to go in? :) |
implementation/src/main/java/io/smallrye/config/ConfigValueConfigSourceInterceptor.java
Outdated
Show resolved
Hide resolved
implementation/src/main/java/io/smallrye/config/ConfigValueConfigSourceInterceptor.java
Outdated
Show resolved
Hide resolved
implementation/src/main/java/io/smallrye/config/ConfigValueConfigSourceInterceptor.java
Outdated
Show resolved
Hide resolved
@dmlloyd I've removed the logging interceptor now, which was the main cause of the discussion. Everything else is how we discussed and implemented. Rebased the PR. Hope it is good to go now. |
Thanks @dmlloyd :) |
* ConfigValueConfigSource tries to make this possible. | ||
* <p> | ||
* | ||
* Ideally, this should move the the MicroProfile Config API, once the concept is well-proven. |
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.
typo: move the the MicroProfile
..move to the..
This is just a prototype attempt to provide a way to retrieve the Configuration Value location and origin.