To be released.
-
Union tags became possible to have
default
keyword. It's useful for migrating a record type to a union type. [#13, #227] -
Enum members and union tags became disallowed to shadow an other type name in a module. It's because in some target languages we compile both types and members/tags into objects that share the same namespace. In Python, both types and union tags are compiled into classes.
For example, the following definitions had been allowed, but now became disallowed:
unboxed foo (text); // ^~~ enum bar = foo | baz; // ^~~
record foo (text a); // ^~~ union bar = foo (text b) | baz (text c); // ^~~
This rule is applied even between a member/tag and its belonging enum/union type as well. The following definitions are disallowed:
enum foo = foo | bar; ^~~ ^~~
union bar = foo (text a) | bar (text b); ^~~ ^~~
If you already have used the same name for a type and a tag, you can avoid breaking backward compatibility of serialization by specifying a different behind name. For example, if you've had a definition like:
enum foo = foo | bar; // ^~~ ^~~
It can be changed like the following:
enum foo = foo-renamed/foo | bar; // ^~~~~~~~~~~ ^~~
-
Enum members and union tags became disallowed to shadow other enum members and union tags even if they belong to an other type. It's because in some target language we compile them into objects that share the same namespace, regardless of their belonging type.
For example, the following definitions had been allowed, but now became disallowed:
enum foo = bar | baz; // ^~~ enum qux = quux | bar; // ^~~
union foo = bar (text a) | baz (text b); // ^~~ enum qux = quux | bar; // ^~~
union foo = bar (text a) | baz (text b); // ^~~ union qux = quux (text c) | baz (text d); // ^~~
If you already have used the same name for members/tags of different enum/union types, you can avoid breaking backward compatibility of serialization by specifying a different behind name. For example, if you've had a definition like:
enum foo = bar | baz; // ^~~ union qux = bar (text a) | quux (text b); // ^~~
It can be changed like the following:
enum foo = bar-renamed/bar | baz; // ^~~~~~~~~~~ ^~~ union qux = bar (text a) | quux (text b);
-
Fixed a compiler bug that an error message on name duplicates had referred to a wrong line/column number. [#255]
-
Added aliased import. It's handy to avoid a name shadowing. [#217, #258]
import iso (country as iso-country); import types (country);
-
A new required configuration
targets.docs.title
was added. It's rendered in generated HTML documents'<title>
element. [#253] -
Docs now have a sidebar which contains table of contents. [#257]
-
Fixed a bug that a module-level docs hadn't been rendered. Now it's shown in the right below the module name. [#259]
-
Generated Python packages became to have two entry points (a feature provided by setuptools):
nirum.modules
: It maps Nirum modules to Python modules. Nirum module paths are normalized to avoid underscores and upper letters and use hyphens and lower letters instead, e.g.,foo-bar.baz
. The table works well withrenames
settings as well.nirum.classes
: It maps Nirum types (including services) to Python classes. Nirum type names are qualified and their leading module paths are also normalized (the same rule tonirum.modules
applies here).
-
All integral types (
int32
,int64
, andbigint
) became represented asnumbers.Integral
instead ofint
.There's no change to Python 3.
-
The
uri
type became represented asbasestring
instead ofunicode
in Python 2, since URI (unlike IRI) is limited to a subset of ASCII character set.There's no change to Python 3.
-
Generated type constructors became to validate field value's range or format besides class checks: range checks for
int32
/int64
, time zone (tzinfo
) awareness check fordatetime
, and basic format check foruri
. -
Fixed a bug that generated service methods hadn't checked its arguments before its transport sends a payload. [#220]
-
Fixed a bug that field/parameter names that use a module name of the Python standard library cause runtime
TypeError
s (due to name shadowing). Under the hood, all generatedimport
s are now aliased with a name prefixed an underscore.
- The officially distributed executable binaries for Linux became dependent on glibc again.
- The official Docker images became based on Debian (minideb) instead of Alpine Linux. It's because Alpine Linux doesn't provide GHC 8.2 as of March 2018.
Released on March 15, 2018.
- The official Docker images became to have CA certificates.
Released on March 15, 2018.
- Fixed a broken build of the official Docker images.
Released on March 1, 2018.
- Fixed record/union deserializers to ignore unknown fields in data payload.
Deserializers had raised
KeyError
before. [#232]
Released on February 18, 2018.
- Package is now a new compilation unit of Nirum. Every Nirum package needs package.toml manifest file. [#83, #99]
- Since a Nirum package can be compiled to more than one target languages,
the
nirum
command became to have-t
/--target
required parameter. [#106, #111, #114] - Added
-w
/--watch
mode. [#91, #104, #218] - Annotations became able to have multiple arguments and every parameter became necessary to having its name (keyword). [#178, #190, #197]
- Service methods became able to omit their return types. [#179, #199 by Yang Chun Ung]
- Added
@error
annotation to make a type to subclass an exception base class (e.g.,Exception
in Python) when it's compiled to OO languages. [#38, #127] - Union tag docstrings in parentheses became allowed. [#153, #154]
- Fixed a parser bug that a bare identifier (i.e., unquoted identifier) cannot
start with a reserved keyword, e.g.,
types
(type
is reserved),enumeration
(enum
is reserved). [#184, #189] - Fixed a parser bug that
import
names had been disallowing to have a trailing comma or newlines. [#202] - Fixed the
nirum
command bug that it had always terminated with exit code 0 even when it errored. [#97, #108]
- A new target,
docs
is now available. To generate docs for a Nirum package, specify--target docs
option to thenirum
command. [#10, #113, #116, #125, #131, #152, #170, #223]
- Now supports Python 2.7 besides Python 3.4 or later. [#50, #85, #93, #117, nirum-python #22]
- Now requires nirum-python 0.6.0 or later. [#119, #141, #146]
- From now on, in order to compile a Nirum package to Python,
package.toml manifest need
targets.python
section andtargets.python.name
field. [#99] - Added
targets.python.minimum_runtime
option to specify the minimum version of nirum-python runtime library. [#118, #119] - Added
targets.python.renames
option to rename module names when they are compiled to a Python module. [#121] - More package metadata became configurable. [#100]
- Added new transport layer. [#149, nirum-python #79, nirum-python #92]
- Generated constructors of service clients became to take a
nirum.transport.Transport
instance. - Followed renamed/moved import paths of the runtime classes
(e.g.,
nirum.rpc.Service
became tonirum.service.Service
). - The way to avoid name collision between generated types and runtime
classes is changed. The runtime library had provided alternative names
like
service_type
forService
and generated imports had been likefrom nirum.rpc import service_type
, but it's nowfrom nirum.service import Service as service_type
.
- Generated constructors of service clients became to take a
- Record/union tag fields of an optional type can be omitted when the constructor is called. [#70, #165 by Seunghun Lee]
- Generated tag classes became qualified under its union class
(e.g.,
Shape.Rectangle
instead ofRectangle
). Deprecated the old style and it is going to be obsolete in the near future. [#68, #193] - Generated service clients became qualified under its service class
(e.g.,
FooService.Client
instead ofFooService_Client
). Deprecated the old style and it is going to be obsolete in the near future. [#167, #222]. - Generated serializers became independent from nirum-python runtime library. [#160, #201, #203, #204]
- Deserializers became to show multiple error messages at a time. [#168, #224]
- Generated Python classes became having
__nirum_type__
metadata for RTTI. [nirum-python #34, #192] - Generated service classes became having
__nirum_method_annotations__
metadata for processing annotations. [#194] - Docstrings in a Nirum schema became to generate corresponding Python docstrings. [#102, #128]
- Sets, lists, and maps became compiled to immutable data structures so that thay are easily hashable. [nirum-python #49, #123]
- Fixed a bug that implicit ancestor packages hadn't been generated even if they have submodules. [#92, #105]
- Fixed a bug that a generated Python code had raised
NameError
when a referring type is above than a referred type. [#138, nirum-python #88, #146] - Fixed a bug that a generated Python
enum
code had became broken when an enum type has a member namedmro
. [#185, #188]
- The officially distributed executable binaries for Linux became independent from glibc; instead statically linked to musl. #216
- The Docker image now has
nirum
command inPATH
. [#155] - The Docker image became based and built on Alpine Linux so that the image is now much lighter.
Still unstable release. Released on September 26, 2016.
- The
boxed
keyword was renamed tounboxed
. [#65, #81] - Annotations became renewed and complete so that every type and module now can be annotated. [#40, #73]
- Docstrings became merely a syntactic sugar of
@docs
annotation. [#53, #57] - Fixed a parser bug which had failed to parse spaces right before/after tag parentheses. [#69, #71]
- Fixed a parser bug which had referred to a wrong line/column position on syntax error message when a trailing semicolon is missing. [#64]
- Services became to have their own client implementation of a name with
_Client
postfix when they are compiled to Python. [#52] - Generated types became to have
__hash__()
method so that they are now hashable. [#75, #76] - Fixed a bug that a Python class generated from a parameterless tag had been broken. [#55, #66]
- Introduced the official Docker image. The image repository is located to spoqa/nirum. [#48 by Minyoung Jeong]
Initial and unstable release for a demo session at PyCon APAC 2016. Released on August 14, 2016.