Hi, I have just noticed that koin strips quotes ou...
# koin
n
Hi, I have just noticed that koin strips quotes out of environment variables.
Copy code
fun saveProperties(properties: Properties) {
        if (_koin.logger.isAt(Level.DEBUG)) {
            _koin.logger.debug("load ${properties.size} properties")
        }

        val propertiesMapValues = properties.toMap() as Map<String, String>
        propertiesMapValues.forEach { (k: String, v: String) ->
            saveProperty(k, v.quoted())
        }
    }
v.quoted()
is the culprit This makes it very hard to put JSON in environment variables and get it back such that parsers don’t complain! Why are quotes being stripped?
a
perhaps a bug with properties 🤔
what version do you use?
n
2.2.2
a
yes, master will be backported to 2.2.x as 2.3.0
n
Thanks @arnaud.giuliani Do you have an ETA on that release?
a
I would say Q2
End of April I will migrate all main 2.x versions to maven central
from there I will be able to backport all 3.x patches
n
Will there be a 3.x release (non beta/alpha) before that?
a
yes
3.0.1 is almost stable
n
Thank you
👍 1
d
Hi @nikolaymetchev 🙂
n
Hi @Dan - Do I know you?
a
arf, too bad 😕
n
Is that likely to be fixed, or is there a reason for it?
a
a regression, or something ? 🤔 or perhaps fixed on 2.2.2 ?
else we just need to reapply it on 3.0.1 for next patch 3.0.2
It looks like it has been there since inception.
@arnaud.giuliani Not sure why the
quoted
method changed here. I thought I made it obvious that it should be removed altogether. With the change highlighted you now get and array out of bounds exception on an empty string.
a
yep, seen that 🙄
n
Why do you have this method? Just delete it. Properties shouldn’t be amended…
a
no because in some cases, properties import add
char
like system import
n
This functionality should be optional. I am trying to store some JSON in a property and this completely breaks it.
a
ok I see