[jnigen] Config API update - #3516
Conversation
Package publishingIf you have publishing permissions, you can use the links below to publish the changes after merging this PR.
Documentation at https://github.com/dart-lang/ecosystem/wiki/Publishing-automation. |
PR HealthAPI leaks ✔️The following packages contain symbols visible in the public API, but not exported by the library. Export these symbols or remove them from your publicly visible API.
This check can be disabled by tagging the PR with Breaking changes ✔️
This check can be disabled by tagging the PR with |
| classes: ['com.github.dart_lang.jnigen.simple_package'], | ||
| sourcePath: [Uri.directory(sourcePath)], | ||
| input: Input( | ||
| classes: ['com.github.dart_lang.jnigen.simple_package'], |
There was a problem hiding this comment.
Helicopter view level question: We can't put this as include on visitClass right? Because this goes into the summarizer which is a different stage in the pipeline.
I think the readme of both FFIgen and JNIgen would benefit from mermaid diagrams showing the pipeline and what in the config is configuring which part of the pipeline. (Feel free to file an issue to do this later. Mermaid diagrams are rendered on GitHub, I don't know about pub, and probably not in dartdoc either.)
Another super high level question, should options only passed to the summarizer be nested in the summarizer options? That might make it more clear for users.
| ], | ||
| ), | ||
| output: Output( | ||
| dart: DartCodeOutputConfig( |
There was a problem hiding this comment.
We can't use dot shorthands to skip typing the constructor name can we?
| ], | ||
| ), | ||
| output: Output( | ||
| dart: DartCodeOutputConfig( |
There was a problem hiding this comment.
We dropped Config suffix everywhere, this still has a config suffix.
There was a problem hiding this comment.
I noticed some others still have the config suffix as well, e.g. AndroidSdkConfig.
Update JNIgen's config API to align it with the proposed FFIgen API.
classes,sourcePath,classPath,summarizerOptions,mavenDownloads, andandroidSdkConfigintoInputimportandhideintoSymbolImports, which lives inInput.importsOutputConfigrenamed toOutput, and still containsdartConfig->dartandsymbolsConfig->symbols. Now also containspreamble,generateStubs, andformat.nonNullAnnotationsandnullableAnnotationsnow grouped underNullabilityAnnotations.isExcludedtoisIncluded.Sorry for the crazy number of changed files. It's mostly due to the version bump. There aren't any real bindings changes. Important files are:
#2062