Skip to content

Releases: grasph/wrapit

v1.8.0

07 Jan 16:17

Choose a tag to compare

New features

  • Extend report with the lists of vetoed entities.
  • Possibility to override a Base method by mapping the C++ name to Base.xxxx where xxx is the Base function to override.

Fixes and behaviour changes

  • Fix order of parameter of apply_type<>() for wrapper of template classes, when the class itself is used in the parameters
  • Changed the verbosity level of messages about vetoed entities to >= 2.

Full Changelog: v1.7.0...v1.8.0


Contributors to the code update with respect to release 1.7.0: Philippe Gras

v1.7.0

10 Oct 20:24

Choose a tag to compare

New features

Note a release v1.6.0 was tagged in the github repository, but with no file bundle published in this release section and without release notes. The release note below covers changes since v1.5.0.

List of new features

  • Automation Generation of StictlyTypedNumber argument type.
  • Multiple inheritance
  • C++-to-C++ type map (experimental)
  • Argument name support
  • Runtime switch for verbose impot
  • Class ordering constraints
  • CxxWrap v0.17.x support

Details on each new features follow.

Automation Generation of StictlyTypedNumber argument type.

By default, for method arguments, CxxWrap maps any integer types to Integer and
floating point types to AbstractFloat, extending e.g., a function f(int) to
f(short), and making the required implicit type cnversions. This causes two
problems in case the C++ code already overloads the function for different
integer or floating types:

  • a wrong overloaded function can be called
  • it prevents module precompilation with an error about "method overwrite".

With this modification, jlcxx:StrictlyTypesNumber<> is used in the definition of
the wrappers of functions overloaded for different number types, to disable the
type widening. Note it does also in interger type is overloaded by a floating
point type, which is not nesseraly. This will be eventual be changed.

Multiple inheritance

Wrappers are now generated for public methods coming from other inheritances than the one mapped to Julia.

C++-to-C++ type (experimental)

Add the possibility to change the type of a function pass-by-value argument or return value exposed to CxxWrap to an equivalent type (either as alias or via a cast function) by providing a map in the new configuration parameter cxx2cxx_type_map.

Argument name support

If code is generated for CxxWrap release 0.15.0 or above, then the method argument names are passed to their julia wrapper with the jlcxx::argname featured added with this release.

Runtime switch for verbose impot

Add suppport to enable verbose import at runtime by defining the WRAPIT_VERBOSE_INPUT environment variable, which as the same effect as the VERBOSE_INPUT compilation option.

Class ordering constraints

New class_order_contraints configuration parameter to allow tuning of type wrapper declaration order

CxxWrap v0.17.x support

Adde support for CxxWrap v0.17.x and made runtime check of libcxxwrap release more strict

Behaviour Improvements

  • Change behaviour in case of error in the parsed code. Now the errors found by clang are displayed and no code is generated (except if forced by the ignore_parsing_errors configurartion parameter). In particular, this prevents to have function argument types silently changed to int in case of a missing header.
  • Disable generation of function that returns a function pointer.
  • Prevent generation of wrapper of deleted copy operators.
  • Disable generation of wrapper of std containers deque, queue, set, multiset natively supported by CxxWrap.
  • "void" return type is removed from the constructor signatures. This is a breaking change of the veto file: vetoed contructors must be listed with no return type.

Bug fixes

  • Update mode now set to false as default, as it was expected to be.
  • Fix wrapper of template class methods that uses one or more argument whose type is defined within same class (issue #72)
  • Fix issue with anonymous struct that was leading to generation of invalid code. They are no ignored as they were expected to be. That solves the issue #71

Full Changelog: v1.5.0...v1.7.0


Contributors to the code update with respect to release 1.5.0 (surname alphabetic order): Erwan Demairy (issue report), Philippe Gras, Dennis Ogiermann (issue report)

v1.5.0

20 Feb 10:44

Choose a tag to compare

New features

  • Installation installs now the examples along the wrapit executable;
  • Autovetoed function listed in the report file;
  • Propagate autoveto to functions using a vetoed type;
  • Emission of a logging Message indicating the reason when STL support is added to a type (with verbose level ≥ 1);
  • Experimental bit-to-bit type mapping generation;
  • Support of old cmake releases with no --fresh option for the unit tests and better cleanup of files let by previous runs before launching a unit test;
  • Use systematically lambda functions in the method wrappers, after check that there was no performance penalty, while it was used only when some arguments had default values. It fixes issue with some particular cases, where the function pointer cast used to select the proper method signature in case of function overriding;
  • Use systematically lambda functions in the method wrappers, after check that there was no performance penalty, while it was used only when some arguments had default values. It fixes issue with some particular cases, where the function pointer cast used to select the proper method signature in case of function overriding;

Fixes

  • Fix the issue of invalid generated code, when wrapit was built with LLVM libraries more recent than release 13;
  • Fix namespace handling bug for array of pointers (see issue #64);
  • Fix of cmake for Julia < 1.9;
  • Fix support of 'inheritances' configuration parameter: only no-parent spec ("A:") was respected; Extend
    New build option to download and build LLVM+clang (experimental);
  • Add unit tests for the issues fixed by this release.

Full change log: v1.4.0...v1.5.0


Contributors to the code update with respect to the previous release (surname alphabetic order): Philippe Gras, Pere Mato, Dennis Ogiermann.

v1.4.0

27 Jul 19:12

Choose a tag to compare

  • Support for customization of the julia function binding name: julia_names configuration parameter. See doc/config.md

Full Changelog: v1.3.3...v1.4.0


Contributors to the code update with respect to the previous release: Philippe Gras

v1.3.3

22 Jun 13:52
1bd07c7

Choose a tag to compare

  • Improved --version display in case of a binary build from a not-tagged development version.
  • Add support for enum forward declarations.
  • Source directory of generated Julia module customizable with the out_jl_subdir configurable.
  • Improved documentation: document vetoed_copy_ctor_classes config option; add a FAQ with useful tips.
  • Add support for jlcxx::Array and jlcxx::ArrayRef.
  • Support of CxxWrap 0.16

Full Changelog: v1.3.2...v1.3.3


Contributors to the code update with respect to the previous release: Philippe Gras and James Wrigley

v1.3.2

02 Jun 12:54

Choose a tag to compare

  • Fix a precompilation invalidation that lead to precompilation of the generated julia package at each module import.
  • Fix compilation of ex002-ROOT example on macOS

v1.3.1

26 Mar 10:42

Choose a tag to compare

Fix compilation for the _jll package.

v1.3.0

24 Mar 08:14
2ff1abe

Choose a tag to compare

Add support for CxxWrap 0.15.x and several improvements.

CxxWrap 0.15.x support

The CxxWrap version the code should be generated for can now be selected using the new cxxwrap_version configuration parameter, and different code will be generated for versions before and after 0.15.0.

⚠️ Due to a change in the API, wrapping of STL vectors of object pointers does not work with version 0.15.0. More details in
JuliaInterop/CxxWrap.jl#419. The unit tests and the ROOT example that use such vector are configured to use 0.14.x version for now.

Other improvements:

  • new --get command line option to retrieve values of some parameters;
  • new --add-cfg command line option to configure parameter normally set in the .wit configuration file;
  • fixed generation of the random uuid, which was always the same;
  • Add check of the versions of the libcxxwrap when compiling and when running the code.
  • cleanup of Julia package dependencies installation and version handling; Project setting from runtests.jl which is not needed anymore, as each test runs within its own temporary Julia project, was removed.

Contributors to the code update with respect to the previous release: Philippe Gras.

v1.2.0

26 Feb 18:46

Choose a tag to compare

  • [BREAKING CHANGE] In order to allow loading the Julia module without having to set LD_LIBRARY_PATH environment variable or copy the shared library in one of the system library directories, the path is not set relatively to the location of the Julia module file. The Julia module file is now put in a src subdirectory of the module directory, whose location is defined by out_jl_dir and default a directory called as the module and the library is searched in the deps subdirectory: previous out_jl_dir =X/Y/Z/src should be changed to out_jl_dir =X/Y/Z as src will be systematically added. A Project.toml file is also created, to allow installation of the package a uuid is generated. Now, the Julia module directory looks like
MyWrapper/
  ├── Project.toml
  ├── deps
  │   └── libjlMyWrapper.so
  └── src
       └── MyWrapper.jl

The old behaviour can be restored by setting the lib_basename parameter to lib<module_name>, where <module_name> is the name of the module defined with the module_name parameter.

  • Added support for building the generated code with cmake:
    • generation of a file with useful variables to be included in a cmake build configuration file;
    • added a cmake build configuration sample for the ex001-HelloWorld example.
    • migrated most of the unit tests (from the test directory) to cmake.
    • added the --output-prefix command-line option to prefix all output paths with a directory path, useful for the cmake out-of-source build.
  • The remaining plain Makefiles were modified to do out-of-source build as cmake.
  • Extended the ex002-ROOT example to add TTRee support, including writing TTrees.
  • The WRAPIT macro is now assumed to be defined when parsing the input header file (change in the default value of the macro_definitions parameter).
  • New parameters (N) or parameters whose default value was changed (D): macro_definitions (D), lib_basename (D), project_toml_fname (N), uuid (N), version (N)
  • New command-line options: --clang, --output-prefix

Contributors to the code update with respect to the previous release (alphabetic order): Philippe Gras, Greame A. Stewart, Pere Mato

v1.1.1

22 Dec 14:36

Choose a tag to compare

  • Bug fix: automatic wrapping of types used by functions was no more effective in v1.1.0.