Skip to content

Create IndexResult for individual file indexing result#285

Merged
jenny-codes merged 1 commit intomainfrom
jennyshih/create-index-result
Oct 31, 2025
Merged

Create IndexResult for individual file indexing result#285
jenny-codes merged 1 commit intomainfrom
jennyshih/create-index-result

Conversation

@jenny-codes
Copy link
Contributor

@jenny-codes jenny-codes commented Oct 30, 2025

To convey the outcome of individual indexing more clearly

Copy link
Contributor Author

jenny-codes commented Oct 30, 2025

@jenny-codes jenny-codes marked this pull request as ready for review October 30, 2025 15:49
@jenny-codes jenny-codes requested a review from a team as a code owner October 30, 2025 15:49
#[must_use]
pub fn into_parts(self) -> IndexerParts {
(Some(self.local_graph), self.errors)
(self.local_graph, self.errors)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

There is another potential refactoring opportunity here to simply return the local_graph and not the errors, as the current code does not actually store any error from the indexing. What do we think?

@jenny-codes jenny-codes force-pushed the jennyshih/create-index-result branch from 63950f8 to 943e408 Compare October 30, 2025 16:23
@jenny-codes jenny-codes changed the title Use IndexResult for individual file indexing result Create IndexResult for individual file indexing result Oct 30, 2025
}

pub enum IndexResult {
Completed(Box<IndexerParts>),
Copy link
Contributor Author

Choose a reason for hiding this comment

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

We want to box this one because the byte differences between the three variants are big.

@jenny-codes jenny-codes force-pushed the jennyshih/create-index-result branch from 943e408 to 5957ec7 Compare October 30, 2025 21:25
@jenny-codes jenny-codes force-pushed the jennyshih/multiple-error branch 2 times, most recently from 104f79c to 9241f5d Compare October 31, 2025 14:24
@jenny-codes jenny-codes force-pushed the jennyshih/create-index-result branch from 5957ec7 to 4fd17e1 Compare October 31, 2025 14:24
@jenny-codes jenny-codes changed the base branch from jennyshih/multiple-error to graphite-base/285 October 31, 2025 16:25
@jenny-codes jenny-codes force-pushed the jennyshih/create-index-result branch from 4fd17e1 to 4bc044d Compare October 31, 2025 16:25
@jenny-codes jenny-codes changed the base branch from graphite-base/285 to main October 31, 2025 16:26
@jenny-codes jenny-codes force-pushed the jennyshih/create-index-result branch from 4bc044d to 89a65e0 Compare October 31, 2025 17:14
@jenny-codes jenny-codes merged commit ed0df88 into main Oct 31, 2025
12 checks passed
@jenny-codes jenny-codes deleted the jennyshih/create-index-result branch October 31, 2025 17:24
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.

3 participants