adl
adl copied to clipboard
1.0 Release Features
ADL has been actively used in a range of projects for more than 4 years. It's worked well, though usage has suggested some improvements that are difficult to make in a backwards compatible fashion. Hence it is proposed that these changes be made on the master branch leading to a 1.0 release. In the meantime, bug fixes to exist releases can be made on a release-0.x branch.
Proposed 1.0 features include:
- [x] rename
Voidprimitive toUnit - [x] Address issues with Unit type in java (https://github.com/timbod7/adl/issues/56)
- [x] Change
sys.types.Mapserialization to a list of map entries (not pairs) - [ ] Fix java builders to avoid runtime errors on incomplete construction
- [x] Make enums in typescript be type level strings
Feel free to propose other changes in the thread.
- [x] Remove
Error<T>type from sys.types (it's been replaced withResult<T,E>).
- [ ] packaging system.
packaging system
Interesting! Need's some thought and discussion...
- [ ] lsp
More options for union serialisation.
I particular ability to have a unit type field of a union serialise as users choice of null, {}, [] (or the existing: field label)
So that the field can change in future to become any Nullable<T>, struct or Vector<T>
Ability to opt out of unions code-generating as an enum. It complicates generic tools because unions that generate as enum have to be treated differently and during development a type can flip between being a normal union and being an enum when a field is added/removed.
Implement Nullable<T> for c++ (target c++17 and use std::optional)
I have added a comment on #97 (regarding strict fields). I bring this up here, because this is something that could affect backwards compatibility.
In c++ - given ADL module
module aa.bb.cc {};
it should be changed (non-backwards compatible) to generate c++ code in namespaces:
namespace aa {
namespace bb {
namespace cc {
// ...
}}}
Currently it generates to namespace:
namespace ADL {
namespace aa {
namespace bb {
namespace cc {
// ...
}}}
which IIUC isn't requested or controlled by the caller.
it should be changed (non-backwards compatible)
I don't think this needs to be a backward imcompatible change - don't we just need a flag for c++ that controls into which namespace ADL code is generated? We have equivalent flags for most other target languages.
Drop the baked in json support in the C++ backend, and use nlohmann json.
There's now a milestone for "release 1.0", which will be added to issues as they make the cut.
@gmhta I'm leaving:
- lsp
- packaging system
out of the 1.0 release milestone, as I think they can be added when time permits without breaking existing usage.
@paul-thompson-helix
nullable support in c++ has already landed in f42788ea4d2be23fe100dbbd9da5e8a6204a2df2
Also see the release-1.0 branch for progress on these issues.