Add --only-cached/-C command line flag - #203
Conversation
With this flag enabled, tectonic will only use resource files that are already stored in the local cache and will not try to fetch them from a web bundle.
|
Thanks for submitting! This month is very busy for me but I will do my best to give a proper review in timely fashion. |
Codecov Report
@@ Coverage Diff @@
## master #203 +/- ##
=========================================
- Coverage 37.97% 37.9% -0.08%
=========================================
Files 131 131
Lines 60180 60307 +127
=========================================
+ Hits 22856 22857 +1
- Misses 37324 37450 +126
Continue to review full report at Codecov.
|
|
Looks great. My only request is, can you try to devise a test case so that we get code coverage of this new code? I think it should not be hard to get this PR to ratchet up the code coverage a tiny bit, and that's something I'd like to be better about ... |
|
Thanks for the suggestion. The thing is, the files that this commit touches do not currently have any coverage, or more precisely, they do not show in the codecov report. Looking at how the command line arguments are tested at the moment, it would be natural to add a new test to I guess one way to get coverage would be to rewrite the "executable" tests to call the This seems a bit too much for this pull request. Do you have a more straightforward solution? Another question is how to actually test |
|
Thanks for looking into it. All those points are things that should be addressed but I agree that yes, it's all a bit much for this one PR. And the code change is quite simple ... the kind of logic which of course never comes back to bite anybody ;-) |
box2d & Coord -> Point
This is a preliminary pull request proposing to add a new command line option. I want to ask for feedback.
With this flag enabled, tectonic will only use resource files that are already stored in the local cache and will not try to fetch them from a web bundle.
Tectonic at the moment accesses the bundle file whenever a new file like a figure is added to a TeX document or a new TeX file is being compiled. In a majority of these cases, this is unnecessary because the files will not be found in the bundle anyway. Usually, this is not a big issue, but it can be annoying to deal with when the web bundle is not accessible. I believe there should be a way to ask tectonic not to try to fetch the unknown files.
This has at least 3 use cases: