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

Remove PDF generation #2823

Merged
merged 1 commit into from
Jun 16, 2020
Merged

Remove PDF generation #2823

merged 1 commit into from
Jun 16, 2020

Conversation

CyberShadow
Copy link
Member

PDF generation using the LaTeX toolchain has proved to be extremely
fragile, extremely difficult to debug, and thus has consumed numerous
hours debugging and working around its problems.

If PDF generation is to be reintroduced in the future, it must be done
using a toolchain which the average dlang.org contributor is capable
of debugging. The current implementation is nowhere close to meeting
that requirement.

@dlang-bot
Copy link
Contributor

Thanks for your pull request, @CyberShadow!

Bugzilla references

Your PR doesn't reference any Bugzilla issue.

If your PR contains non-trivial changes, please reference a Bugzilla issue or create a manual changelog.

@CyberShadow
Copy link
Member Author

CC @wilzbach @WalterBright @atilaneves and of course @andralex :)

@andralex
Copy link
Member

andralex commented Jun 15, 2020

Yah, that bug in the listings package is a complete bear.

One question would be how many folks are downloading the pdf.

@CyberShadow
Copy link
Member Author

CyberShadow commented Jun 15, 2020

Yah, that bug in the listings package is a complete bear.

If only this was the only problem. See the linked thread for another example. I can try to dig out more instances from my emails, but, historically there have been just so many cases where we need to dance around the CI and do random changes just to make the PDF generation succeed.

@Geod24
Copy link
Member

Geod24 commented Jun 15, 2020

100% for it. I too have spent days fighting the unfriendly monster.

@adamdruppe
Copy link
Contributor

If you really want pdf, it is easier to generate from html than from ddoc anyway.

CyberShadow added a commit to CyberShadow/ae that referenced this pull request Jun 15, 2020
See dlang/dlang.org#2823

Note: DAutoTest is not affected, as it has its own target.
Copy link
Member

@wilzbach wilzbach left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Definitely in favor.

@quickfur
Copy link
Member

I've always viewed PDF generation via LaTeX from ddoc as one gigantic hack. LaTeX input syntax has certain peculiar nuances that cannot be mechanically generated from an input that wasn't written with such nuances in view, and it's inevitable that the result would have problems. Ddoc's limited expressiveness does not help things. Furthermore, as Adam said, there are easier tools to use than LaTeX if the goal is just to generate a PDF, such as the various HTML-to-PDF tools out there.

I vote in favor of killing this monster with fire.

@andralex
Copy link
Member

I've always viewed PDF generation via LaTeX from ddoc as one gigantic hack. LaTeX input syntax has certain peculiar nuances that cannot be mechanically generated from an input that wasn't written with such nuances in view, and it's inevitable that the result would have problems. Ddoc's limited expressiveness does not help things.

Not to launch into a side discussion here, but it's been beneficial in terms of fixing bugs and limitations in ddoc. Also, it did work for a large text and for a long time; if it weren't for the absolutely nuts heisenbug in the listings package there would be good steps to take to make it more robust. Conversely, once it gets removed I fear the text would increasingly make unwitting use of html-related particularities, meaning adding other formats later would be more difficult. But a time sink is a time sink and needs to be plugged.

@CyberShadow
Copy link
Member Author

I think it's really little more than a nice coincidence that it's possible to generate HTML and LaTeX with DDoc. If you try to target anything slightly more complicated (e.g. context-sensitive), such as JSON or Markdown or RTF, the limitations of DDoc become apparent. For documentation, a macro system such as DDoc is a rather suboptimal approach. A more correct approach would be using syntax which can unambiguously describe the text in semantic terms, and thus can be easily parsed into some kind of DOM (or AST if you will), and then emitted into whatever arbitrary formats are desired.

Markdown is a nice format for this purpose though, and it's nice seeing progress with adding Markdown to DDoc for this reason. Unfortunately probably our syntax will never be fully compliant with any other Markdown standard out there.

@CyberShadow
Copy link
Member Author

Failed to download package vibe-core from https://code.dlang.org/packages/vibe-core/1.4.0.zip

@wilzbach I don't suppose it would be possible to make Dub or our build scripts to auto-retry this?

PDF generation using the LaTeX toolchain has proved to be extremely
fragile, extremely difficult to debug, and thus has consumed numerous
hours debugging and working around its problems.

If PDF generation is to be reintroduced in the future, it must be done
using a toolchain which the average dlang.org contributor is capable
of debugging. The current implementation is nowhere close to meeting
that requirement.
@dlang-bot dlang-bot merged commit 489a02c into dlang:master Jun 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants