Skip to content

Latest commit

 

History

History
246 lines (180 loc) · 8.88 KB

changelog.md

File metadata and controls

246 lines (180 loc) · 8.88 KB

2019-10-07 - 0.9.95

  • fix #54 "Shared config objects" #54 (comment). In short, the @defines are traversed first in ModelBuilder.

2019-09-14 - 0.9.94

  • resolve #54 "Shared config objects"
    • initial implementation
    • only exercised with the explicit use of @define annotation
    • scoping should be handled already
    • no support for recursive type (example spec would look like issue54c.spec.conf)
    • skip a test for travis-ci as a class gets wrongly generated only there!

2019-09-03 - 0.9.93

  • fix #55 "Regex not properly captured". This was a regression, not sure when it was introduced. The fix is to escape each provided config value. Tests for multiline strings and containing some control chars also added.

2019-07-27 - 0.9.92

  • resolve #49 "Fully validate given config on construction"

    • for both java and scala, wrapper construction will now throw a com.typesafe.config.ConfigException with a summary of all the com.typesafe.config.ConfigException's collected as it traverses the required config entries. Example of such summary:

        Invalid configuration:
            'service.poolSize': com.typesafe.config.ConfigException$Missing(No configuration setting found for key 'poolSize')
            'service.url': com.typesafe.config.ConfigException$Missing(No configuration setting found for key 'url')      
            'service.debug': com.typesafe.config.ConfigException$WrongType(String: 5: debug has type NUMBER rather than BOOLEAN)
            'service.doLog': com.typesafe.config.ConfigException$WrongType(String: 6: doLog has type STRING rather than BOOLEAN)
            'service.factor': com.typesafe.config.ConfigException$WrongType(String: 7: factor has type BOOLEAN rather than NUMBER)
      
    • NOTE: option scala:fp removed: full paths are now always reported.

    • $_reqConfig now only output in the wrapper if actually called

  • capture java and scala wrapper supporting methods in proper classes to facilitate validation at compile time.

2019-07-22 - 0.9.91

  • set openjdk8 for travis ci

  • resolve #47 about adding --all-required flag. The new --all-required flag strictly forces all entries (even objects) to be required (even the @optional annotation is ignored)

2019-02-01 - 0.9.9

  • publish v0.9.9 with new --durations flag to generate java.time.Duration as base type for duration instead of long. Thanks @qux42!

2019-01-09 - 0.9.7

  • publish v0.9.7 with new --java:optionals option to generate Optional<T> for optional fields in java. Thanks @qux42!

2018-12-20 - 0.9.6

  • publish v0.9.6
  • fix #40 "String-to-bytes conversion results in compilation error"

2018-08-06 - 0.9.5

  • minor misc adjustments

2018-08-05 - 0.9.5

  • #36 "Report full path for missing required parameter":

    • Only implemented for scala at the moment. Also, this is an opt-in (new option --scala:fp) -- perhaps later on make it the default behavior?
  • for testing purposes now some options can be passed in the config spec file itself.

  • internal: for consistency, optional in AnnType construction now also set to true if there's a default value

2018-08-03 - 0.9.4

  • resolve #33 "Generate default config objects if non-existent". Thanks @JustinPihony !

2018-02-16 - 0.9.3

  • resolve #31 "Option to generate getters". The option is --java:getters

2018-02-11 - 0.9.0

  • resolve #30 "scala: option to use back ticks"
  • Adjustments regarding keys with $ and quoted strings:
    • key containing $ is left alone (even if it's quoted). This mainly due to Config restrictions on keys involving $
    • otherwise, the key is unquoted (if quoted of course)

2018-02-11 - 0.8.4

  • internal: use scala 2.12 (but cross compile to 2.11 too) and upgrade some dependencies

2017-09-05 - 0.8.3

  • resolve #6: "generate conf template"

2017-07-13

  • basic experimentation with static-config

2017-06-13 - 0.8.2

  • use JavaConverters

2017-06-13 - 0.8.1

  • use JavaConverters (instead of deprecated JavaConversions) in generated Scala code. Thanks @zishanbilal.

2017-02-24 - 0.8.0

  • resolve #24 "Maven central" Note:
    • this uses the default artifact publication (jar, javadocs, etc), not the executable "fat" jar, which is basically the only artifact properly built.
    • kept the current version

2017-02-03 - 0.8.0

  • resolve #23 "support size-in-bytes type"
  • renaming to better reflect "duration" elements, and in preparation for "size in bytes" support.

2016-12-17 - 0.7.2

  • fix #22 "literal duration captured as string"
  • generate code as part of test phase

2016-12-14 - 0.7.1

  • add tests for class name or keys starting with $_
  • fix #19 "quoted keys"
  • use simpler, equivalent boolean access expression according to given default
  • fixed: spec with literal values were not generating "primitive" types in java. There was a missing && a.default.isEmpty in: val typ = if (a.optional && a.default.isEmpty) toObjectType(memberType) else memberType

2016-12-12 - 0.7.0

  • capture model build warnings

2016-12-01 - 0.7.0

  • another model revision

2016-12-01 - 0.5.1

  • put "generated by" when running from main program

2016-11-30 - 0.5.0

  • resolve #16 "rewrite code"
  • resolve #15 "support list"
  • resolve #10 "annotations" -- basically only the #@optional one
  • NOTE: toString not generated anymore
  • TODO revisit template generation (info moved to a wiki page)

2016-11-22 - 0.5.0

  • advancing a rewrite...

2016-11-19 - 0.3.4

  • re #15 "support list"
    • allow use of nodes.createAllNodes in object defining element of list
  • fix #14 "section with numerical id generates invalid code"

2016-09-01 - 0.3.3

  • fix #13 "scala: double definition" add build auxiliary method to avoid type erasure issue in case of optional member
  • --noToString now processed for scala

2016-08-25 - 0.3.3

  • add options --toPropString and --noToString (only processed for java):
    • --toPropString to generate toPropString method (not generated by default)
    • --noToString to not generate toString method (generated by default)
  • fix #12 "incorrect reference with standard types in path fragments"
  • add tscfg.GenExamples for convenience
  • java: factor out access to Config parameter for sub-section in static method __$config at the root class
  • in java's toString, no need for conditional for string field if required or with default (non-null) value
  • allow missing sections in given input configuration. This helps with sections whose all members are optional. Still to be done is proper handling of optional sections in general. Besides an explicit annotation to indicate that a section is optional, note that a section can also be implicitly optional if all its members are optional.

2016-08-16 - 0.3.2

  • fix #11 "name collision with no-arg methods in scope"

2016-08-15 - 0.3.1

  • update specs2-core to 3.8.4
  • minor adj in Scala's toString

2016-03-03 - 0.3.1

  • add scoverage

2016-03-01 - 0.3.0

  • implement #8: "support durations" (for both java and scala)

  • example-duration.all.conf generated with:

    > runMain tscfg.Main --spec example/example-duration.spec.conf --tpl all src/main/java/tscfg/example/example-duration.all.conf
    

2016-02-25 - 0.3.0

  • initial work on #6: "generate conf templates."

  • --tpl option with 3 possible types: base, local, all. Can be given multiple times. Running the example-4tpl.spec.conf:

    > runMain tscfg.Main --spec example/example-4tpl.spec.conf --tpl base  src/main/java/tscfg/example/example-4tpl.base.conf --tpl local src/main/java/tscfg/example/example-4tpl.local.conf --tpl all   src/main/java/tscfg/example/example-4tpl.all.conf
    
  • As part of this, some refactoring, mainly around a new Type class that the various accessors now use.

  • more complete TypeSpec (TODO simplify *Accesor/Spec classes wrt types)

  • entry with no explicit type is now considered optional (with given value as default)

  • some preliminary annotation processing

    • @optional for sections - only generates comment in templates; no verification logic at all yet
    • @local to force inclusion of field in "local" template output

2016-02-07 - 0.2.1

  • fix #5: incorrect reference with "config" fragment in path

2016-02-07 - 0.2.0

  • fix #2: implement type inference

2016-01-24 - 0.1.5

  • scala generation

2016-01-24 - 0.1.4

  • include source info in preamble of generated file
  • consider all java keywords and special literals to generate valid identifier

2016-01-11 - 0.1.3

  • generate code for java 8 by default. Found out that Typesafe Config's hasPath method returns false for actually existing paths that just happen to be defined with null! So, hasPathOrNull is now used in the generated code, and this method is only available in Typesafe Config 1.3.0+, which requires Java 8. The new flag --j7 makes the tool generate hasPath checks instead of hasPathOrNull, so the generated code can be used with Typesafe Config 1.2.1 and Java <= 7.