Comments (24)
Since at the moment it looks like we've done everything we can do on the Configurate side, any further change would have to happen on the underlying library. It also looks like our use case is not a priority for the Hocon developers, so the issue is unlikely to be fixed in the near future.
I'll close this issue since it's unlikely we'll make progress on it as things currently stand, but I do hope that changes in the future.
from configurate.
I'm not too familiar with how configurate interacts with the hocon library, but according to the latest comment on: lightbend/config#365
There is a way to accomplish ordered reading by only using the library to parse the config
Edit: Checked out the loader very briefly and it seems like no methods are used that the comment says to be wary of
from configurate.
Will this be fixed at some point? This is a pain in the ass
from configurate.
Any updates on this issue. Not preserving order is very frustrating
from configurate.
It won't just be a problem for dev's admins get quite possessive over the layout and order of their plugin configs.
from configurate.
@ryantheleach Yeah. When I ran a server I liked it when things were sorted by category.
from configurate.
I reported this few months ago:
https://github.com/zml2008/configurate/issues/18
Can this be fixed by creating a fork of the typesafe hocon library?
from configurate.
possibly? but I don't really have the time to maintain that.
from configurate.
Just noticed this issue myself. Hopefully it can be resolved soon. I've tried setting the configuration options, but that doesn't seem to do anything when using Hocon.
from configurate.
This is an issue with the hocon library itself, and new versions of the hocon library require jdk8 so this is not something simple to fix at all.
from configurate.
Is the issue already resolved in newer versions of the hocon library or is it just a matter of being to test it to find out?
from configurate.
It doesn't look like the map implementation used by the Hocon library has changed. However, newer library versions allow us to pass whatever map implementation we want. Unfortunately, we can't use the newer library version until we don't have users who require jdk6 (Sponge).
from configurate.
me:
Is there a way to disable alphanumeric sorting of keys? I find it's useful that configs have a set order that makes it easier for the user to read and edit.
havocp 10 hours ago
the Configdata structure doesn't preserve order, keys are just in random hash table order before we sort them.
the natural follow up is why doesn't it preserve order; there's some discussion on closed github issues but in short it doesn't work well with merging (withFallback).
if you want to load/edit/save a file, see the new ConfigDocument API in 1.3.0
from configurate.
gonna leave this as a wontfix. That will change once configurate is on jdk8 though.
from configurate.
Since Sponge is now JDK8, is there a chance to reopen and fix the problem?
from configurate.
Possibly, I'll take a look at it.
from configurate.
Should this perhaps be kept open until it has been decided on whether or not the JDK8 migration can potentially solve the issue?
from configurate.
Any chance that using the ConfigDocument API in 1.3.0
could fix the issue with reading the config?
from configurate.
Are there any HOCON parsers that keep values order?
from configurate.
Is this ever going to be came back to or not?
from configurate.
@zml2008 Hasn't had a ton of time lately, @codeHusky @jamezrin Are you volunteering to potentially add support for the new ConfigDocument API? That seems the only sane method considering Typesafe's current stance.
from configurate.
I know nothing about this codebase.
from configurate.
from configurate.
To be fair, it's a hacked fork. could break at any stage, if you attempt to keep it updated. Which may be fine for SpongeForge/SpongeCommon but I think most people would rather not have those hacks in Configurate. I suspect there's an alternate way, by getting Configurate to use the dedicated document editing API's for modifying values, but that could be quite difficult to implement potentially.
from configurate.
Related Issues (20)
- configurate-processor: Annotation processor to validate object mapper annotations
- Remove reflective RecordFieldDiscoverer
- BooleanSerializer docs (or functionality) is wrong HOT 1
- Improving serialization error messages
- Localized error messages
- Modifying child node with an integer key of a virtual parent node results in index exception HOT 2
- Following the README building steps results in an error HOT 2
- Configurate does not report 'No TypeSerializer found for field XXX'
- Allow (de)serialization of Maps HOT 3
- Bug with key words? HOT 1
- AnnotatedType in Annotated TypeSerializers is missing annotations on the field
- abstract inner class Annotated in ScalarSerializer is not public
- any way to modify existing instance's fields rather than creating new instances? HOT 2
- ConfigurationNode - Typo issue HOT 1
- Unexpected boolean value on deserialization HOT 4
- YamlConfigurationLoader#save() doesn't serialize to YAML HOT 2
- Possible issue when getting an empty array of a specific type HOT 1
- ObjectMapperFactoryImpl#mappers field deletes mappers after 64 HOT 1
- TypeToken interprets Kotlin type variance wrongly
- Yaml Comments HOT 1
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 configurate.