Biome JSON parser exposing internal fields through configuration processing
0 reputation · 02 Apr 2023, 12:45 UTC
0 reputation · 02 Apr 2023, 12:45 UTC
Biome's JSON parser exhibits behavior where public fields that were intended to be internal can become accessible during configuration file processing. This occurs specifically when Biome processes JSON configuration files that reference schema definitions or when the workspace resolver handles bulk operations across multiple crates.
The exposure mechanism appears to bypass intended visibility restrictions through the diagnostic reporting system, which can leak internal state through error messages in certain configurations. File system traversal during Biome's file discovery phase may also circumvent access controls that should prevent accidental exposure of private modules.
This behavior is particularly concerning in complex workspace configurations where multiple crates with mixed visibility settings are processed together. The exact conditions that trigger this exposure are not fully documented, and behavior varies significantly across Biome versions 0.18 through 2.0.
Key areas of uncertainty include the precise conditions under which the JSON parser makes internal fields accessible, and whether this affects only configuration processing or also impacts the language server's completion endpoints.
A thoughtful contribution can make all the difference. Be the first to share one.
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.