dhallj

Dhall for Java

BSD-3-CLAUSE License

Stars
174

Bot releases are hidden (Show)

dhallj - Dhall for Java 0.10.0-M2 Latest Release

Published by travisbrown about 3 years ago

This release updates the Dhall language version from 20.2.0 to 21.0.0 and bumps the minor versions of several module-specific dependencies, including Jawn (from 1.1 to 1.2), SnakeYAML (1.28 to 1.29) and Cats Effect (3.1 to 3.2).

Most prominently this release introduces support for Dhall's new temporal literals:

scala> org.dhallj.parser.DhallParser.parse("2021-01-01T00:00:00+00:00")
val res0: org.dhallj.core.Expr.Parsed = {date = 2021-01-01, time = 00:00:00, timeZone = +00:00}

The implementation passes all acceptance tests for the new language features, but it is otherwise largely untested, and should be used with care in this milestone release. Future releases are likely to include additional support for the new temporal literals, including codecs for java.time types in dhall-scala.

This release includes many small fixes and improvements, including the following:

  • Improved toString implementation for Expr (e.g. fewer unnecessary parentheses; #272 and #273).
  • Support for specifying both cache locations and a relative path for import resolution (#286).
  • New check for Double bounds when parsing (previously we followed Java's Double.parseDouble in returning infinities; #294).
  • Bool -> 1 doesn't type-check now (#289).
  • No Sort in if branches (#290).
  • Type checking for optional annotation in let (#291).
  • Type checking for using value (#295).
  • Fix for a bug in isResolved (#285).
  • Fix for minor import resolution bugs hidden by some test setup mistakes (#287).
  • Changed behavior when cache creation fails (#296).
  • Back to Scala 2 by default in the sbt console (#288).
  • Some public API clean-up (e.g. #276).

Most of these issues were turned up when I realized we weren't actually running some of the failure acceptance tests. I don't think any of them are likely to affect users.

This release includes two known issues. One involves import resolution not consulting the cache in some situations (#298) and the other involves the parser being slightly too accepting (#299). Neither is likely to affect users.

dhallj - Dhall for Java 0.10.0-M1

Published by travisbrown about 3 years ago

This release contains a bug involving the CBOR decoding of seconds in temporal literals. Please use 0.10.0-M2 instead.

dhallj - Dhall for Java 0.9.0-M2

Published by travisbrown over 3 years ago

Like 0.9.0-M1, this release updates the Dhall language version (to 20.2.0 from 0.8.x's 20.0.0) and bumps several module-specific dependencies, including Circe (to 0.14.x) and SnakeYAML (to 1.28).

This milestone additionally updates the dhall-import module's Cats Effect dependency from 2.5.x to 3.1.1, and its http4s to 0.23.0-RC1. For all other modules this release is identical to 0.9.0-M1. This release introduces support for Scala 3 in all of the Scala modules (note that the core modules are implemented in Java and don't depend on Scala in any way).

This release includes one known issue involving caching that was also known to be present in earlier releases (see the 0.5.0-M1 release notes for details), and one related issue turned up by a new acceptance test (DontCacheIfHash). These issues only affect the dhall-imports Scala module, and should not affect most usage.

dhallj - Dhall for Java 0.9.0-M1

Published by travisbrown over 3 years ago

This release updates the Dhall language version from 20.0.0 to 20.2.0. Several module-specific dependencies have been updated, including Circe (from 0.13.x to 0.14.x) and SnakeYAML (from 1.27 to 1.28).

This release includes one known issue involving caching that was also known to be present in earlier releases (see the 0.5.0-M1 release notes for details), and one related issue turned up by a new acceptance test (DontCacheIfHash). These issues only affect the dhall-imports Scala module, and should not affect most usage.

dhallj - Dhall for Java 0.8.0-M1

Published by travisbrown almost 4 years ago

This release updates the Dhall language version from 19.0.0 to 20.0.0.

This release also fixes a bug in the behavior of Text/replace on single-quoted text literals containing tabs. For example, while e.g. compared these correctly in previous releases…

scala> import org.dhallj.syntax._
import org.dhallj.syntax._

scala> "assert: \"\\t\\n\" ≡ ''\n\t\n''".parseExpr.flatMap(_.typeCheck)
val res0: scala.util.Either[org.dhallj.core.DhallException,org.dhallj.core.Expr] = Right("\t\n" ≡ "\u0009\n")

Text/replace did not:

scala> "assert: \"foo\\n\" ≡ Text/replace \"\\t\" \"foo\" ''\n\t\n''".parseExpr.flatMap(_.typeCheck)
val res1: scala.util.Either[org.dhallj.core.DhallException,org.dhallj.core.Expr] = Left(org.dhallj.core.typechecking.TypeCheckFailure: Not an equivalence)

This is now fixed:

scala> import org.dhallj.syntax._
import org.dhallj.syntax._

scala> "assert: \"\\t\\n\" ≡ ''\n\t\n''".parseExpr.flatMap(_.typeCheck)
val res0: scala.util.Either[org.dhallj.core.DhallException,org.dhallj.core.Expr] = Right("\t\n" ≡ "\t\n")

scala> "assert: \"foo\\n\" ≡ Text/replace \"\\t\" \"foo\" ''\n\t\n''".parseExpr.flatMap(_.typeCheck)
val res1: scala.util.Either[org.dhallj.core.DhallException,org.dhallj.core.Expr] = Right("foo\n" ≡ "foo\n")

This bug had been around for a while, but the acceptance tests didn't catch it until this recent dhall-lang change.

Since the last release we've also bumped several dependency versions (#170), migrated from Travis CI to GitHub Actions (#169), and fixed a typo in the published metadata (#171).

This release is verified by MiMa to be backward-binary-compatible with 0.7.0-M1.

There is one known issue in this release, which was also a known issue in 0.5.0-M1, 0.6.0-M1, and 0.7.0-M1 (see the 0.5.0-M1 release notes for details), but it only affects the dhall-imports Scala module, and should not affect most usage.

dhallj - Dhall for Java 0.7.0-M1

Published by travisbrown almost 4 years ago

This release updates the Dhall language version from 18.0.0 to 19.0.0. It is compliant with the 19.0.0 release of the standard with one exception: Text/replace requires the source text to be non-abstract. This matches a change to the standard since 19.0.0 that has not been released yet.

This release also updates the SnakeYAML version for dhall-yaml from 1.26 to 1.27 and fixes a minor bug that affected the comparison of classpath imports in getFirstDiff.

There is one known issue in this release, which was also a known issue in 0.5.0-M1 and 0.6.0-M1 (see the 0.5.0-M1 release notes for details), but it only affects the dhall-imports Scala module, and should not affect most usage.

dhallj - Dhall for Java 0.6.0-M1

Published by travisbrown about 4 years ago

This release updates the Dhall language version from 17.1.0 to 18.0.0.

As part of this update, we've added a With constructor to the abstract syntax tree for Dhall expressions, which allows us to implement the optimization discussed here. For example, the following expression previously took several seconds to parse in previous releases (and had a desugared string representation that was millions of characters long):

{a = {=}}
  with a.b = {=}
  with a.b.c = {=}
  with a.b.c.d = {=}
  with a.b.c.d.e = {=}
  with a.b.c.d.e.f = {=}
  with a.b.c.d.e.f.g = {=}
  with a.b.c.d.e.f.g.h = {=}
  with a.b.c.d.e.f.g.h.i = {=}
  with a.b.c.d.e.f.g.h.i.j = {=}

It now parses, normalizes, etc. instantaneously.

There is one known issue in this release, which was also a known issue in 0.5.0-M1 (see the release notes for details), but it only affects the dhall-imports Scala module, and should not affect most usage.

dhallj - Dhall for Java 0.5.0-M1

Published by travisbrown about 4 years ago

This release updates the Dhall language version from 17.0.0 to 17.1.0, which introduces trailing delimiters (for list literals, record literals, record types, and union types). There are no other changes, and this release is verified to be binary compatible with both the 0.3.x and 0.4.x release series.

There is one known issue in this release: one normalization acceptance test and a few tests that verify that our hashing matches dhall-haskell are failing, apparently because of a bug in the caching mechanism in dhall-imports. This bug is not new in this release, and seems to have been turned up by a rearrangement in Prelude that happened since 17.0.0. It does not affect any code that only uses dhall-core, dhall-parser, dhall-imports-mini, etc.—only the dhall-imports module is affected. It also seems unlikely to affect most normal usage. We are investigating now and will publish an 0.5.0 release once the issue is resolved.

dhallj - Dhall for Java 0.4.0

Published by travisbrown over 4 years ago

This release updates the Dhall version to 17.0.0, which supports empty quoted labels (#89) and removes Optional/build and Optional/fold (#91). It also fixes an issue with escaping for quotation marks in Text values in dhall-circe (see #41 and #93).

All artifacts in this release are verified to be binary compatible with 0.3.x (but please note that some programs may normalize or type check differently than they did with 0.3.x because of the Optional removals).

dhallj - Dhall for Java 0.3.2

Published by travisbrown over 4 years ago

This release fixes some minor Text parsing issues involving bracketed Unicode escapes (e.g. "\u{0020}") and indentation removal in multiline strings (trailing whitespace wasn't being properly taken into account). Please see the changes in #86 for details.

This release also moves the org.dhallj.ast package from dhall-scala into its own module (dhall-ast). The dhall-scala module depends on dhall-ast, so this move won't affect dhall-scala users. It does mean that dhall-testing no longer requires a dhall-scala dependency (only dhall-ast), so users of dhall-testing may need to add an explicit dhall-scala dependency. Because there are no binary-incompatible changes and only users of a testing dependency (may) need to change their build, I decided it would be reasonable to make this change in a patch release.

dhallj - Dhall for Java 0.3.1

Published by travisbrown over 4 years ago

This release fixes some issues with escape sequences in text literals (see #77 for the details). All modules except dhall-parser are identical to 0.3.0, and the changes in dhall-parser are binary-compatible with 0.3.0.

dhallj - Dhall for Java 0.3.0

Published by travisbrown over 4 years ago

This release updates the supported Dhall language version from 15.0.0 to 16.0.0. All modules are guaranteed by MiMa to be binary compatible with their 0.2.0 versions.

Status

The status of this release is the same as for 0.2.0: we believe that it's 100% standard-compliant, and all of the Dhall acceptance tests are passing. There are several known issues:

This is still a very new project, and there are likely to be many bugs that we don't know about. Please use with care.

Bug fixes

This release includes a fix for the normalization of partially-saturated built-ins. Previously we followed dhall-haskell in reducing Natural/fold, List/fold, and Optional/fold when possible, even if they were not fully saturated. We now follow the language specification in only reducing fully-saturated built-ins.

This release also includes a fix (#57) by @amesgen for a bug (#56) in the escaping of quotation marks in the YAML exporter.

JavaScript support

Since 0.2.0 we've also introduced support for building JavaScript artifacts via Google's J2CL transpiler, providing a minimal JavaScript API for Dhall parsing, normalization, and type checking in 240K of (minimized) code. We aren't currently distributing these artifacts in any way, but we're hoping to change that in the near future. Please see #58 and #64 for details.

dhallj - Dhall for Java 0.2.0

Published by travisbrown over 4 years ago

This is the first release of the second release series of the Dhall for Java project.

Like the 0.1.x releases, this release supports version 15.0.0 of the Dhall language and (where relevant) the Dhall Prelude, with one exception: we don't support quoted URL paths, which were deprecated in 15.0.0 and will be removed in 17.0.0.

Status

We believe that this release is 100% standard-compliant; all of the Dhall acceptance tests are now passing.

There are several known issues:

Please note that we follow the current 1.31.1 release of dhall-haskell in reducing partially saturated built-ins, although this is not the behavior indicated in the language specification. We'll publish a new release with the specified behavior as soon as there's a dhall-haskell release with the fix.

This is still a very new project, and there are likely to be many bugs that we don't know about. Please use with care.

Bug fixes

This release fixes several bugs in 0.1.x:

  • The parser now accepts expressions like []: List Natural: Type (see #36 for details).
  • Newlines are now escaped properly in YAML output (see #38 and the report by @amesgen in #27).
  • Local imports now support quoted paths (thanks to @TimWSpence in #35).
  • The dhall-imports module no longer depends on a specific http4s client (thanks to @amesgen in #30).
  • All Java modules are built with -target 1.7 (previously only dhall-core had been; see #15 and #28).

New features

This release introduces an extension to the language specification to support local imports from the JVM classpath (see this thread and @TimWSpence's work in #32 and #33 for details).

Compatibility

This release is not guaranteed to be binary-compatible with 0.1.x, although most modules have few or no breaking changes and should be mostly source-compatible. The dhall-imports module is the only exception: its API has changed significantly (see e.g. #32, #45, #49, and #50). This release is also not guaranteed to be binary-compatible with 0.3.x or other future release series, but after the dhall-imports reworking here we don't anticipate any major API changes.

dhallj - Dhall for Java 0.1.1

Published by travisbrown over 4 years ago

This is the second release of the Dhall for Java project. Please see the 0.1.0 release notes for more detailed information about the 0.1.x release series.

This release supports version 15.0.0 of the Dhall language and (where relevant) the Dhall Prelude, with one exception: we don't support quoted URL paths, which were deprecated in 15.0.0 and will be removed in 17.0.0.

Binary compatibility

All modules in this patch release are verified by MiMa to be binary-compatible with their 0.1.0 counterparts (note that this doesn't apply to dhall-cats, which is new in this release). We follow semantic versioning in not making any guarantees about binary compatibility between pre-1.0 minor versions, but we do guarantee backward binary compatibility between patch versions in each individual 0.x series.

Bug fixes

This release fixes two bugs that were introduced in 0.1.0:

  • The parser accepts # in double-quoted text literals (thanks to @amesgen for reporting this in #21).
  • The JSON exporter now correctly escapes \" (such as you'd get from Text/show).

Note that this second bug affected all JSON and YAML export (i.e. in dhall-core, dhall-circe, dhall-jawn, and dhall-yaml).

New features

This release also introduces one new feature and a new module:

  • Duplicate imports within a single import resolution run are now cached in dhall-imports (see #18 by @TimWSpence).
  • There's a new dhall-cats module (which currently only abstracts some generic stuff out of dhall-imports; see #25).

The support for duplicate import caching means we're also able to run a few more of the acceptance tests.

dhallj - Dhall for Java 0.1.0

Published by travisbrown over 4 years ago

This is the first release of the Dhall for Java project.

Status

Please note that this release is not 100% standard-compliant, and has several known issues:

We're working on fixing these issues, but we believe that they're unlikely to affect normal usage, and we're publishing this release as a preview.

Modules

This release includes the following pure Java modules:

  • dhall-core is a Java library with no dependencies that provides β- and α-normalization, type-checking, printing, CBOR encoding and decoding, and (basic) JSON export.
  • dhall-parser is a Java library that depends only on dhall-core and that supports parsing strings and input streams as Dhall expressions.
  • dhall-yaml is a Java library that depends only on dhall-core and SnakeYAML and that supports exporting Dhall expressions to YAML.
  • dhall-imports-mini is a Java library that depends on dhall-core and dhall-parser and supports basic import resolution (no remote imports and no caching).
  • dhall-prelude is a Java library that depends only on dhall-core and provides a "pre-compiled" version of the Dhall Prelude.

There are also several Scala modules that are cross-published for Scala 2.12 and 2.13:

  • dhall-scala is a Scala wrapper for dhall-core, dhall-parser, and dhall-imports-mini.
  • dhall-scala-codec provides type classes for converting Dhall expressions to and from Scala types.
  • dhall-imports is a Scala library that depends on http4s and that provides a more complete implementation of import resolution than dhall-imports-mini.
  • dhall-testing provides ScalaCheck type class instances for dhall-core's Expr for use in property-based tests.
  • dhall-circe provides conversions between Dhall expressions and Circe's JSON representation.
  • dhall-jawn provides support for converting Dhall expressions to the JSON representation of any other Scala JSON library that has a Jawn facade.
  • dhall-javagen takes the dhall-core representation of a Dhall expression and generates Java code that will build the dhall-core representation of that expression (used to create dhall-prelude).

Please see the general project description for more information about these modules.