Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use pub(crate) rather than pub #2526

Merged
merged 1 commit into from
Feb 28, 2024

Conversation

illicitonion
Copy link
Collaborator

Now that we actually have some pub items, this will help us to avoid accidentally leaking more (e.g. in
#2515 we are leaking CrateId, Select, and CrateDependency to be public because they're marked pub not pub(crate).

I'm not sure I like this, but wanted send as an RFC to discuss.

Copy link
Collaborator

@UebelAndre UebelAndre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I might be out of the loop but is this common practice for crates? Was the before "lazy"?

I can do some digging on my own, but this seems just fine to me 😄

@illicitonion
Copy link
Collaborator Author

I think the before was maybe a bit lazy, but also honestly fine? But happy to merge and see how we go!

Now that we actually have some pub items, this will help us to avoid
accidentally leaking more (e.g. in
bazelbuild#2515 we are leaking
`CrateId`, `Select`, and `CrateDependency` to be public because they're
marked `pub` not `pub(crate)`.

I'm not sure I like this, but wanted send as an RFC to discuss.
@illicitonion illicitonion force-pushed the pub-crate-all-the-things branch from b909473 to 5e5189b Compare February 28, 2024 17:21
@illicitonion illicitonion added this pull request to the merge queue Feb 28, 2024
Merged via the queue into bazelbuild:main with commit 422c3b2 Feb 28, 2024
3 checks passed
@illicitonion illicitonion deleted the pub-crate-all-the-things branch February 28, 2024 17:32
qtica added a commit to qtica/rules_rust that referenced this pull request Apr 1, 2024
Now that we actually have some pub items, this will help us to avoid
accidentally leaking more (e.g. in
bazelbuild#2515 we are leaking
`CrateId`, `Select`, and `CrateDependency` to be public because they're
marked `pub` not `pub(crate)`.

I'm not sure I like this, but wanted send as an RFC to discuss.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants