-
Notifications
You must be signed in to change notification settings - Fork 245
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(rosetta): reuse output file as additional cache and introduce --infuse
option for extract
#3210
Conversation
--append
and --infuse
options for extract
--infuse
option for extract
and append to output file
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some comments on the new lines i added
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Conditional approve, some small things around describing the changes that could be improved.
As does the title: are we still appending? Or do we just overwrite the output tablet with everything from the assembly, but do we reuse existing snippets from the output assembly? That would be a better PR description.
await translator.addToCache(options.cacheTabletFile); | ||
} | ||
await translator.addToCache(options.outputFile); | ||
if (translator.hasCache()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of doing this we can also always try it, and only print if the number of successful reads is > 0.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
readFromCache
will loop through all the snippets and check to see if it exists in the cache. This seems like redundant work if there are no elements in the cache. That is why I added hasCache
, not because of the printing.
--infuse
option for extract
and append to output file--infuse
option for extract
--infuse
option for extract
--infuse
option for extract
Thank you for contributing! ❤️ I will now look into making sure the PR is up-to-date, then proceed to try and merge it! |
Merging (with squash)... |
Merging (with squash)... |
Introduces two new features for
rosetta:extract
:rosetta:extract --infuse
: combines a common workflow of callinginfuse
right afterextract
.By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.