Commit Graph

548 Commits

Author SHA1 Message Date
Havoc Pennington
94dda5f9cf If not allowing unresolved, optimize resolve status computation for List 2014-12-27 16:41:47 -05:00
Havoc Pennington
51d94fc357 Merge pull request #180 from tea-dragon/master
Fix 'allow unresolved' for at least two list cases
2014-12-27 13:35:34 -08:00
Havoc Pennington
6c96f2eaa3 Merge pull request #184 from alexwei/master
Added missing duration unit short names that are supported in scala and more
2014-12-27 13:34:11 -08:00
Havoc Pennington
9e719711c3 Merge branch 'master' of https://github.com/Kornel/config into Kornel-master
Conflicts:
	README.md
2014-12-27 16:32:03 -05:00
ian
ed19f4c09e isolate test for allowing unresolved list elements 2014-12-24 16:10:20 -05:00
ian
3c6488fbc2 Fix 'allow unresolved' for at least two list cases
lists did not respond well to cases where only some of their
elements were resolved or even when none of them were resolved
but one of their object identities happened to change. Previously
this would throw a nasty 'bug or broken' exception so it seems
unlikely to have unintended side effects.
2014-12-24 15:41:34 -05:00
Havoc Pennington
5c464b3b5a Document ConfigFactory.parseFile 2014-12-18 15:13:03 -05:00
Havoc Pennington
c176bdcf50 Merge pull request #216 from chimpler/master
Updated README.md to add link to python port (pyhocon)
2014-12-07 23:11:31 -05:00
Francois Dang Ngoc
5447501df0 updated README.md to add link to python port (pyhocon) 2014-12-07 22:52:32 -05:00
Havoc Pennington
0a96f9f3b4 Merge pull request #215 from benmccann/minor-upgrades
Upgrade to SBT 0.13.6
2014-12-01 22:39:18 -05:00
Ben McCann
54e780d308 Upgrade to SBT 0.13.7 2014-12-01 17:54:55 -08:00
Havoc Pennington
f3ec3aa910 Missing backtick in HOCON.md
Reported by @takc923
2014-11-11 14:49:47 -05:00
Havoc Pennington
741b14ec6b Merge pull request #210 from chris-martin/pull-quoted-string-do-while
Avoid awkward do-while in Tokenizer.pullQuotedString
2014-11-07 09:23:32 -05:00
Chris Martin
b83089b91d Avoid awkward do-while in Tokenizer.pullQuotedString
Not a big deal, but I think this reads more clearly now.
2014-11-05 14:36:40 -05:00
Havoc Pennington
5038949cff README: recommend hasPath rather than catching Missing 2014-10-13 05:49:46 -04:00
Havoc Pennington
0a7db6a126 Avoid PathBuilder for fast-path path parsing
This makes the typical path parse much faster:
 - avoid Character.isLetter in favor of just ASCII alphanumeric
 - allow fast path with hyphens and underscores involved
 - don't use PathBuilder, build a Path directly by
   traversing the string backward; this avoids some
   object allocation
2014-10-13 05:22:38 -04:00
Havoc Pennington
c5b2572858 Change CatchExceptionOnMissing bench to have more stack frames 2014-10-11 10:52:00 -04:00
Havoc Pennington
891a2cde97 Use nanotime for profiling and use more iterations
This doesn't make the benchmarks all accurate or anything
but maybe makes them a little less likely to be way off.
2014-10-10 20:47:28 -04:00
Havoc Pennington
77972fefc3 Add profiling of getting values from a Config
To run these, do
> project config
> test:runMain GetExistingPath
> test:runMain HasPathOnMissing
> test:runMain CatchExceptionOnMissing
2014-10-10 17:32:34 -04:00
Havoc Pennington
5c83183853 README: link to maven central directory
Fixes #203, linking to super-old releases was just confusing.
2014-10-10 12:16:56 -04:00
Havoc Pennington
91663eba6c Merge pull request #200 from tyrcho/patch-1
add badge + link to maven central
2014-10-06 19:33:44 -04:00
Michel Daviot
42efcbce6c add badge + link to maven central 2014-10-06 11:09:16 +02:00
Havoc Pennington
82d6614d2f README: show how to do "inheritance" on one line 2014-10-03 08:55:01 -04:00
Havoc Pennington
1955825951 Merge pull request #198 from chris-martin/typo_now-not
typo: "will (now -> not) throw"
2014-10-03 08:41:00 -04:00
Chris Martin
f450aa9369 typo: "will (now -> not) throw" 2014-10-03 04:55:48 -04:00
Havoc Pennington
d6ffa8fc0f Merge pull request #197 from chris-martin/ConfigRenderOptions-setFormatted-javadoc
Fix javadoc in ConfigRenderOptions.setFormatted
2014-10-02 22:56:07 -04:00
Chris Martin
9f16036979 Fix javadoc in ConfigRenderOptions.setFormatted
It looks like this was copied from setComments and one bit wasn't changed.
2014-10-02 22:34:50 -04:00
Kornel Kielczewski
c1d5c11887 Added sbt library dependencies to README.md
- Lots of people use sbt, why keep a maven sample and forget about sbt?
   :)
2014-09-16 09:55:51 +02:00
Alex Wei
b76b406f2b Patch spec with duration units from Scala that were previously missing. 2014-08-11 18:36:14 +10:00
Alex Wei
c8cab8c79e Revert "Added more duration unit short names for hour, minute and second."
This reverts commit ebb526304e.
2014-08-11 18:31:14 +10:00
Alex Wei
ebb526304e Added more duration unit short names for hour, minute and second. 2014-08-08 09:57:42 +10:00
Alex Wei
60c661d683 Added missing duration unit short names that are supported in scala.concurrent.duration.DurationConversions. 2014-08-08 09:48:56 +10:00
Havoc Pennington
99afd721a5 Merge pull request #175 from benjaminjackman/master
Update README.md
2014-06-30 09:55:07 -04:00
Ben Jackman
a444b4481d Update README.md 2014-06-27 11:13:46 -05:00
Havoc Pennington
95b31ccd57 Use a WeakReference to cache class loaders
Fixes #171
2014-06-23 09:11:32 -04:00
Havoc Pennington
08c4fe3950 If all concatenation elements are undefined, undefine the field
This is a spec change but the spec was wrong and the implementation
previously just threw an exception.

The spec claimed that ${?foo}${?bar} would become empty string,
but it's more useful for it to just become undefined.
You can add an explicit empty string with "" if you want it
to be empty string.

Fixes #161.
2014-05-05 11:02:49 -04:00
Havoc Pennington
6218174704 Settings pattern is not a way to get an optional setting 2014-05-03 09:59:42 -04:00
Havoc Pennington
2b4516ab62 Fix markdown syntax in README 2014-05-03 09:56:26 -04:00
Havoc Pennington
798230458e More README improvements 2014-05-03 09:51:57 -04:00
Havoc Pennington
7cae92d3ae Bump README to 1.2.1 2014-05-02 10:54:20 -04:00
Havoc Pennington
47697639f4 add 1.2.1 to NEWS 2014-05-02 10:49:31 -04:00
Havoc Pennington
90d39831a0 Shrink previous patch to skip non-string Properties
There was some extra/leftover logic in there. With this commit
the diff vs. the original codebase is smaller and clearer.
2014-05-02 10:31:57 -04:00
萧岳
1336751ab6 Handle non-String values in a Properties object
The java docs for Properties say avoid this, but
it is possible, so just silently skip any non-strings
we find in the Properties.

Fixes #147
2014-05-02 10:30:29 -04:00
Havoc Pennington
5899bce827 Add paranoia about ClassLoader in ConfigParseOptions
Fixes #155. Really this is kind of a mess; having overloads
with both ClassLoader and ConfigParseOptions parameters, when
the parse options may include a class loader, confuses the
heck out of things.

Trying to make it so that the ConfigParseOptions variants are
the canonical version, and the ones with a loader just immediately
set the loader on the parse options and call the variant with no
loader parameter.

Anyway ... when it fails this patch should at least make it much
clearer what went wrong.
2014-05-02 09:59:31 -04:00
Havoc Pennington
6c2889728e Move table of contents below overview 2014-05-02 09:02:53 -04:00
Havoc Pennington
6eefb61b5e Organize README and add doctoc table of contents 2014-05-02 09:00:25 -04:00
Havoc Pennington
48a9437513 Go on a bit longer about how to handle defaults in the README 2014-05-01 20:23:13 -04:00
Havoc Pennington
bfe83e1b79 Throw exceptions when we need a reference to an array element
This arose in issue https://github.com/typesafehub/config/issues/160

There are two known cases: when we want to relativize references
in included files, and when we use `+=` while inside a list.
Both of those are currently impossible to handle without a way
to generate a reference to a list element.
2014-05-01 11:19:39 -04:00
Havoc Pennington
44e8a925b2 Fix Tokens.Value.toString on unresolved values
It was throwing an exception trying to unwrap unresolved value
2014-05-01 11:13:50 -04:00
Havoc Pennington
e5cc23235f Use fullCurrentPath() when relativizing includes, and make it throw if path is empty
This is just to consolidate our use of pathStack in one place.
2014-05-01 10:15:44 -04:00