Skip to content

Releases: cross-language-cpp/djinni-generator

Latest development build

01 Jan 13:33
719e0a7
Compare
Choose a tag to compare
Pre-release

Commits

v1.4.1

29 Dec 09:37
@a4z a4z
b2a9f83
Compare
Choose a tag to compare

Minor update of the generated executable that prevented running the djinni command in a process without a shell, as CMake does.

What's Changed

  • Add back shebang in generated assembly by @a4z in #161

Full Changelog: v1.4.0...v1.4.1

v1.4.0

18 Nov 19:31
@a4z a4z
a965d71
Compare
Choose a tag to compare

What's New

Deprecation annotation in IDL files:

  • feat(deprecated): generate language specific deprecation markup by @eakoli in #156
  • Documentation for PR #156, the new deprecation feature by @a4z in #158

It is now possible to deprecate attributes, functions or entities in an IDL file and the generator will generate according deprecation attributes in C++, Java and Objective-C.

What's Changed

Improvements for the JSON serialization:

  • Make JSON serialization methods static inline by @mutagene in #136

Fix potential integer overflow:

  • [142] Shift flags into unsigned integers by @a4z in #143

Toolchain update:

  • Maintenance toolchain update 2023 by @a4z in #159
    This change updates sbt, updates sbt plugins, sets the Scala version to the latest of 2.12, removes all warnings, and uses explicit typing to improve code readability.

Infrastructure

A stale bot has been added, which deactivated itself after having no actions going on in this repo for 60 days 🤡
We might turn the bot on again in the future.

Full changelog

Full Changelog: v1.3.2...v1.4.0

v1.3.2

12 Jul 17:18
@a4z a4z
8cf3a85
Compare
Choose a tag to compare

What's Changed

  • Use simplified method for converting types to/from json by @mutagene in #131
    Implements the basic recommended method for converting to/from json as described in the documentation.

  • Fix an issue with nested generic types by @eakoli in #132
    This fixes an issue where if a generic external type is used as a template type its generic information would not be generated properly for objc.

  • Make NSObject based protocols optional by @a4z in #134
    This enables or disables to be generated Objective-C protocols based on NSObject. The default of --objc-strict-protocols is true since this is current behaviour. For more information about that toggle and the reason why it was added, please see #133 .

Full Changelog: v1.3.1...v1.3.2

v1.3.1

04 May 15:40
1d5fbcb
Compare
Choose a tag to compare

Maintenance Release

Includes a few fixes that have been introduced in the last months.

Thanks to @FanglinIfolor and @delaitre-manfrotto for contributing to this release!

Fixed

  • --cpp-nn-header parameter values are now quoted by default, as one would expect. Now this will generate valid code: --cpp-nn-header nn.hpp (1d5fbcb)
  • Setting a --cpp-nn-header does now work when targeting C++/CLI. (1d5fbcb)
  • In C++/CLI a forward declaration of any used ref class-type is added to allow interfaces to depend on each other. (1d5fbcb)
  • The tests can now be executed on Windows. (1d5fbcb)
  • sbt on Windows does now build a .bat file that can be directly executed without the need to manually rename it.
  • JNI enum flags are now handled better in code. This does not have an effect on the generated code. (649763f)

Update Notice

If you are currently setting a nn header with quotes (like so: --cpp-nn-header "nn.hpp"), make sure to remove the quotes, otherwise the generator will produce invalid code.

v1.3.0

25 Nov 19:50
2a70c3a
Compare
Choose a tag to compare

Thanks to @paulo-coutinho, @mutagene, @ngmeyer & @eakoli for contributing to this release!

Should be used together with djinni-support-lib v1.2.0

Added

  • Generated C++ records can be serialized and deserialized with nlohmann/json, if --cpp-json-serialization nlohmann_json is passed to the generator. Read more... (#99)
    This feature has been ported from hiennguyenle/finn.
  • The generated Objective-C protocols do now conform to NSObject. (#117, #118)
  • Generics are now supported for extern types in Objective-C & C++/CLI. (#113)
    If generic: true is set in the type definition YAML, the generic type information is populated to the generated interfaces. This feature already existed for Java and has now been extended to Objective-C & C++/CLI. A usage example can be found here in the integration tests.

Changed

  • Under the hood some dependencies have been updated (#111):
    • scala 2.13.6 (the latest scala 2.x release)
    • sbt 1.5.5
    • scalatest 3.2.10
    • scala-parser-combinators 2.1.0
    • snakeyaml 1.29

Note

Any contributions to this repository now have to be formatted with scalafmt in order to pass the PR checks. Make sure to run sbt scalafmtAll before committing your changes!

v1.2.0

25 Sep 17:04
5644f72
Compare
Choose a tag to compare

Added

  • In C++, records are generated with a default constructor that initializes all members by default. This can be disabled with the new option --cpp-omit-default-record-constructor <true/false>. (#79)
  • finalize methods in the generated Java gluecode are annotated with SuppressWarnings("deprecation"). Using finalize is inevitable until a better solution is found . (#16)

Changed

  • The generated C wrapper functions do not refer to "Python" in their names any more. The long term goal is to make the C wrapper a general purpose interface that can be used for bridging to other languages as well.

Removed

  • In an attempt to clean up the CLI, all --<lang>-base-lib-include-prefix parameters have been removed, because we see no need to set a different include path than provided by the cross-language-cpp/djinni-support-lib. The default include paths did not change (djinni/<lang>). (#82)

Fixed

  • The list of generated files (--list-out-files) was missing the Objective-C Bridging Header. It is now included in the list as expected. (#54)
  • In C++/CLI types would not always be specified by their full namespace type name. (#78)
  • The Swift bridging header would be created as a 0 byte file if —skip-generation true was passed. This is now fixed and no bridging header is generated if —skip-generation true was passed. (#80)
  • Comments would not be copied to C++/CLI for interface and to C++ for enum. Comments are now copied consistently to all languages. (#67)
  • Extern Djinni flag was not marshalled properly for JNI. (#90)

v1.1.0

18 Jun 20:03
74e9182
Compare
Choose a tag to compare

Added

  • New parameter --objcpp-header-out that allows Objective-C++ headers to be placed in a separate folder from the sources.

Fixed

  • If the optional parameter --objc-type-prefix wasn't set, the generated Objective-C code did not compile because there where name collisions between the generated Objective-C & C++ classes. This is now fixed. To avoid collisions, at least one of --cpp-namespace or --objc-type-prefix parameters have to be defined when generating Objective-C code. (#55)
  • Including external interfaces with non-null references in C++ didn't work. This is now handled correctly. (#61)

v1.0.0

07 May 10:10
2438082
Compare
Choose a tag to compare

Added

  • New --jni-generate-main parameter. The paramater, if true, generates a file djinni_jni_main.cpp that includes the djinni/jni/djinni_jni_main.hpp header provided by djinni-support-lib. That way by default the user automatically gets a default JNI_OnLoad implementation if he builds a shared library from all generated sources.
    This requires the djinni-support-lib v1.0.0, that comes with the required header file. (#49)
  • Modularization documentation from dropbox/djinni is now available on djinni.xlcpp.dev

Fixed

  • YAML type definitions are not required to include definitions for all possible target languages any more. If the YAML misses a target language that is required for generation, it will now fail gracefully. (#48)

Why is this a major release?

The new parameter --jni-generate-main is enabled by default, which may break existing setups. If you don't want to use the new mechanism, disable it and everything should be as it was before.

v0.5.0

23 Apr 21:01
a82dc9f
Compare
Choose a tag to compare

Added

Fixed

  • All references to std::experimental::nullopt were removed from the code generated by the C wrapper (for Python).