-
Notifications
You must be signed in to change notification settings - Fork 165
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
Introduce -Z deterministic-mode
to address a few reproducability issues
#1036
Introduce -Z deterministic-mode
to address a few reproducability issues
#1036
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1036 +/- ##
=======================================
Coverage 45.09% 45.09%
=======================================
Files 155 155
Lines 62609 62651 +42
=======================================
+ Hits 28234 28255 +21
- Misses 34375 34396 +21
... and 1 file with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
It is great to see you again, @Mrmaxmeier! Yes, the absolute path stuff was all added because it turns out that Synctex outputs must include absolute paths to the files they reference. I think there might even be an issue filed on your Arxiv tester relating to how those new absolute paths break the tests for the Arxiv documents that enable Synctex — I am pretty sure it predates the 2022.0 update. I like the overall approach you have taken here, and I really like the nice structuring and internal documentation. Thank you for the nice work! Here are some rambling thoughts on some aspects of this:
In general this is starting to tie in to some bigger things to tackle. For instance, to be really nicely reproducible things like the Anyway, regarding this pull request, I think my main question is, what do you think about item 2 above? I am genuinely not sure what kind of approach would be better here. |
Right, I agree that heuristics for "reproducible mode" are a bit misguided. There's merit in keeping the default reproducible, but that's not really realistic as I'll introduce a Is this something that should live in the "unstable options" world? It's certainly niche, but the interface (reproducible mode on/off) seems reasonably stable :) Note: tectonic-on-arXiv will break for a while until this PR is merged as I'm now passing Tectonic.lock is a cool idea, though I'm not sure where the line between "committed to .lock" and "part of the document context" is. (i.e. the document's TeX sources shouldn't be part of the lockfile, and the bundle should be, but what about external paths / fonts / results of write18 invocations?) |
05d445d
to
2156d30
Compare
ttbc_get_abspath
and ttbc_input_get_mtime
for reproducible document builds--reproducible
mode to address a few determinism issues
I think that yes, this should be an "unstable option", and I think that I prefer the "deterministic" terminology since I think it captures a bit more precisely what these changes are trying to accomplish. (In my mind, the "stability" question is less about whether the functionality is going to evolve, and more about whether we're ready to commit to exposing it through a certain interface, and I'd like to avoid proliferating command-line flags.) I agree that it feels like the right choice not to couple this stuff to To check my understanding, is the current behavior that when Synctex outputs are created in "reproducible mode", the absolute paths will be forcibly suppressed, and the outputs will contain relative paths instead? If that's true, the Synctex outputs will be technically malformed, but I am 100% OK with that. It would be a good thing to document, though. |
Yep, deterministic mode generates broken synctex files. I've added a note in the unstable options help text that discusses this. |
--reproducible
mode to address a few determinism issues-Z deterministic-mode
to address a few reproducability issues
d0016a7
to
10ab15b
Compare
I finally have the chance to sit down and review this. This is looking excellent! I just pushed a commit to update vcpkg, which should hopefully get the build all green again. |
I've dusted off
tectonic-on-arXiv
, and I looks like upgrading to the TeXLive 2022 bundle uncovered new reproducibility issues:\synctex=1
contain absolute paths to the TeX files.This seems intentional, so I've left absolute paths enabled fortectonic --synctex
runs.hyperxmp
package embeds a bunch of metadata into the output PDF. In particular, it derives a random "xmpMM:InstanceId" from a bunch of information sources. One of those is the input file modification timestamp. I've wired this up to be the document build date instead.I'm not sure if there's a "legitimate" use case for file modification timestamps, so let's just try always returning the build date instead. 🙂=> https://tt.ente.ninja/#/compare/05d445d074674bf1da7dd277bc8524fe85388ea9-untrusted-run-1/05d445d074674bf1da7dd277bc8524fe85388ea9-untrusted-run-2