Skip to content

Commit 4e86f7b

Browse files
zertoshfacebook-github-bot
authored andcommitted
Allow a custom visibility so long as at least one version is public
Summary: The `visibility` config is limited to public packages because that's the only place it makes sense. But it's possible for a package to have one version public and other versions private (by virtue of being transitive deps) - like in [this post][1]. [1]: https://fb.workplace.com/groups/rust.language/posts/27084881544467104 Reviewed By: diliop Differential Revision: D63963530 fbshipit-source-id: 4a04ebbb355fa8e8f44ea6d041bba48dc5cfa62d
1 parent 601f551 commit 4e86f7b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/fixups.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,8 @@ impl<'meta> Fixups<'meta> {
126126
fixup
127127
};
128128

129-
if fixup_config.custom_visibility.is_some() && !index.is_public_package(package) {
129+
if fixup_config.custom_visibility.is_some() && !index.is_public_package_name(&package.name)
130+
{
130131
return Err(anyhow!(
131132
"only public packages can have a fixup `visibility`."
132133
))

0 commit comments

Comments
 (0)