0.3.1
Release Notes
User-facing library changes
Here are the most notable changes:
New thresholds for inverses and conversions (#69):
-
The
inverse_as
family now safeguards conversions whose factor is
less than 1,000,000, instead of 1,000. So for example,
inverse_as(hertz, milli(seconds)(5))
won't compile anymore without
an explicit Rep; you would needmicro(seconds)
or smaller. This
makes inversion fully lossless for integral values up to 1,000! As
always, this doesn't affect floating point Rep; these are always
permitted. -
We slightly loosened the overflow safety surface to permit signed
32-bit integer conversions with a factor of 1,000,000. For example,
mega(hertz)(1u).as(hertz)
has always worked, but
mega(hertz)(1).as(hertz)
previously didn't. Now it does.
Improve QuantityMaker
and SingularNameFor
composition (#72):
- It is now possible to compose units such as
hertz
, whose singular
name is identical to its plural name. Compositions generally should
be much easier overall. The downside is that we now permit
grammatically incorrect combinations, such as(meters / seconds)
rather than(meters / second)
, but making that an error was probably
too heavy handed anyway.
Easy compatibility with nholthaus units:
- In #112, we added a file which users can add to their project, to set
up a correspondence between types in the nholthaus/units library, and
Au. This means you can pass an Au quantity to an API expecting an
equivalent nholthaus type, and vice versa! Formal documentation is
still pending (see #107 to follow along). However, interested users
can read the comments in the files added in #112 to see how to set it
up.
Here are the remaining library changes:
- Bugfix (#98):
inverse_as<Rep>(...)
did not have the correct Rep. - Bugfix (#100):
QuantityPoint
conversion could change Rep for small
integral types. - Bugfix (#119): Make default
Quantity
andQuantityPoint
constructorsnoexcept
, enablingstd::atomic
usage on gcc-9.
New units
fathoms
furlongs
knots
nautical_miles
Thanks to Randall Munroe for supplying the use case:
https://xkcd.com/2585/
Additionally, we added support for these new SI prefixes:
quetta
ronna
ronto
quecto
Tooling updates
- Added
buildifier
5.1.0. - Upgraded
bazel
to 6.0.0. - Tools that wrap bazel commands now give a (transient) message
explaining why they're slow on the first execution. bazel test
now shows output for failed tests by default.- We now compile with
-Wextra
. (Its absence was an oversight.) - Warnings are treated as errors, but only in CI (to facilitate
test-driven development).
Documentation updates
This was a major release for the documentation website. We added the
following pages:
- Development Setup
- Troubleshooting Guide
- Comparison of Alternatives
- Tutorials
- Au 101: Quantity Makers
- Au 102: API Types
- Au 103: Unit Conversions
- Reference Docs
Additionally, we made the following changes:
- Doc website now gets updated automatically on every push to main.
- Main landing page and README have public facing content, not
placeholders.
Repo updates
- Added Apache 2.0 license.
- Added security policy.
- Enabled automatic enforcement for:
- copyright headers
- buildifier linting
- SHA-pinned GitHub actions (for security)
- Upgraded
bazelisk
to 1.16.0, fixing deprecation warning.
Closed Issues
Here are all of the issues that were closed between these releases.
(Note that the resolution is at the level of days, so some of these
issues might show up in the notes for more than one release.)
https://github.com/aurora-opensource/au/issues?q=is%3Aissue+closed%3A2022-12-20..2023-03-18
Contributors
Thanks to those who authored or reviewed PRs, or filed or participated
in Issues! Alphabetically: