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

Diagrams get crunched if rendered by CI #2

Closed
paolobrasolin opened this issue Jan 7, 2022 · 4 comments
Closed

Diagrams get crunched if rendered by CI #2

paolobrasolin opened this issue Jan 7, 2022 · 4 comments
Assignees
Labels
bug Something isn't working

Comments

@paolobrasolin
Copy link
Owner

paolobrasolin commented Jan 7, 2022

This happened to @jonsterling in https://github.com/jonsterling/math producing charming results such as

image

(source: https://categorytheory.zulipchat.com/#narrow/stream/241990-general.3A-values/topic/goals.20and.20questions/near/267181997)

The problem is twofold:

  1. the first compilation happened without ghostscript (a hard requirement for the conversion happening via dvisvgm)
  2. following compilations were skipped (even when I tried adding the dependency) because the sourcecode MD5 didn't change

The solution is simple:

  1. add the system dependency -> 7db5f96
  2. clear the cache artifacts

There's still no nice button to empty the cache, though!
We can easily circumvent that by sketching another essential feature...

Some files will modify the compilation output even if the sources (hence their hashes) don't change. Therefore, changes in these files should invalidate the cache. Let's start by including TeX Live configuration in the list of such files -> 2cad5c6

Whatever solution we think of for #1 we'll need to consider this side effect.
In fact, you'll want to include your macro files in the list @jonsterling.

@paolobrasolin paolobrasolin added the bug Something isn't working label Jan 7, 2022
@paolobrasolin paolobrasolin self-assigned this Jan 7, 2022
@jonsterling
Copy link

@paolobrasolin I just moved to a different machine (which does have Ghostscript installed) and this is happening locally. Do you have any suggestions for how I should proceed?

@jonsterling
Copy link

Update: Although Ghostscript is installed, it seems not to be recognised by dvisvgm, since when I manually run dvisvgm --pdf ... I get:

ERROR: Ghostscript is required to process PDF files.

I think the problem is that Homebrew doesn't actually install libgs properly; obviously this is neither the fault of your code nor the fault of dvisgvm, but nonetheless it remains a pretty serious obstacle for ordinary people to use it. I wonder what we should do.

@jonsterling
Copy link

I've added some instructions to my README for Mac users who face this problem: jonsterling/math@edcc188

@paolobrasolin
Copy link
Owner Author

I think the best we can do is document the snags with the various OSs.
I have no MacOS machine right now, so thanks for the research! ❤️
Since this is a general issue with jekyll-antex I'll steal the info for its documentation.
Also, I'll try to extend its CI to cover MacOS if I can.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants