Commit Graph

538 Commits

Author SHA1 Message Date
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
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
Havoc Pennington
36c1392028 Merge pull request #150 from cprice404/add-ruby-port-link-to-README
Add link to ruby port in README
2014-03-16 22:55:27 -04:00
Chris Price
3df982e7af Add link to ruby port in README 2014-03-16 18:33:34 -07:00
Havoc Pennington
e1d59dc48c Wrap ConfigOrigin.comments in unmodifiableList
This prevents people from messing with the returned list.
2014-02-19 11:31:33 -05:00
Havoc Pennington
0f4508cc67 Add more mentions of paths vs. keys to the API docs. 2014-02-13 15:17:09 -05:00
Havoc Pennington
d5924b6d01 Merge pull request #143 from typesafehub/wip/havocp-invalidate-tests
Add tests for cache invalidation with ref config and full config
2014-02-11 19:15:48 -05:00
Havoc Pennington
a0c22c3687 Add tests for cache invalidation with ref config and full config 2014-02-11 17:51:10 -05:00
Havoc Pennington
49770d9290 Merge pull request #141 from typesafehub/fix/havocp-140
Handle a concatenation that doesn't resolve
2014-02-10 16:38:46 -05:00
Havoc Pennington
91e5e81995 Handle a concatenation that doesn't resolve
Fixes #140
2014-02-10 15:59:08 -05:00
Havoc Pennington
f3cb6b1504 Add .travis.yml 2014-02-10 15:58:19 -05:00
Havoc Pennington
f27265b3f5 Merge pull request #138 from fnuecke/master
Added ConfigRenderOptions entry for value sorting in objects.
2014-02-05 15:16:45 -05:00