Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inherit optional and getter evaluation #660

Closed
wants to merge 123 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
123 commits
Select commit Hold shift + click to select a range
aa75211
Migrate to sbt 0.13.16
dwijnand Aug 3, 2017
74c7358
Merge pull request #483 from dwijnand/sbt-0.13.16
dwijnand Aug 14, 2017
64e0a5e
#495 Add Support For Set Types In Config Beans
Sep 16, 2017
7943a8c
Merge pull request #496 from karthicks/issue-495
havocp Sep 16, 2017
0a5603f
Add fallback ConfigReferenceResolver
plesner Sep 25, 2017
527c7f5
Merge pull request #497 from plesner/resolver
havocp Oct 2, 2017
4036864
Merge pull request #478 from kag0/parse-period
2m Oct 6, 2017
4ee9f18
Release notes for 1.3.2
2m Oct 6, 2017
c9cec64
Merge pull request #502 from 2m/wip-1.3.2-release-notes-2m
2m Oct 6, 2017
9153b39
Merge remote-tracking branch 'upstream/master'
iantabolt Oct 6, 2017
032dc70
Add test case for serializing ValidationFailed
iantabolt Oct 6, 2017
73dd3c8
Add C# port to Other APIs section
bugthesystem Oct 17, 2017
3e30fc7
update anchor
bugthesystem Oct 17, 2017
003c1e1
Merge pull request #511 from ziyasal/master
havocp Oct 17, 2017
b077d27
Rename typesafehub to lightbend (#513)
2m Oct 23, 2017
408925b
Some more link fixes after the rename (#517)
2m Oct 23, 2017
98b4b08
Align maintanance note with other lightbend/ projects
ktoso Oct 24, 2017
a9e9075
Update README.md
ktoso Oct 24, 2017
9abff09
Merge pull request #518 from lightbend/ktoso-patch-1
2m Oct 24, 2017
10e576f
Add circe-config to list of Scala wrappers
jonas Nov 5, 2017
0e1d18c
Merge pull request #525 from jonas/patch-2
havocp Nov 5, 2017
b25446e
Update links to use HTTPS (#526)
jonas Nov 6, 2017
d284ee5
Publish with namespaced JDK9 module name (#547)
jroper Feb 21, 2018
39e52a7
Update README.md (#545)
fabiofumarola Feb 21, 2018
173a783
Update versions to 1.3.2 (#534)
janjaali Feb 21, 2018
17e0f65
Never pass null ConfigOrigin to PathParser.parsePathNodeExpression (#…
javaerb Feb 21, 2018
424bad1
news for 1.3.3
ktoso Feb 21, 2018
8f10c40
Merge pull request #548 from lightbend/ktoso-patch-1
havocp Feb 21, 2018
3eedbed
Adds trace while allowing missing file by returing empty parse value
sathiyapk Mar 2, 2018
4c20fb0
Merge pull request #550 from sathiyapk/trace-allow-missing
havocp Mar 2, 2018
aea2ac4
Merge pull request #437 from iantabolt/master
havocp Mar 29, 2018
7637d77
Add playground link to readme
av-elier Jun 12, 2018
aacd6c9
Merge pull request #561 from av-elier/add-link-to-playground
havocp Jun 12, 2018
9f71f62
upgrade to sbt 1.1.6 and latest plugins
ennru Jun 30, 2018
8863d6c
Scalariform settings in root build.sbt
ennru Jul 1, 2018
59e3597
Reformatted with Scalariform
ennru Jul 1, 2018
baef559
Merge pull request #564 from ennru/ennru_sbt-1.1.6
havocp Jul 1, 2018
2330d47
Minor correction to the use of config.root().render() under "Debuggin…
ajorpheus Jul 13, 2018
828f6d9
Merge pull request #569 from ajorpheus/patch-1
havocp Jul 13, 2018
c326c22
@Optional in getters for properties without field
radist-nt Jul 14, 2018
0c0fc15
Merge pull request #570 from radist-nt/issue_567
havocp Jul 25, 2018
2851e49
Add syntax from file name parser option
ntviet18 Jul 25, 2018
744073f
Unify guess syntax decision tree
ntviet18 Jul 25, 2018
dafced5
Merge pull request #573 from ntviet18/set_syntax_from_filename_option
havocp Jul 25, 2018
9b9d3f9
#575 Remove wording about apps having reference.conf
ktoso Jul 31, 2018
915ef14
Merge pull request #576 from lightbend/wip-575-1
havocp Jul 31, 2018
04b791b
sbt 1.2.1
Aug 8, 2018
7de06fe
Merge pull request #577 from sullis/sbt-1.2.1
havocp Aug 8, 2018
00c8486
Reimplement ResolveMemos with a ridiculous hand-rolled hash table
havocp Jul 3, 2015
9215e05
minor cleanups to BadMap
havocp Jul 3, 2015
c08ffd2
Tweak BadMap, add tests
sam-token Aug 10, 2018
1e71d9b
Merge pull request #578 from sam-token/bad-map
havocp Aug 10, 2018
f46ab20
Remove nbsp that breaking Markdown rendering
bigwheel Aug 14, 2018
8e2d739
Merge pull request #579 from bigwheel/patch-1
havocp Aug 14, 2018
56c7d75
#584 Add root config origin to exception
Sep 7, 2018
c2c6303
Do not pass Path object as exception argument
Sep 7, 2018
489fd58
Merge pull request #585 from ensirius/master
havocp Sep 7, 2018
87cf1f1
Remove bad resolver
eed3si9n Sep 17, 2018
3a1ffb1
Refactor build to unified slash syntax
eed3si9n Sep 17, 2018
3d29911
Merge pull request #589 from eed3si9n/wip/snapshot
havocp Sep 18, 2018
362b7ec
Fix stack trace printing in test
ekrich Nov 1, 2018
78d8b84
Merge pull request #596 from ekrich/fix/printstacktrace
havocp Nov 1, 2018
1c23940
Add a note about classloader issues to README
kubukoz Nov 4, 2018
a7625e5
Update README.md
havocp Nov 4, 2018
f3628e4
Remove whitespace
kubukoz Nov 4, 2018
ad1c5eb
Merge pull request #597 from kubukoz/patch-1
havocp Nov 4, 2018
f82a1ed
Update sbt to 1.2.7.
He-Pin Dec 3, 2018
ca2f070
Merge pull request #601 from hepin1989/sbt
havocp Dec 3, 2018
855716a
Project Scala version updated to 1.12.8; all the IDE & compiler warni…
michalmela-tomtom Jan 5, 2019
4f495cf
Merge pull request #607 from michalmela/scala-2-12-8
havocp Jan 7, 2019
86d9ea0
Fixed support for keys that are all digits but longer than an int.
michalmela Jul 10, 2018
81bb203
Merge pull request #568 from michalmela/master
havocp Jan 9, 2019
d468cd5
Use AdoptOpenJDK
2m Jan 24, 2019
34a1cee
Merge pull request #611 from 2m/wip-adoptjdk-2m
2m Jan 24, 2019
7e26807
Drop note on Akka 2.0/Play 2.0
dwijnand Jan 28, 2019
a7b7034
Merge pull request #612 from dwijnand/drop-note-on-akka-and-play-2.0
havocp Jan 28, 2019
7f8e587
Add new Scala port to README.md
ekrich Feb 14, 2019
d56d590
Update Shocon entry
ekrich Feb 14, 2019
6014b5f
Merge pull request #613 from ekrich/topic/doc
havocp Feb 14, 2019
1622208
Add a config strategy to load from environment variables first.
andreaTP Feb 27, 2019
7d7380f
Fix suppressions doctype
andreaTP Feb 27, 2019
ac48dae
Trailing blank line
andreaTP Feb 27, 2019
8a14342
Env variables resolution moved to defaultOverrides
andreaTP Mar 4, 2019
81ae9d9
add new Rust port to README.md
mockersf Mar 8, 2019
2b812e7
Merge pull request #621 from mockersf/master
havocp Mar 8, 2019
bf57edb
fixed review comments
andreaTP Mar 8, 2019
5d8ba54
Added a description of the new property in Readme
andreaTP Mar 8, 2019
d38b919
Detail resons for _ sustitutions
andreaTP Mar 15, 2019
a05923d
Added reference to args4c for command-line-to-config utils
aaronp Mar 19, 2019
f0816e5
Move rationale to code and implement invalidate cache
andreaTP Mar 21, 2019
f686abd
Bump sbt version
andreaTP Mar 21, 2019
fd7d9cc
Remove Puppy Crawl references
andreaTP Mar 21, 2019
0e3b472
Move env mangling to ConfigImplUtil
andreaTP Mar 21, 2019
2efd1fa
minor fix
andreaTP Mar 21, 2019
4836b45
fix again XML
andreaTP Mar 21, 2019
37e5c90
Merge pull request #620 from andreaTP/envConfigLoading
havocp Apr 3, 2019
5a54a12
Merge pull request #625 from aaronp/master
2m Apr 18, 2019
93cb38a
Add release notes for 1.3.4 (#628)
2m Apr 18, 2019
152366b
Update to the latest sbt-pgp
2m Apr 18, 2019
2907d92
Merge pull request #629 from 2m/wip-latest-sbt-pgp
2m Apr 18, 2019
0f36308
Update NEWS.md
mcornejo Apr 26, 2019
33744c2
Merge pull request #631 from mcornejo/patch-1
havocp Apr 26, 2019
a998137
Test on JDK 11
raboof May 7, 2019
0dd6c22
newer jdk11
marcospereira May 7, 2019
4f8d507
Newer jdk8
marcospereira May 7, 2019
12abec2
Use latest jabba
marcospereira May 7, 2019
215ad7e
Use latest jdk8
marcospereira May 7, 2019
691da05
Use latest jdk11
marcospereira May 7, 2019
cec08b7
Fix formatting detail
marcospereira May 7, 2019
4c83d9a
Update README to include sconfig supported platforms
ekrich May 22, 2019
364b9ad
Fix spelling typo in readme
havocp May 23, 2019
cd52ee8
Merge pull request #636 from lightbend/havocp-maintenance-typo
2m May 23, 2019
c135ab1
Update README to include sconfig supported platforms (#635)
2m May 23, 2019
97f3032
Note in README that substitutions don’t work inside quotes (#634)
havocp May 23, 2019
8bbc723
Merge pull request #632 from raboof/jdk11
Jun 23, 2019
14c882d
Allow application.conf to override variables in reference.conf (#619)
jroper Aug 20, 2019
558438a
Performance fix: added capacity parameter in ArrayLists contructor wh…
widgetii Sep 3, 2019
1bd65f3
Merge pull request #648 from widgetii/master
havocp Sep 3, 2019
6c8d0d4
Release 1.4.0 (#655)
johanandren Oct 14, 2019
1ba4ed8
Make Optional inheritable (references #659)
derKrischan Dec 8, 2019
90103f0
Evaluate getter for optional annotation if field exists (references #…
derKrischan Dec 8, 2019
f3b6eca
Revert "Evaluate getter for optional annotation if field exists (refe…
derKrischan Dec 8, 2019
050cdb6
Evaluate getter for optional annotation if field exists (references #…
derKrischan Dec 8, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 22 additions & 15 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,25 +1,32 @@
# use Docker-based container (instead of OpenVZ)
sudo: false

cache:
directories:
- $HOME/.ivy2/cache
# Cache the sbt launcher, currently the Travis VM preinstalls 0.13.5
- $HOME/.sbt/launchers/0.13.7
# Cache scala, currently the Travis VM preinstalls 2.11.2 & 2.10.4
#- $HOME/.sbt/boot/scala-$TRAVIS_SCALA_VERSION

# Updates regarding Travis VM preinstalls:
# https://github.com/travis-ci/travis-cookbooks/blob/master/changes.md

language: scala

jdk:
- oraclejdk8
before_install: curl -Ls https://git.io/jabba | bash && . ~/.jabba/jabba.sh
install: jabba install "adopt@~1.$TRAVIS_JDK.0-0" && jabba use "$_" && java -Xmx32m -version

script:
- sbt ++$TRAVIS_SCALA_VERSION test doc
jobs:
include:
- stage: jdk8
name: "test and docs on jdk8"
script: sbt ++$TRAVIS_SCALA_VERSION test doc
- stage: jdk11
name: "test and docs on jdk11"
script: sbt ++$TRAVIS_SCALA_VERSION test doc
env: TRAVIS_JDK=11

env:
global:
- TRAVIS_JDK=8

before_cache:
# Remove to avoid unnecessary cache updates
- find $HOME/.sbt -name "*.lock" -delete
- find $HOME/.ivy2 -name "ivydata-*.properties" -delete

cache:
directories:
- $HOME/.ivy2/cache
- $HOME/.sbt/boot
- $HOME/.jabba/jdk
38 changes: 2 additions & 36 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ fine... just be willing to revise it!
Before we can accept pull requests, you will need to agree to the
Typesafe Contributor License Agreement online, using your GitHub
account - it takes 30 seconds. You can do this at
http://www.typesafe.com/contribute/cla
https://www.lightbend.com/contribute/cla

Expect that most PRs will need revision before merge. If people
suggest revisions, you can make them yourself or wait for a
Expand All @@ -23,38 +23,4 @@ more revision will likely be needed.

# Making a release

To make a release you'll need to be a maintainer with GitHub
permissions to push to the master and gh-pages branches, and
Sonatype permissions to publish.

Here are the steps, which should be automated but aren't (PR
welcome!):

1. write release notes in NEWS.md following the format
already in there. update README with the new version.
Commit.
2. create a signed git tag "vX.Y.Z"
3. start sbt; `show version` should confirm that the version was
taken from the tag
4. clean
5. test (double check that release works)
6. doc (double check that docs build, plus build docs
to be copied to gh-pages later)
7. if test or doc fails, delete the tag, fix it, start over.
8. publishSigned
9. make a separate clone of the repo in another directory and
check out the gh-pages branch
10. /bin/rm -rf latest/api on gh-pages checkout
11. copy config/target/api from master checkout to vX.Y.Z in
gh-pages so you have vX.Y.Z/index.html
12. copy config/target/api from master checkout into latest/
so you have latest/api/index.html
13. commit all that to gh-pages, check the diff for sanity
(latest/api should be mostly just changed timestamps)
14. push gh-pages
15. log into sonatype website and go through the usual hoops
(under Staging Repositories, search for com.typesafe, verify the
artifacts in it, close, release)
16. push the "vX.Y.Z" tag
17. announce release, possibly wait for maven central to sync
first
See RELEASING.md
19 changes: 3 additions & 16 deletions HOCON.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ the config file to the computer program.
## Syntax

Much of this is defined with reference to JSON; you can find the
JSON spec at http://json.org/ of course.
JSON spec at https://json.org/ of course.

### Unchanged from JSON

Expand Down Expand Up @@ -317,11 +317,6 @@ String value concatenation is allowed in field keys, in addition
to field values and array elements. Objects and arrays do not make
sense as field keys.

Note: Akka 2.0 (and thus Play 2.0) contains an embedded
implementation of the config lib which does not support array and
object value concatenation; it only supports string value
concatenation.

#### String value concatenation

String value concatenation is the trick that makes unquoted
Expand Down Expand Up @@ -739,9 +734,6 @@ optional (`${?a}` not `${a}`), which allows `a += b` to be the
first mention of `a` in the file (it is not necessary to have `a =
[]` first).

Note: Akka 2.0 (and thus Play 2.0) contains an embedded
implementation of the config lib which does not support `+=`.

#### Examples of Self-Referential Substitutions

In isolation (with no merges involved), a self-referential field
Expand Down Expand Up @@ -959,11 +951,6 @@ word `"include"`, only unquoted `include` is special:

{ "include" : 42 }

Note: Akka 2.0 (and thus Play 2.0) contains an embedded
implementation of the config lib which does not support the
`url()`/`file()`/`classpath()` syntax. Only the heuristic `include
"foo"` syntax is supported in that version.

#### Include semantics: merging

An _including file_ contains the include statement and an
Expand Down Expand Up @@ -1337,7 +1324,7 @@ such that following the standard leads to people being confused.
Worse, common usage varies based on whether people are talking
about RAM or disk sizes, and various existing operating systems
and apps do all kinds of different things. See
http://en.wikipedia.org/wiki/Binary_prefix#Deviation_between_powers_of_1024_and_powers_of_1000
https://en.wikipedia.org/wiki/Binary_prefix#Deviation_between_powers_of_1024_and_powers_of_1000
for examples. It appears impossible to sort this out without
causing confusion for someone sometime.

Expand Down Expand Up @@ -1427,7 +1414,7 @@ way to get rid of default fallback values they don't want.

It may be useful to merge Java properties data with data loaded
from JSON or HOCON. See the Java properties spec here:
http://download.oracle.com/javase/7/docs/api/java/util/Properties.html#load%28java.io.Reader%29
https://docs.oracle.com/javase/8/docs/api/java/util/Properties.html#load-java.io.Reader-

Java properties parse as a one-level map from string keys to
string values.
Expand Down
4 changes: 2 additions & 2 deletions LICENSE-2.0.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
https://www.apache.org/licenses/

TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION

Expand Down Expand Up @@ -193,7 +193,7 @@
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0
https://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
Expand Down
42 changes: 40 additions & 2 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,41 @@
# 1.4.0: October 11, 2019

- `application.conf` variables can now override variables in `reference.conf` [#619](https://github.com/lightbend/config/issues/167)
- performance improvement through capacity hint for `ArrayList` [#648](https://github.com/lightbend/config/pull/648)

(This was previously published as 1.3.5-RC1 but deemed a large enough change to require a minor version rather than a patch)

# 1.3.4: April 18, 2019

- it is now possible to override any configuration setting from environment variables ([#620](/../../pull/620)) thanks to [@andreaTP](https://github.com/andreaTP)
- added support for integer keys that are longer than `Int` ([#568](/../../pull/568)) thanks to [@michalmela](https://github.com/michalmela)
- `Missing` exception now has a reference to the origin `Config` ([#585](/../../pull/585)) thanks to [@vagola](https://github.com/vagola)
- performance improvements to `resolve()` ([#578](/../../pull/578)) thanks to [@sam-token](https://github.com/sam-token)
- config file syntax is now resolved when parsing `InputStream` ([#573](/../../pull/573)) thanks to [@ntviet18](https://github.com/ntviet18)
- it is now possible to use `@Optional` on keys that are reserved words ([#570](/../../pull/570)) thanks to [@radist-nt](https://github.com/radist-nt)
- `ValidationProblem` is now serializable ([#437](/../../pull/437)) thanks to [@iantabolt](https://github.com/iantabolt)

All of the merged PRs can be found in the [release milestone](https://github.com/lightbend/config/milestone/4?closed=1).

# 1.3.3: February 22, 2018

- artifact now includes `Automatic-Module-Name` which makes it consumable as Java 9 module.
- minor issue fix. All of the fixed issues can be found in the [milestone page](https://github.com/lightbend/config/milestone/3?closed=1).

# 1.3.2: October 6, 2017

- environment variables are now able to be resolved to lists in
the same fashion as system properties.
- added `getPeriod()` which returns time units as
`java.time.Period`. Currently supported periods are days, weeks,
months and years. [More information here](HOCON.md#period-format).
- `ConfigResolveOptions` now has `appendResolver(...)` which allows
having custom behavior when unresolved substitutions are encountered
during resolution.
- Config Beans now support `Set` collection.
- a few other small bugfixes. All of the fixed issues can be found
in the [milestone page](https://github.com/lightbend/config/milestone/1?closed=1).

# 1.3.1: September 24, 2016

- added `include required("foo")` syntax to specify includes that
Expand Down Expand Up @@ -208,7 +246,7 @@ Thank you to contributors with commits since v1.2.1 tag:
- build jar using Java 1.6 (and enforce this in build)
- change getDuration to return unboxed long instead of boxed
- API documentation improvements
http://typesafehub.github.io/config/latest/api/
https://lightbend.github.io/config/latest/api/

# 1.1.0-9f31d6308e7ebbc3d7904b64ebb9f61f7e22a968: January 6, 2014

Expand All @@ -226,7 +264,7 @@ Thank you to contributors with commits since v1.2.1 tag:
- new API Config.getDuration() replaces getMilliseconds and
getNanoseconds. (should it return `long` instead of `Long` even
though it's been in git for a while? weigh in at
https://github.com/typesafehub/config/issues/119 )
https://github.com/lightbend/config/issues/119 )
- new API ConfigResolveOptions.setAllowUnresolved lets you
partially-resolve a Config
- new API Config.isResolved lets you check on resolution status
Expand Down
Loading