Comments (4)
Can you elaborate on and clarify the matter? Also, can you state whether this is a bug or a feature request?
from dazzleconf.
its a bug, when you make map of string and nested section, and soon add new value to nested section, the config is reset
from dazzleconf.
This is a bug, but it is a design bug rather than a functional bug. The fix is more difficult than it seems.
When you load the configuration with fallback-to-default behavior, what really happens is default values are created using ConfigurationFactory#loadDefaults. These defaults are then provided to the #load method as auxiliary values (auxiliary values are fallback values). When a configuration option is processed, we have access only to the auxiliary value of the entire configuration option.
Therefore, in the current design, we have only access to the Map<String, YourConfSection>
default value but not the YourConfSection
default value. Solving this would require a design rework. Possible options:
- Use a node system of
ConfigEntry
andConfigValue<T>
objects, which can provide additional metadata. This will happen at some point, but it would be a breaking change, and so must either wait until 2.0 or be established with backwards compatibility in mind. - Creating another #load method on ConfigurationFactory which provides more dynamic handling of auxiliary values, such that they could be requested on-demand from different sources.
- Various "hacks" are possible, including adding a toggle to ConfigurationOptions to provide special behavior for your situation.
from dazzleconf.
Oh! Looks really complicated, whatever it is i am waiting (let me know when there is a beta)
from dazzleconf.
Related Issues (20)
- How to use ValueSerializer HOT 13
- Add documentation on how to use file-loaded defaults HOT 2
- Type-Safe Placeholders/Templating with ValueSerialiser integration HOT 4
- Optionals let you leave out keys HOT 7
- Recursive Serializer HOT 6
- Feature: Implement nested map deserialization to configuration calls as a native exposed functionality
- Consider deprecating @ConfSerialisers? HOT 1
- Suggestions for a better DazzleConf HOT 1
- Bytecode-powered optional enhancements HOT 1
- Please Read: Requiring default values for 2.0 + related changes
- Type-safe configuration migration
- Map method names to configuration keys automatically (deprecate @ConfKey?)
- Turn all serialization to use the value serializer model HOT 2
- Define a structure for configuration definitions
- make ConfigManager from documentation part of api HOT 1
- Handle invalid config values individually with cleanup callback
- Map Key Requirement for Serializer (Hocon)
- Long Config Value Locked at Lower Value HOT 3
- How to add a generic type? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dazzleconf.