-
-
Notifications
You must be signed in to change notification settings - Fork 14.9k
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
tectonic, biber-for-tectonic: wrap tectonic with biber-2.17, fix #88067 #273740
Conversation
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.
I'm not sure I like this approach... It is a bit too overwhelming IMO. Why not simply create a biber2_17
attribute, that will overrideAttrs
of biber
, and we'll comment near it that tectonic is it's purpose?
I'm also not sure I want to wrap tectonic with biber, and I've expressed my opinion in 0889989 . However I do tend to support wrapping tectonic with the correct biber
, as upstream fails to update the bundle for a while now, and the issue is indeed annoying in general.
The downside of wrapping Tectonic though, is that Tectonic may break again in the future when the Tectonic's TeX bundle will be updated but no new Tectonic version will be released, because we will find out about it too late, and then again we'd have to force Tectonic to use the newer Biber.
I was thinking, perhaps we can force Tectonic to use a web bundle that we know for sure is compatible with a certain Biber package? Then at least we know we will overcome the downside presented above.
Hi Doron! Thank you very much for the comment!
Yeah, that's perfectly fine! In fact, that's the first thing that I tried, but I later settled on the
Yes, I agree and I share all your concerns. The reason I chose to do this now is that the tectonic development is slowing down. This is bad news for tectonic but good news for downstream, since it would not be too difficult to keep up. Also since I am a keen user of both biber and tectonic, I have committed myself to be the maintainer (of the wrappers).
That's brilliant, but I am not sure whether there is an API for that in tectonic... |
f047666
to
00b92ba
Compare
I have simply the structure of However, we need to do |
00b92ba
to
43d2040
Compare
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.
In addition to the below comments, if we'll settle down upon such a wrapper, maybe the --web-bundle
option could allow us to stick to a specific bundle version which includes a biblatex version that supports our biber
version we force here. Using this option needs testing though, and perhaps even documentation in the meta.longDescription
.
I agree that touching
See the main comment of the last review about the
Thanks for the link! I think it should be mentioned in the comments at the There's also the middle-way betweeen your approach and the above, which would be to provide an unwrapped |
4b0088b
to
a4340af
Compare
63ee25a
to
b9165ab
Compare
This is interesting, but I need some time to take a look and see how to implement that!
This is cool! I didn't know this! But after some thought, I think this scheme places the biber override far away from In the end, I decided to collapse |
b9165ab
to
55d2e3f
Compare
55d2e3f
to
0bde4b6
Compare
There is currently this upstream issue which prevents us to consistently override I am experimenting with patching tectonic to pin the hardcoded bundle; maybe that's too much? In any case, I haven't finished, but I will report back what I find. Update: check out bryango/nixpkgs@master...biber-versions-ng for a proof of concept. Works fine for me but not sure about maintainability... Update: I have submitted a PR upstream tectonic-typesetting/tectonic#1131 such that we can reliably pin the web bundle at build time. |
0bde4b6
to
a864d46
Compare
Hey @bryango sorry for the long waiting. Well done on tectonic-typesetting/tectonic#1131 ! I really like the general idea, though I left a comment there as you probably noticed.. I think the best way to ensure reproducibility in Nixpkgs most cleanly would be to implement the following design:
This way, users could use the attribute |
Hey @doronbehar thank you for the comment! The structure you proposed looks good to me. I will wait a bit for upstream response and see what we should do. If there is no response, I will start to implement it based on our discussions! |
I'm afraid your work would be forgotten while we wait for upstream, and the issue will persist and most users won't get a proper fix as proposed here. We agree upon many of the changes and they aren't too entangled to the upstream PR IMO. Let's commit to Nixpkgs in the meantime the following commits:
In the last commit, add a comment that mentions your upstream PR, and that ideally the web bundle of the wrapped tectonic should use a pinned texlive bundle, to ensure reproducibility... I think you had a good phrased comment in the current PR that you can start with. |
105a6b5
to
0c51dff
Compare
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.
I really prefer tectonic-unwrapped
to be a clean Tectonic without patches. I also dislike the fact that you have to recompile tectonic just to change the URL of the bundle - I dislike it being a build time option and not a runtime option, since it takes a lot of resources to compile it...
I'm sorry to put too many obstacles in the way of this PR, but I want the solution to eventually become something that upstream may approve. See my comment at tectonic-typesetting/tectonic#1132 (comment) .
notice = builtins.toFile "tectonic-offline-notice" '' | ||
# To fetch tectonic's web bundle, the tests require internet access, | ||
# which is not available in a build sandbox. To run the tests, try: | ||
# `nix-build --no-sandbox --attr tectonic.passthru.tests` | ||
''; |
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.
So this test is only meant for manual running? Not by Hydra? I don't think so. How about adding a VM based test? These can access the internet. See examples at nixos/tests/all-tests.nix
.
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.
I spent a night or two looking at the (sparsely documented) NixOS tests, and they are truly amazing beasts! However, it seems that although they do enjoy a network stack, they still do not have internet / "world wide web" access in a sandbox build. Fortunately, I do find out a way to achieve internet access: basically, we make the test as a "fetcher" like fetchurl
. I have implemented this in #278410.
I totally understand the desire to be perfect, but I am afraid I am running out of energy to continue... And I am getting more and more occupied in my day job 😿 I will try to implement the remaining suggestions; the VM test is particularly interesting (I didn't know about that). For now, I will mark this PR as draft, but if you or anyone would like to build on the work here, feel free to do so! |
It's OK @bryango , you have done very good job anyway. I will checkout out this PR locally and do prepare to merge the things that we agree upon. I'll leave the upstream patches aside for now. |
Thank you very much! I learned quite a lot along the way. If there is anything confusing in the code that you would like me to clarify, feel free to ping me! I might code less, but I can explain. |
The `tectonic` package depends on a version of `biber` that is generally different from the one in the nixpkgs `texlive` bundle. This package provides an override of biber suitable for use with tectonic. For biber<=2.17 on perl>=5.36.0 a patch is needed. This is recovered from a previous nixpkgs commit: NixOS@c784cdb Co-authored-by: Mauricio Collares <[email protected]> Co-authored-by: Doron Behar <[email protected]>
0c51dff
to
a132822
Compare
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.
I think the current wrapper is the best solution for now. Nits: I would like Tex
to be tex
or TeX
. Otherwise, I think it's good to go! I am running nixpkgs-review
.
Also, I think it would be easier for other people to review by starting a new PR and closing this one. What do you think? This PR can then be a place to track the downstream changes if the --web-bundle
update finally works out in the upstream.
Update: Result of nixpkgs-review pr 273740
run on x86_64-linux (details)
4 packages built:
- biber-for-tectonic
- biber-for-tectonic.devdoc
- tectonic
- tectonic-unwrapped
a132822
to
9993964
Compare
Will merge when CI is green. |
Probably this was conditioned on stdenv.isLinux by mistake.
The `tectonic` attribute is redefined to be a wrapper with a compatible version of biber, provided by `biber-for-tectonic`. The wrapper is partially recovered from a previous nixpkgs commit: NixOS@5aa8e9f Also: - Remove unneeded makeBinaryWrapper input in `tectonic-unwrapped`. - Add @bryango as a maintainer of both `tectonic-unwrapped` and `tectonic`. Co-authored-by: Doron Behar <[email protected]>
9993964
to
04f1b55
Compare
Fixed Darwin issue discovered by ofborg. Will wait for CI again.. |
@ofborg build tectonic |
Wow awesome! Thank you very much for finishing this! |
Note
Description of changes
The version of
biber
is strongly coupled to the TeX-like system it works with. For example, the biber version required bytectonic
is not found in nixpkgs, since the texlive bundle used by tectonic lags behind the one in nixpkgs. This has been a known issue. Previously, a user had to manually download (or pin nixpkgs to) a particular version of biber to use with the appropriate TeX system, in this case,tectonic
.In this PR, we introduce the
biber-for-tectonic
package as an alternative version ofbiber
required by the current tectonic. At the same time, we maketectonic
into a wrapper, which bundlestectonic-unwrapped
withbiber-for-tectonic
. This fixes #88067.Some nixpkgs code by @collares and @doronbehar is recycled for use in this PR.
Things done
nix.conf
? (See Nix manual)sandbox = relaxed
sandbox = true
nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)Add a 👍 reaction to pull requests you find important.