Giter Club home page Giter Club logo

Comments (24)

zml2008 avatar zml2008 commented on July 19, 2024 4

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.

Crypnotic avatar Crypnotic commented on July 19, 2024 2

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.

jamezrin avatar jamezrin commented on July 19, 2024 1

Will this be fixed at some point? This is a pain in the ass

from configurate.

Crypnotic avatar Crypnotic commented on July 19, 2024 1

Any updates on this issue. Not preserving order is very frustrating

from configurate.

ryantheleach avatar ryantheleach commented on July 19, 2024

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.

codeHusky avatar codeHusky commented on July 19, 2024

@ryantheleach Yeah. When I ran a server I liked it when things were sorted by category.

from configurate.

boformer avatar boformer commented on July 19, 2024

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.

zml2008 avatar zml2008 commented on July 19, 2024

possibly? but I don't really have the time to maintain that.

from configurate.

Favorlock avatar Favorlock commented on July 19, 2024

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.

zml2008 avatar zml2008 commented on July 19, 2024

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.

Favorlock avatar Favorlock commented on July 19, 2024

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.

zml2008 avatar zml2008 commented on July 19, 2024

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.

ryantheleach avatar ryantheleach commented on July 19, 2024
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.

zml2008 avatar zml2008 commented on July 19, 2024

gonna leave this as a wontfix. That will change once configurate is on jdk8 though.

from configurate.

TheE avatar TheE commented on July 19, 2024

Since Sponge is now JDK8, is there a chance to reopen and fix the problem?

from configurate.

zml2008 avatar zml2008 commented on July 19, 2024

Possibly, I'll take a look at it.

from configurate.

varrix avatar varrix commented on July 19, 2024

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.

ryantheleach avatar ryantheleach commented on July 19, 2024

Any chance that using the ConfigDocument API in 1.3.0 could fix the issue with reading the config?

from configurate.

CrazyFlasher avatar CrazyFlasher commented on July 19, 2024

Are there any HOCON parsers that keep values order?

from configurate.

codeHusky avatar codeHusky commented on July 19, 2024

Is this ever going to be came back to or not?

from configurate.

ryantheleach avatar ryantheleach commented on July 19, 2024

@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.

codeHusky avatar codeHusky commented on July 19, 2024

I know nothing about this codebase.

from configurate.

zml2008 avatar zml2008 commented on July 19, 2024

from configurate.

ryantheleach avatar ryantheleach commented on July 19, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.