Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
371 changes: 191 additions & 180 deletions crates/liboxen/src/core/df/tabular.rs

Large diffs are not rendered by default.

16 changes: 7 additions & 9 deletions crates/liboxen/src/core/v_latest/workspaces/files.rs
Original file line number Diff line number Diff line change
Expand Up @@ -124,13 +124,9 @@ pub(crate) async fn add_stored_version_file(
url,
&region,
endpoint_url.as_deref(),
lines,
)
.await?;
spawn_blocking(move || {
InspectedVersionFile::from_stored(dst_path_buf, file_hash, version)
})
.await??
InspectedVersionFile::from_stored(dst_path_buf, file_hash, version, lines).await?
}
};
let staged_db_manager = get_staged_db_manager(&workspace.workspace_repo)?;
Expand Down Expand Up @@ -173,15 +169,17 @@ impl InspectedVersionFile {
})
}

/// Inspect `version`, the version file `hash` in an S3 store, to stage at `dst_path`. Blocks
/// while it reads what the metadata needs from the store.
pub(crate) fn from_stored(
/// Inspect `version`, the version file `hash` in an S3 store, to stage at `dst_path`, reading
/// what the metadata needs from the store and its line counts from `lines` when they were taken
/// as it arrived.
pub(crate) async fn from_stored(
dst_path: PathBuf,
hash: MerkleHash,
version: StoredVersion,
lines: Option<LineCounts>,
) -> Result<Self, OxenError> {
let num_bytes = version.size();
let (mime_type, data_type, metadata) = inspect_stored(&version, &dst_path)?;
let (mime_type, data_type, metadata) = inspect_stored(version, &dst_path, lines).await?;
Ok(Self {
dst_path,
hash,
Expand Down
2 changes: 0 additions & 2 deletions crates/liboxen/src/opts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
pub mod add_opts;
pub mod clean_opts;
pub mod clone_opts;
pub mod count_lines_opts;
pub mod df_opts;
pub mod diff_opts;
pub mod download_tree_opts;
Expand All @@ -23,7 +22,6 @@ pub mod upload_opts;
pub use crate::opts::add_opts::AddOpts;
pub use crate::opts::clean_opts::CleanOpts;
pub use crate::opts::clone_opts::CloneOpts;
pub use crate::opts::count_lines_opts::CountLinesOpts;
pub use crate::opts::df_opts::DFOpts;
pub use crate::opts::df_opts::SliceRange;
pub use crate::opts::diff_opts::DiffOpts;
Expand Down
14 changes: 0 additions & 14 deletions crates/liboxen/src/opts/count_lines_opts.rs

This file was deleted.

Loading
Loading