about summary refs log tree commit diff
diff options
context:
space:
mode:
authorFlorian Klink <flokli@flokli.de>2024-01-15T18·13+0200
committerclbot <clbot@tvl.fyi>2024-01-15T18·25+0000
commit83291ff51ec85b89bb8aae2c0a260e00ebde7164 (patch)
treef0b912aad49780efbd69d63c06ea7ace0153cea5
parentc5e2832cbd22354ce46a9ffefce4dc6f3afd4243 (diff)
refactor(tvix/glue/known_paths): drop some unused stuff r/7381
This are leftovers from the "reference scanning" approach (which we
didn't end up using).
We still want a concept of known paths, so we can trace IO into
storepaths back to the build recipe that'll produce it, so let's keep
the rest of this struct around.

Change-Id: I73d38e21e5b97950b8fc2a42176cae5f80d371c8
Reviewed-on: https://cl.tvl.fyi/c/depot/+/10632
Autosubmit: flokli <flokli@flokli.de>
Reviewed-by: raitobezarius <tvl@lahfa.xyz>
Tested-by: BuildkiteCI
-rw-r--r--tvix/glue/src/known_paths.rs54
1 files changed, 3 insertions, 51 deletions
diff --git a/tvix/glue/src/known_paths.rs b/tvix/glue/src/known_paths.rs
index b847ccada3..b0a4c0ac71 100644
--- a/tvix/glue/src/known_paths.rs
+++ b/tvix/glue/src/known_paths.rs
@@ -5,59 +5,11 @@
 //! knows about during the scope of a single evaluation and its
 //! related builds.
 //!
-//! This data is required to scan derivation inputs for the build
-//! references (the "build closure") that they make use of.
-//!
-//! Please see //tvix/eval/docs/build-references.md for more
-//! information.
+//! This data is required to find the derivation needed to actually trigger the
+//! build, if necessary.
 
-use crate::refscan::STORE_PATH_LEN;
 use nix_compat::nixhash::NixHash;
-use std::collections::{BTreeSet, HashMap};
-
-#[derive(Debug, PartialEq)]
-pub enum PathKind {
-    /// A literal derivation (`.drv`-file), and the *names* of its outputs.
-    Derivation { output_names: BTreeSet<String> },
-
-    /// An output of a derivation, its name, and the path of its derivation.
-    Output { name: String, derivation: String },
-
-    /// A plain store path (e.g. source files copied to the store).
-    Plain,
-}
-
-#[derive(Debug, PartialEq)]
-pub struct KnownPath {
-    pub path: String,
-    pub kind: PathKind,
-}
-
-/// Internal struct to prevent accidental leaks of the truncated path
-/// names.
-#[repr(transparent)]
-#[derive(Clone, Debug, Default, PartialEq, PartialOrd, Ord, Eq, Hash)]
-pub struct PathName(String);
-
-impl From<&str> for PathName {
-    fn from(s: &str) -> Self {
-        PathName(s[..STORE_PATH_LEN].to_string())
-    }
-}
-
-impl From<String> for PathName {
-    fn from(s: String) -> Self {
-        s.as_str().into()
-    }
-}
-
-/// This instance is required to pass PathName instances as needles to
-/// the reference scanner.
-impl AsRef<[u8]> for PathName {
-    fn as_ref(&self) -> &[u8] {
-        self.0.as_ref()
-    }
-}
+use std::collections::HashMap;
 
 #[derive(Debug, Default)]
 pub struct KnownPaths {