Skip to content
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

Better format caching #181

Merged
merged 9 commits into from
Jun 19, 2018
Merged

Conversation

pkgw
Copy link
Collaborator

@pkgw pkgw commented Jun 18, 2018

This PR straightens out the story about caching format files so that the --bundle and --web-bundle options actually work again.

I've also snuck in a few unrelated changes: I'm bumping the version to 0.1.9-dev, and renaming src/cli_driver.rs to src/bin/tectonic.rs, which is what it should have been named for a while now.

pkgw added 3 commits June 17, 2018 20:30
By adding a "use" statement inside the ctry! macro.
This lets us identify I/O backends that are "bundles" from the user
perspective -- large collections of TeX files. From the software architecture
perspective, these are IoProviders that can be used to generate format files
in a fully standalone fashion.

This trait will be used to improve the format caching code such that the
runtime options to specify a new Zip bundle or web-based bundle will actually
work again.
@pkgw
Copy link
Collaborator Author

pkgw commented Jun 18, 2018

CC @jneem, this changes some APIs that may affect your project.

@codecov
Copy link

codecov bot commented Jun 18, 2018

Codecov Report

Merging #181 into master will increase coverage by 1.34%.
The diff coverage is 55.67%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #181      +/-   ##
==========================================
+ Coverage   36.62%   37.97%   +1.34%     
==========================================
  Files         129      131       +2     
  Lines       60106    60830     +724     
==========================================
+ Hits        22015    23099    +1084     
+ Misses      38091    37731     -360
Impacted Files Coverage Δ
tests/executable.rs 24.21% <ø> (+2.88%) ⬆️
src/io/itarbundle.rs 0% <ø> (ø) ⬆️
tests/formats.rs 88.23% <ø> (+1.56%) ⬆️
src/io/zipbundle.rs 0% <ø> (ø) ⬆️
tests/trip.rs 100% <ø> (ø) ⬆️
src/errors.rs 37.93% <0%> (-0.17%) ⬇️
src/io/local_cache.rs 0% <0%> (ø) ⬆️
src/bin/tectonic.rs 0.83% <0%> (ø)
tests/tex-outputs.rs 84.02% <100%> (+1.04%) ⬆️
tests/util/mod.rs 71.13% <100%> (+9.84%) ⬆️
... and 41 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 955c442...017919c. Read the comment docs.

pkgw added 3 commits June 18, 2018 11:07
The -b and -w options have been broken for a long time due to the switch to
on-the-fly creation of format files: I added a mechanism to cache format
files, but it was only active when using the default bundle. In this commit,
we split out the format file cache to be active whenever any kind of bundle is
being used.

The main work is to split out the part of
`tectonic::io::local_cache::LocalCache` that cached format files into a highly
similar type, `tectonic::io::format_cache::FormatCache`. Then there's some
plumbing to be done to activate the cache no matter how the active bundle is
specified.
When the `-w` option was given to specify an alternative web-based bundle, no
local cache was being used, which made things super inefficient. It's pretty
trivial to just activate caching for this code path as well.
This is the modern way to identify the file containing main().
@pkgw pkgw force-pushed the better-format-caching branch from 1eabd91 to b4ee19f Compare June 18, 2018 15:08
pkgw added 3 commits June 18, 2018 22:13
I'll be honest, I don't want to do this at all, but Codecov is yelling at me
and it looks like exercising this code might make it happier. Not sure why the
yelling is happening in this PR, which as far as I can tell affects very
unrelated code.
@pkgw pkgw merged commit 6aedad1 into tectonic-typesetting:master Jun 19, 2018
@pkgw pkgw deleted the better-format-caching branch June 19, 2018 03:29
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.

1 participant