refactor(tvix/nix-compat): Restrict visibility

Towards https://b.tvl.fyi/issues/264

Change-Id: I323907cb842ed10ddd05b72c285c598b60d213e0
Reviewed-on: https://cl.tvl.fyi/c/depot/+/10972
Reviewed-by: flokli <flokli@flokli.de>
Autosubmit: Peter Kolloch <info@eigenvalue.net>
Tested-by: BuildkiteCI
This commit is contained in:
Peter Kolloch 2024-02-19 19:19:39 +07:00 committed by clbot
parent 5777050821
commit df73d5f242

View file

@ -65,7 +65,7 @@ fn write_array_elements<S: AsRef<[u8]>>(
Ok(())
}
pub fn write_outputs(
pub(crate) fn write_outputs(
writer: &mut impl Write,
outputs: &BTreeMap<String, Output>,
) -> Result<(), io::Error> {
@ -99,7 +99,7 @@ pub fn write_outputs(
Ok(())
}
pub fn write_input_derivations(
pub(crate) fn write_input_derivations(
writer: &mut impl Write,
input_derivations: &BTreeMap<String, BTreeSet<String>>,
) -> Result<(), io::Error> {
@ -132,7 +132,7 @@ pub fn write_input_derivations(
Ok(())
}
pub fn write_input_sources(
pub(crate) fn write_input_sources(
writer: &mut impl Write,
input_sources: &BTreeSet<String>,
) -> Result<(), io::Error> {
@ -146,17 +146,20 @@ pub fn write_input_sources(
Ok(())
}
pub fn write_system(writer: &mut impl Write, platform: &str) -> Result<(), Error> {
pub(crate) fn write_system(writer: &mut impl Write, platform: &str) -> Result<(), Error> {
write_field(writer, platform, true)?;
Ok(())
}
pub fn write_builder(writer: &mut impl Write, builder: &str) -> Result<(), Error> {
pub(crate) fn write_builder(writer: &mut impl Write, builder: &str) -> Result<(), Error> {
write_field(writer, builder, true)?;
Ok(())
}
pub fn write_arguments(writer: &mut impl Write, arguments: &[String]) -> Result<(), io::Error> {
pub(crate) fn write_arguments(
writer: &mut impl Write,
arguments: &[String],
) -> Result<(), io::Error> {
write_char(writer, BRACKET_OPEN)?;
write_array_elements(
writer,
@ -170,7 +173,10 @@ pub fn write_arguments(writer: &mut impl Write, arguments: &[String]) -> Result<
Ok(())
}
pub fn write_environment<E, K, V>(writer: &mut impl Write, environment: E) -> Result<(), io::Error>
pub(crate) fn write_environment<E, K, V>(
writer: &mut impl Write,
environment: E,
) -> Result<(), io::Error>
where
E: IntoIterator<Item = (K, V)>,
K: AsRef<[u8]>,