repo: expose change_id_index() - #9956
Conversation
| loader: RepoLoader, | ||
| operation: Operation, | ||
| index: Box<dyn ReadonlyIndex>, | ||
| change_id_index: OnceCell<Box<dyn ChangeIdIndex>>, |
There was a problem hiding this comment.
It looks like you removed the cache and make it recompute for each change id resolution.
| &self, | ||
| target_id_bytes: &ChangeId, | ||
| ) -> IndexResult<usize>; | ||
| fn change_id_index(&self) -> Box<dyn ChangeIdIndex + '_>; |
There was a problem hiding this comment.
Can you add the motivation for this change to the commit message?
fc8e56f to
0f4e5fc
Compare
ReadonlyRepo change_id prefix methods only forward the calls to ChangeIdIndex, this seems pointless and out of convention compared to rest of the index related methods. So we expose ChangeIdIndex using change_id_index() method simmiliarly to index() method, and convert resolve_change_id to be utility function.
0f4e5fc to
51543cc
Compare
|
I am kind of stuck trying to move |
What's your goal? You can clone |
I was converting
ChangeIdIndexas part of ongoing async index conversion. These methods seemed unnessasary.Checklist
If applicable:
CHANGELOG.mdREADME.md,docs/,demos/)cli/src/config-schema.json)how it works, how it's organized), including any code drafted by an LLM.
an eye towards deleting anything that is irrelevant, clarifying anything
that is confusing, and adding details that are relevant. This includes,
for example, commit descriptions, PR descriptions, and code comments.