config/NEWS.md

76 lines
3.8 KiB
Markdown
Raw Normal View History

2012-04-13 09:45:43 +08:00
# 0.4.0: April 12, 2012
2012-04-10 00:49:38 +08:00
2012-04-13 09:45:43 +08:00
- this is **rolling toward 1.0** and should be pretty much
feature-complete.
- the **serialization format has changed** to one that's
extensible and lets the library evolve without breaking
serialization all the time. The new format is also much more
compact. However, this change is incompatible with old
serializations, if you rely on that. The hope is to avoid
serialization breakage in the future now that the format is not
the default Java one (which was a direct dump of all the
implementation details).
- **serializing an unresolved Config** (one that hasn't had
resolve() called on it) is no longer supported, you will get
NotSerializableException if you try.
2012-04-13 09:38:34 +08:00
- ConfigValue.render() now supports ConfigRenderOptions which
2012-04-13 09:45:43 +08:00
means you can get a **no-whitespace no-comments plain JSON
rendering** of a ConfigValue
- supports **self-referential substitutions**, such as
2012-04-10 00:49:38 +08:00
`path=${path}":/bin"`, by "looking backward" to the previous
value of `path`
2012-04-13 09:45:43 +08:00
- supports **concatenating arrays and merging objects within a
single value**. So you can do `path=${path} [ "/bin" ]` for
2012-04-10 00:49:38 +08:00
example. See README and spec for more details.
2012-04-13 09:45:43 +08:00
- supports **array append** `+=` where `path+="/bin"` expands to
2012-04-13 09:38:34 +08:00
`path=${?path} [ "/bin" ]`
2012-04-13 09:45:43 +08:00
- supports **specifying type of include** `include
2012-04-13 09:38:34 +08:00
url("http://example.com/")`, `include file("/my/file.conf")`,
and `include classpath("whatever")`. This syntax forces
treatment as URL, file, or classpath resource.
2012-04-13 09:45:43 +08:00
- supports **including URLs** `include
2012-04-13 09:38:34 +08:00
"http://example.com/whatever.conf"` (if an include is a valid
URL, it's loaded as such). This is incompatible with prior
versions, if you have a filename that is also a valid URL, it
would have loaded previously but now it will not. Use the
`include file("")` syntax to force treatment as a file.
2012-04-13 09:45:43 +08:00
- **class loaders are now recursively inherited** through include
2012-04-10 00:49:38 +08:00
statements; previously, even if you set a custom class loader
when parsing a file, it would not be used for parsing a
classpath resource included from the file.
- parseString() and parseReader() now support include statements
in the parsed string or reader
- in -Dconfig.resource=name, name can start with a "/" or not,
doesn't matter
- if you implement ConfigIncluder, you should most likely also
implement ConfigIncluderFile, ConfigIncluderURL, and
ConfigIncluderClasspath. You should also use
ConfigIncludeContext.parseOptions() if appropriate.
- cycles in include statements (self-includes) are now detected
and result in a nicer error instead of stack overflow
2012-04-10 00:49:38 +08:00
- since 0.3.0, there is an obscure incompatible semantic change
in that self-referential substitutions where the cycle could
be broken by partially resolving the object now "look backward"
and may fail to resolve. This is not incompatible with the
version included in Play/Akka 2.0 because in that version this
obscure case just threw an exception. But in 0.3.0 there
were cases that worked that now work differently. You are very
unlikely to be affected by this.
2012-03-02 03:07:02 +08:00
# 0.3.0: March 1, 2012
- ConfigFactory methods now use the thread's context class loader
by default, and have overloads so you can specify a class
loader. Because jars may come with "reference.conf" in the jar,
a config must always be loaded with the same class loader as
the jar using the config.
- ConfigValue instances are now serializable
- new methods ConfigObject.withoutKey, ConfigObject.withOnlyKey,
Config.withoutPath, Config.withOnlyPath allow subsetting
configs more easily.
- better handle complex interdependent substitutions (the
`${foo}` syntax) without getting confused; just about anything
that makes conceptual sense should now work. Only inherently
circular config files should fail.
- some minor documentation fixes.