Skip to content

[jnigen] Export and document j_elements.dart#3356

Open
liamappelbe wants to merge 5 commits into
mainfrom
jnigen_visitor
Open

[jnigen] Export and document j_elements.dart#3356
liamappelbe wants to merge 5 commits into
mainfrom
jnigen_visitor

Conversation

@liamappelbe
Copy link
Copy Markdown
Contributor

@liamappelbe liamappelbe commented May 12, 2026

  • Export and document the classes in j_elements.dart, so that users can write custom visitors.
    • Make Element private, and delete Classes.let
  • This caused export conflicts because we were exporting elements.dart, which has a bunch of AST elements with the same names as the ones in j_elements.dart.
    • elements.dart conceptually should be private. It was exported because Config.importedClasses uses it. So I made Config.importedClasses private.
    • But it (and importClasses()) are needed by other files in JNIgen. So I moved them to an extension method, ConfigInternal, which is hidden when config_types.dart is exported . That way internal uses of Config can see the method, but external users can't.

Fixes #2962

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 12, 2026

PR Health

Changelog Entry ✔️
Package Changed Files

Changes to files need to be accounted for in their respective changelogs.

This check can be disabled by tagging the PR with skip-changelog-check.

Breaking changes ✔️
Package Change Current Version New Version Needed Version Looking good?

This check can be disabled by tagging the PR with skip-breaking-check.

API 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.

Package Leaked API symbol Leaking sources

This check can be disabled by tagging the PR with skip-leaking-check.

@liamappelbe liamappelbe requested a review from dcharkes May 12, 2026 05:02
@liamappelbe liamappelbe marked this pull request as ready for review May 12, 2026 05:02
@liamappelbe liamappelbe changed the title WIP [jnigen] Export and document j_elements.dart [jnigen] Export and document j_elements.dart May 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[jnigen] Visitors appear to be undocumented and private

1 participant