JavaCPP v1.5.1 Release Notes

Release Date: 2019-07-09 // 3 months ago
    • Make sure Generator ignores deallocators on const values returned from adapters (issue #317)
    • Accelerate Loader.extractResource() for directories already cached, also preventing failures (issue #197)
    • Avoid Parser writing allocateArray() when single int, long, float, or double constructor already exists (issue bytedeco/javacv#1224)
    • Expose all platform properties to process executed with Builder.buildCommand via environment variables, with names uppercase and all . replaced with _
    • Let Parser add @Name or @Namespace annotations to non-translated enumerators as well
    • Make Parser pick up the names of type aliases for function pointers declared with using and prevent NullPointerException
    • Fix Parser failing on lambda expressions found inside member initialization lists of constructors
    • Add special support for constexpr variables in Parser by disabling their member setters automatically
    • Fix Parser not placing & and * at the right place inside template arguments containing function declarations
    • Support more basic containers in Parser by comparing their names in a case-insensitive manner and add annotations missing from index types
    • Fix Generator taking the @By* annotation of the paired method for the index instead of the value argument of a setter
    • Fix Parser sometimes considering global C++ identifiers starting with :: as if they were local
    • Change default value for Pointer.maxPhysicalBytes to Pointer.maxBytes + Runtime.maxMemory() (pull #310)
    • Add Loader.getVersion() and checkVersion() to get versions of Maven artifacts and check against JavaCPP (issue #194)
    • Fix compile errors caused by Generator occurring with callback functions returning a value by reference
    • Make Builder expand entries from the user class path with * as basename to all JAR files in the directory
    • Prevent Loader from creating symbolic links pointing to themselves by comparing with Path.normalize() (pull #307)
    • Fix Loader.cacheResource() with the "jrt" protocol as used by jlink (pull #305)
    • Fix compiler error with SharedPtrAdapter and UniquePtrAdapter in callback functions (pull #304)
    • Start Pointer.DeallocatorThread with setContextClassLoader(null) as required by containers (issue deeplearning4j/deeplearning4j#7737)
    • Add -print command line option to access platform properties externally, for example, inside build scripts
    • Add to InfoMap default pointer and value types for ssize_t, char16_t, char32_t, std::u16string, and std::u32string
    • Support multiple instances of FunctionPointer subclasses, up to the value in @Allocator(max=...) (issue bytedeco/javacpp-presets#683)
    • Allow suffixing library names with : to specify exact relative paths to libraries, ignoring any additional prefix or suffix
    • Prevent Loader.load() from trying to load library files that do not exist or to create symbolic links to them
    • Let Loader.load() extract libraries suffixed with ##, but still ignored for copying by Builder
    • Make sure Loader.load() also initializes classes that are passed explicitly
    • Fix Loader.createLibraryLink() incorrectly truncating library versions when there is one before and another after the suffix
    • Iterate extensions of libraries or executables on Loader.load() in reverse to be consistent with properties overriding
    • Allow prefixing library names with : to have Loader consider them as filenames with prefix and suffix already included
    • Add Loader.loadGlobal() to load symbols globally as often required by Python libraries (issue ContinuumIO/anaconda-issues#6401)

Previous changes from v1.5

    • Have Parser output setter as dummy parameter name for setter methods to clarify usage
    • Add Indexer.strides(long... sizes) and use as default strides when not specified by the user
    • Add long... constructors, getters, and setters to CLongPointer and SizeTPointer for convenience
    • Fix some Generator issues with FunctionPointer passed or returned @ByPtrPtr
    • Use ModiTect to compile module-info.java with JDK 8 and preserve backward compatibility
    • Add platform.executable and platform.executablepath properties to bundle executables and extract them with Loader.load()
    • Create symbolic links for all libraries preloaded by Loader as they get loaded to satisfy libraries like MKL
    • Prevent ClassCastException in Loader on illegal system properties (issue #289)
    • Fix Parser not replacing all type names of the base class with Info.flatten (issue #288)
    • Let BuildMojo return to the Maven project the detected host platform as ${javacpp.platform.host}
    • Have BuildMojo output a JPMS friendly name for the platform and extension back to the Maven project as ${javacpp.platform.module}
    • Add Builder.clean option to delete the outputDirectory before generating files
    • Let Parser pick up Info explicitly for all constructors by considering their names as functions (issue #284)
    • Fix Parser not always generating files using the simple names of classes
    • Add a BuildMojo.targetDirectories parameter to allow setting multiple directories where to find generated Java files
    • Add Parser support for attributes appearing after struct declarations (issue bytedeco/javacpp-presets#685)
    • Fix Parser overlooking Info for constructors inside namespaces or templates (issue #284)
    • Fix Parser applying some Info.annotations at the wrong place (issue #284)
    • Make Parser behave the same with @Properties having only one out of global or target value set
    • Enhance UniquePtrAdapter with the ability to move pointers out with the && operator
    • Let Parser map constructors also for abstract classes with Info.virtualize
    • Fix Parser taking the global package as the target package even when both are set
    • Consider @Properties(global=..., helper=...) class names without "." as relative to target (pull bytedeco/javacpp-presets#669)
    • Use regex in Parser to translate more Doxygen commands into Javadoc tags (pull #278 and pull #281)
    • Do not let Parser map operator=() when prefixing container name with const (pull #280)