Skip to content

fix: resolve types re-exported through "import public" - #47

Merged
kafkiansky merged 2 commits into
0.6.xfrom
fix/import-public
Nov 22, 2026
Merged

kafkiansky merged 2 commits into
0.6.xfrom
fix/import-public

Conversation

@kafkiansky

Copy link
Copy Markdown
Contributor

A file sees the types of the files it imports and of everything those files re-export through import public, at any depth. The dependency registry only looked at direct imports, so using a re-exported type failed with "No type '...' was found".

The registry now follows public_dependency of every imported file transitively. A plain import of an imported file is still not re-exported, and files reached more than once are visited once.

A file sees the types of the files it imports and of everything those
files re-export through `import public`, at any depth. The dependency
registry only looked at direct imports, so using a re-exported type
failed with "No type '...' was found".

The registry now follows `public_dependency` of every imported file
transitively. A plain import of an imported file is still not
re-exported, and files reached more than once are visited once.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@kafkiansky kafkiansky self-assigned this Nov 22, 2026
@kafkiansky kafkiansky added the enhancement New feature or request label Nov 22, 2026
thesis/protobuf 0.2.0 writes expanded repeated fields packed and cannot
read them back. A file with `import public` has such a field in its
descriptor (public_dependency), so with the lowest dependencies the
plugin embedded a broken descriptor into DescriptorRegistry and the
generated code failed to decode it.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@kafkiansky
kafkiansky merged commit a403b3c into 0.6.x Nov 22, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant