cross-language-cpp / djinni Goto Github PK
View Code? Open in Web Editor NEWThis project forked from dropbox/djinni
A tool for generating cross-language type declarations and interface bindings.
Home Page: https://djinni.xlcpp.dev
This project forked from dropbox/djinni
A tool for generating cross-language type declarations and interface bindings.
Home Page: https://djinni.xlcpp.dev
As a project maintainer I need more feedback & help from other djinni-users to make this a true community-project.
Hello!
I've been trying to learn how to use djinni but I only found tutorials for the "old" structure.
How would I go about to use this new one instead?
The minimal steps to get a hello world to run properly/easily would be brilliant!
Inspired by @a4z's thoughts I'd like to propose splitting the single repo up into multiple sub-projects to separate the different components into self-contained codebases. This helps clean up the repo structure.
When analysing the current repo I could isolate the following self-contained components:
The main benefits would be:
sbt
project + documentation on how to use the cliDownsides & things that need further discussion:
I am looking forward to your thoughts on this wall of text
I just tried to add ticket #17 to a projects, and noticed that we might want to create projects for the different topic, at least,
Names might be subject to discuss, since naming is hard ;-)
iOS building is now supported in cmake, so it's unnecessary to package this now: https://github.com/cross-language-cpp/djinni/blob/master/cmake/ios.toolchain.cmake
I haven't used djinni before, but I have built iOS projects without the toolchain in cmake and I'm able to build fine :).
We have now multiple examples where people think this repo is the new official one, and the info about the repo split is not picked up.
We need to make this more visible.
My suggestion: make a new commit where all the code is removed, and only a README.md is left, explaining the most important details.
If you also think this is OK, @jothepro , than I will do that.
I as a code-owner want to automate testing of the codebase to avoid merging code with bugs or errors into the master branch.
For that I want to utilize Github-Actions to automatically run the existing tests (make test
) on every pull-request to the repository.
There is a branch that brings experimental python-support. I do understand why dropbox kept this in a feature-branch, because it never was in their personal interest & scope to support python.
Has anyone used the python branch? How do you think about it? Should we continue to focus on Java & ObjC or should we also be open to other languages?
My opinion:
I'd prefer merging python support into master (if it's feature-complete & works) and mark it as experimental in the documentation. Personally I have no interest in python support, but I think maintenance of the project will be easier if changes don't have to be ported over to the python-branch manually.
If we should find out that the python branch is not feature complete (it seems like it lacks any documentation, wich is a warning sign to me), I'd prefer dumping the branch instead of having to somehow maintaint it.
For being able to use the support lib system wide,
or package it with conan or vcpkg,
there should be a make install command
so that the installation of the needed files into the correct locations simply happens.
The IntelliJ Djinni Plugin published on the Jetbrains Marketplace does not support flags
:
Install the Plugin in IntelliJ IDEA and create a .djinni
file. Define a flags
-datatype like so:
my_flags = flags {
flag1;
}
The IDE will now hint you that it does not know about the flags
keyword.
For some reason I'm unable to find dependencies of sbt on a fresh instance of this repo. I'm unable to reproduce this issue on another computer that I ran the make command last week, so this must be a new issue with the maven repo.
$HOME/.ivy2/
is non-existentmake djinni_standalone
Output:
cd src && sbt assembly
[info] welcome to sbt 1.3.13 (Ubuntu Java 11.0.9.1)
[info] loading settings for project src-build from plugins.sbt ...
[info] loading project definition from /home/epicstar/git/djinni/src/project
[warn]
[warn] Note: Some unresolved dependencies have extra attributes. Check that these dependencies exist with the requested attributes.
[warn] com.eed3si9n:sbt-assembly:0.15.0 (sbtVersion=1.0, scalaVersion=2.12)
[warn]
[warn] Note: Unresolved dependencies path:
[error] sbt.librarymanagement.ResolveException: Error downloading com.eed3si9n:sbt-assembly;sbtVersion=1.0;scalaVersion=2.12:0.15.0
[error] Not found
[error] Not found
[error] not found: https://repo1.maven.org/maven2/com/eed3si9n/sbt-assembly_2.12_1.0/0.15.0/sbt-assembly-0.15.0.pom
[error] not found: /home/epicstar/.ivy2/local/com.eed3si9n/sbt-assembly/scala_2.12/sbt_1.0/0.15.0/ivys/ivy.xml
[error] download error: Caught javax.net.ssl.SSLHandshakeException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target (PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target) while downloading https://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/com.eed3si9n/sbt-assembly/scala_2.12/sbt_1.0/0.15.0/ivys/ivy.xml
[error] download error: Caught javax.net.ssl.SSLHandshakeException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target (PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target) while downloading https://repo.typesafe.com/typesafe/ivy-releases/com.eed3si9n/sbt-assembly/scala_2.12/sbt_1.0/0.15.0/ivys/ivy.xml
[error] at lmcoursier.CoursierDependencyResolution.unresolvedWarningOrThrow(CoursierDependencyResolution.scala:249)
[error] at lmcoursier.CoursierDependencyResolution.$anonfun$update$35(CoursierDependencyResolution.scala:218)
[error] at scala.util.Either$LeftProjection.map(Either.scala:573)
[error] at lmcoursier.CoursierDependencyResolution.update(CoursierDependencyResolution.scala:218)
[error] at sbt.librarymanagement.DependencyResolution.update(DependencyResolution.scala:60)
[error] at sbt.internal.LibraryManagement$.resolve$1(LibraryManagement.scala:52)
[error] at sbt.internal.LibraryManagement$.$anonfun$cachedUpdate$12(LibraryManagement.scala:102)
[error] at sbt.util.Tracked$.$anonfun$lastOutput$1(Tracked.scala:69)
[error] at sbt.internal.LibraryManagement$.$anonfun$cachedUpdate$20(LibraryManagement.scala:115)
[error] at scala.util.control.Exception$Catch.apply(Exception.scala:228)
[error] at sbt.internal.LibraryManagement$.$anonfun$cachedUpdate$11(LibraryManagement.scala:115)
[error] at sbt.internal.LibraryManagement$.$anonfun$cachedUpdate$11$adapted(LibraryManagement.scala:96)
[error] at sbt.util.Tracked$.$anonfun$inputChanged$1(Tracked.scala:150)
[error] at sbt.internal.LibraryManagement$.cachedUpdate(LibraryManagement.scala:129)
[error] at sbt.Classpaths$.$anonfun$updateTask0$5(Defaults.scala:2950)
[error] at scala.Function1.$anonfun$compose$1(Function1.scala:49)
[error] at sbt.internal.util.$tilde$greater.$anonfun$$u2219$1(TypeFunctions.scala:62)
[error] at sbt.std.Transform$$anon$4.work(Transform.scala:67)
[error] at sbt.Execute.$anonfun$submit$2(Execute.scala:281)
[error] at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:19)
[error] at sbt.Execute.work(Execute.scala:290)
[error] at sbt.Execute.$anonfun$submit$1(Execute.scala:281)
[error] at sbt.ConcurrentRestrictions$$anon$4.$anonfun$submitValid$1(ConcurrentRestrictions.scala:178)
[error] at sbt.CompletionService$$anon$2.call(CompletionService.scala:37)
[error] at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
[error] at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
[error] at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
[error] at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
[error] at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
[error] at java.base/java.lang.Thread.run(Thread.java:834)
[error] (update) sbt.librarymanagement.ResolveException: Error downloading com.eed3si9n:sbt-assembly;sbtVersion=1.0;scalaVersion=2.12:0.15.0
[error] Not found
[error] Not found
[error] not found: https://repo1.maven.org/maven2/com/eed3si9n/sbt-assembly_2.12_1.0/0.15.0/sbt-assembly-0.15.0.pom
[error] not found: /home/epicstar/.ivy2/local/com.eed3si9n/sbt-assembly/scala_2.12/sbt_1.0/0.15.0/ivys/ivy.xml
[error] download error: Caught javax.net.ssl.SSLHandshakeException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target (PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target) while downloading https://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/com.eed3si9n/sbt-assembly/scala_2.12/sbt_1.0/0.15.0/ivys/ivy.xml
[error] download error: Caught javax.net.ssl.SSLHandshakeException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target (PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target) while downloading https://repo.typesafe.com/typesafe/ivy-releases/com.eed3si9n/sbt-assembly/scala_2.12/sbt_1.0/0.15.0/ivys/ivy.xml
Project loading failed: (r)etry, (q)uit, (l)ast, or (i)gnore?
I had to add this to the [src/projects/plugins.sbt] on line 1:
resolvers += Resolver.url("bintray-sbt-plugins", url("https://dl.bintray.com/sbt/sbt-plugin-releases"))(Resolver.ivyStylePatterns)
This fixed my issue. I guess maven.org deleted sbt-assembly 2.12? I'll make a PR for this.
As a CMake user I would like to call djinni by simply calling a CMake function that I imported from djinni. The call should look something like this:
# calls djinni on given IDL.
# calls `message(FATAL_ERROR ...)` and aborts configuration when something goes wrong during generation
djinni(path/to/idl.djinni
JAVA_OUT ${JAVA_OUTPUT_FOLDER} # expose all djinni options as cmake function parameters
JAVA_PACKAGE com.example.jnigenpackage
IDENT_JAVA_FIELD mFooBar
CPP_OUT ${CPP_OUTPUT_FOLDER}
# ... more djinni arguments
)
This makes my CMake code cleaner and more readable because I don't have to call djinni myself with execute_process
and I don't need to implement error handling (what to do in case djinni generation fails?) myself.
As a user I want to easily download the latest djinni release as a binary without messing around with building it, because it is faster and easier than running the makefile myself.
This could be achieved by extending the pipeline to build and publish the jar resulting from make djinni_jar
on each release tag.
Hi,
What is the status of this project?
What is the difference between it and oficial and abandoned project?
Im using this today "https://github.com/hiennguyenle/finn".
And i have a project that depends on it (https://github.com/ezored/ezored).
Thanks.
To persevere the original state, tag v0.1.0, or 0.1.0 , should be created, to be able to see from when on changes have been happened here
As a project maintainer I want everybody participating in this repository to commit to a code of conduct that promotes a open and diverse community and protects it from getting unhealthy.
I would prefer to just copy and modify someone elses COC, like for example the one from apache
When I tried to automatically run all available tests in the test-suite
-folder for #3, I realized that the dockerized tests (make linux_docker
) do always fail on centos with:
[java] There was 1 failure:
[java] 1) test(com.dropbox.djinni.test.WcharTest)
[java] junit.framework.ComparisonFailure: expected:<...string with unicode [�], ?, ? symbols> but was:<...string with unicode [], ?, ? symbols>
Full log: https://github.com/jothepro/djinni/runs/851151937?check_suite_focus=true
I did not investigate any further yet.
Additionally I have concerns to how useful these tests are, since they only test the java-bridging on a few distribution/compiler configurations. Instead I think it might be more useful to run more extensive matrix-tests with github-actions.
This may be a bit off-topic but while refreshing the intellij plugin I realized that I wanted to update the file icon for djinni files + I want to include a logo for the plugin.
So I wasted my time by making this new logo design for djinni:
It's pretty basic but I made it from scratch, so no copyright/licensing issues! 😎
The font is Overpass, should be free to use.
I know I will hate it in a few days, but I love it right now!
What do you think?
As a project maintainer I want to document our workflow for code changes in the project.
@a4z recommended the Collective Code Construction Contract from the ZeroMQ project as a template.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.