Repository navigation
fix: make SparseArray and MutSparseArray methods public - #25
Open
iAmMichaelConnor wants to merge 1 commit into
Open
iAmMichaelConnor wants to merge 1 commit into
iAmMichaelConnor wants to merge 1 commit into
Conversation
iAmMichaelConnor
force-pushed
the
mike/02-fix-public-api
branch
from
November 2, 2026 18:16
fa844b8 to
1bf48b3
Compare
The README documents create/get/set as the library API, but the methods are private or pub(crate), so no dependent crate can construct or read either array.
TomAFrench
force-pushed
the
mike/02-fix-public-api
branch
from
November 3, 2026 03:53
1bf48b3 to
511e270
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
The README documents
SparseArray::create/getandMutSparseArray::create/get/setasthe library's API, but they are
pub(crate)or private, so a dependent crate cannot constructor read either array: the library is unusable as a dependency. Make these five methods
pub.Nothing else changes visibility:
MutSparseArray::length, which the README does not document,and the struct internals stay private.
This is a fix rather than a feature: it restores the documented API (in v0.1.x these methods
had no visibility modifier, at a time when Noir treated impl methods as public).
Testing
Visibility cannot be tested inside the crate. A separate consumer crate calling all five
methods fails to compile on
master("create is private", "get is private", "set is private")and compiles here (Noir 1.0.0;
bb gates3,265). A consumer callingMutSparseArray::lengthstill fails with "length is private".
nargo test: 17/17 passed.nargo fmt --checkis clean.