Havoc Pennington
81a4fe63f9
start fixing Token hierarchy by factoring origin() up to base class
2011-12-06 15:04:13 -05:00
Havoc Pennington
7d13a00f7d
remove usage of Tokens.newReservedChar preventing compilation
...
I didn't notice this before because apparently I had to 'clean' to see it
2011-12-06 14:57:37 -05:00
Havoc Pennington
59a7012bc1
back to -SNAPSHOT after 0.1.6 release
2011-12-06 10:10:49 -05:00
Havoc Pennington
c6124a1ecd
0.1.6
2011-12-06 10:10:35 -05:00
Havoc Pennington
0c55fd6f06
note that ${} is special in HOCON and not in Java properties
2011-12-06 00:20:21 -05:00
Havoc Pennington
f95c309462
add a couple of minor notes to the README about sbt and Java properties
2011-12-06 00:12:44 -05:00
Havoc Pennington
9cf554250b
add a note to the spec contrasting with Java properties syntax
2011-12-06 00:12:21 -05:00
Havoc Pennington
0c200aad93
fix markup of one of the bullet lists in the spec
2011-12-05 23:51:48 -05:00
Havoc Pennington
99739bead3
specify that file: URLs must work just like filenames
2011-12-05 23:51:15 -05:00
Havoc Pennington
6bba70d13c
Make tokenizer create a Problem token instead of throwing parse errors
...
This allows the parser to throw the error. The parser can add more
context such as the name of the key whose value is being parsed.
2011-12-05 21:54:31 -05:00
Havoc Pennington
38b835d966
correct README statement that include "application" won't work from a file
...
An earlier change made includes in files fall back to classpath.
2011-12-05 14:46:41 -05:00
Havoc Pennington
8e3f56cd82
0.1.5-SNAPSHOT
2011-12-05 14:27:24 -05:00
Havoc Pennington
69e28a8542
0.1.5
2011-12-05 14:27:09 -05:00
Havoc Pennington
6254a1bccd
improve error messages for reserved chars
...
Requires passing the char through the tokenizer to the parser
since the parser will have more contextual information to
include in the error.
2011-12-05 14:25:22 -05:00
Havoc Pennington
236a49fe3e
put back -SNAPSHOT for git
2011-12-05 13:23:18 -05:00
Havoc Pennington
d5b79c00b4
0.1.4
2011-12-05 13:23:06 -05:00
Havoc Pennington
005cd6da2c
Improve error messages to suggest quoting strings or using .properties
...
Also, when displaying a token use a more user-friendly format
like ',' instead of COMMA
2011-12-05 13:22:05 -05:00
Havoc Pennington
63b920acd1
add a short summary of the Examples
2011-12-04 20:51:24 -05:00
Havoc Pennington
1e1785cb75
switch version back to -SNAPSHOT post-release
2011-12-02 21:48:55 -05:00
Havoc Pennington
27980ab82c
0.1.3 and move to the proper publish url (maven- not ivy-)
2011-12-02 21:48:29 -05:00
Havoc Pennington
c7f6428ccb
back to -SNAPSHOT
2011-12-02 19:28:20 -05:00
Havoc Pennington
f2c96c6943
bump to 0.1.2
2011-12-02 19:21:13 -05:00
Havoc Pennington
23280e8c49
Publish 0.1.1 snapshot
2011-12-02 18:45:34 -05:00
Havoc Pennington
f6fd02508e
add Config.entrySet() which returns the set of paths and non-null values
2011-12-02 18:44:11 -05:00
Havoc Pennington
38fb8d6834
move publish settings to config/ project instead of global
2011-11-30 16:35:41 -05:00
Havoc Pennington
2365db970e
Get the build ready for publishing releases
...
Not sure this is quite right, but closer than before.
2011-11-30 16:30:03 -05:00
Havoc Pennington
0ff5f1ff8c
README code example fix
2011-11-30 11:18:46 -05:00
Havoc Pennington
2abd5ad09c
minor README tweaks
2011-11-30 10:52:01 -05:00
Havoc Pennington
6d8e476dcf
remove two "future directions" from the README
...
I don't think they made sense:
- "fallback lists" in substitutions can already be done another way
- the "delete" operator isn't clearly useful and feels imperative
rather than declarative
2011-11-30 10:44:47 -05:00
Havoc Pennington
9578a79538
Better handle includes for files and classpaths
...
- support "/" to get an absolute file or resource
- fall back to a resource if there's no file
2011-11-30 10:35:21 -05:00
Havoc Pennington
5cc18bdc03
handle file: URLs the same as files; support including absolute filenames
2011-11-30 09:43:11 -05:00
Havoc Pennington
9689abd781
make ConfigException abstract
2011-11-30 09:24:46 -05:00
Havoc Pennington
9f9b351f0e
add some more javadoc to ConfigException.java
2011-11-30 09:15:49 -05:00
Havoc Pennington
4896b7d75d
When using "singleton holder" catch ExceptionInInitializerError and pull out the ConfigException if any
2011-11-30 09:01:48 -05:00
Havoc Pennington
62628b6404
some README cleanups
2011-11-30 01:55:56 -05:00
Havoc Pennington
9b44709c89
support -Dconfig.resource, -Dconfig.file, -Dconfig.url system props
...
These override application.{conf,json,properties} for ConfigFactory.load()
2011-11-30 01:51:36 -05:00
Havoc Pennington
a3988e9b03
improve path rendering to avoid quoting hyphenated keys like foo-bar
2011-11-29 20:51:57 -05:00
Havoc Pennington
81ce6038c7
remove special-case fallback to system props in substitutions.
...
The earlier change to make ${user.home} in a file included underneath
"foo" search both ${foo.user.home} and then ${user.home}, means
that even in included files system props are picked up just fine
as long as they were merged into the root config. So there is no
longer any need to have a special-case fallback to system properties.
This leaves ConfigResolveOptions as a really complex way to pass
in a single bool, but of course the point is to allow for future
extension.
2011-11-29 15:46:55 -05:00
Havoc Pennington
ad6fd0f156
add more tests for substitution behavior in included files
2011-11-29 15:39:27 -05:00
Havoc Pennington
53193a48d3
Search for substitutions both included-file-relative and root-relative
...
This should lay the groundwork for removing the special case fallback
to system properties, and allows included files to look at the reference
configuration.
2011-11-29 15:21:13 -05:00
Havoc Pennington
baa126633a
Move ConfigMergeable.toValue to be private, as MergeableValue.toFallbackValue
...
Avoids confusion because ConfigValue.toValue was pointless and
Config.toValue was not as clear as Config.root (plus having two ways
to do it on Config was strange).
This change does require a cast in the withFallback implementation but
we already have the analogous pattern all over the place (i.e. assuming that
instances of the public interfaces are always instances of our private
implementations).
2011-11-29 14:30:33 -05:00
Havoc Pennington
b50ed75f92
add missing "final" to SimpleConfig, was an oversight
2011-11-29 12:11:39 -05:00
Havoc Pennington
444219bb17
Optimize no-op object merges by throwing away the new HashMap and using the old one
...
One side effect of this is that if an object merge does nothing, the ConfigOrigin
for the fallback is discarded instead of merged in, but I think that's OK.
2011-11-29 10:02:26 -05:00
Havoc Pennington
4964fdcbf0
In the examples, also show using the config for the app itself
2011-11-29 09:09:50 -05:00
Havoc Pennington
9af5a67d6c
fix api doc note about setUseSystemProperties doing nothing
...
This is a mess, I earlier added a note to the README about needing
to fix it.
2011-11-29 08:56:25 -05:00
Havoc Pennington
a840c2599d
Rename getMemorySizeInBytesList to getBytesList to match getBytes
2011-11-29 08:44:07 -05:00
Havoc Pennington
4f3a91fd86
document why substitutions special-case system props
...
currently needed for files that are included in other files.
not really happy with how this works now, but documenting it
as a starting point.
maybe to force a substitution to resolve from the root we could
start it with a period? ${.this.is.a.root.prop} ?
2011-11-28 15:11:26 -05:00
Havoc Pennington
00a19f3f5d
fix a typo in a comment in simple-lib
2011-11-28 12:52:44 -05:00
Havoc Pennington
130544f98a
fix simple-lib to call checkValid() specifying a path.
2011-11-28 12:52:13 -05:00
Havoc Pennington
cfb4887d50
use a cached singleton for ConfigFactory.load()
2011-11-28 12:46:11 -05:00