-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Switch to asciidoctor 2.0.10 #1373
Conversation
Gemfile
Outdated
@@ -6,8 +6,8 @@ gem 'asciidoctor', '1.5.6.2' | |||
gem 'json' | |||
gem 'awesome_print' | |||
|
|||
gem 'asciidoctor-epub3', '~> 1.5.0.alpha.9' | |||
gem 'asciidoctor-pdf', '~> 1.5.0.beta.8' | |||
gem 'asciidoctor-epub3', '1.5.0.alpha.10' |
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.
Please, try alpha-13, it has a bunch of bugs fixed compared to alpha-10 and no known regressions.
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.
OK. Will force-push a corrected version.
Hi @jnavila Should the updated rakefile script be part of this commit? That might help with migrating older pull-requests to the new standard. Also it might be a good idea to mention in the CONTRIBUTING.md the syntax that should be used for new commits. |
This comment has been minimized.
This comment has been minimized.
Hello, There's nothing preventing this upgrade, except some thorough check that we are still compatible with the new asciidoc format. |
This comment has been minimized.
This comment has been minimized.
Most pull requests are compatible, I guess, or they can be checked at merging. So I would start by updating and reworking the book in a row, if it's not time-consuming, without dealing with the ongoing PRs. If some have passed during the fixup, just fix them if needed. I don't remember whether the book is already strict on the new syntax (it's style using the compatibility mode), but I guess asciidoctor 2.0 still supports compat mode, which help split this task in two : bump to 2.x and migrate out of compat mode. |
Doing it in a row is likely to lead to less merge hell than doing the whole book in one shot and then correcting each and every pull at once. And fixing as we go is likely also easier to do in chunks. 😄 So I would follow your process over my suggestions... 👍
If we can split the task into two parts, it would be easier, first bump to 2.0, turn compat mode on, pin gem dependencies so that we all have the same toolchain. Then migrate away from compat mode. 👍 |
Well I finally have a working Asciidoctor tool-chain after doing a I can now actually try to help you with the migration. Would following the Asciidoctor migration cheat sheet be enough to complete the migration? I can help with things like: check if the chapter follows the cheat sheet, click on cross references to check if they still function and other such small tasks. We still need a way to work together on this. How do you want to organize that? If you want to use this branch further, you'll need to rebase/merge the I'll let you get us set up and will wait until I hear from you before going off and doing anything. 😄 |
The migration cheat is all I know. It must be enough. You seem to be more involved into asciidoctor 2.0. Would you like to update the Gemfiles and check for differences? Has asciidoctor 2.0 a compat mode?
I think, that we should
I've been away for some time, but I can devote some time on this now. Please remember, that's not very high on my priority list, because I am still waiting to hear from a working migration to asciidoctor-pdf 2.0 for Chinese, Japanese and Korean.Until now, we had to use a plug-in which only worked in 1.5.x. I'd like to keep some synchronization between the English version and the translations, plus switching here means accompanying translators on their own migration. And I'll need to review the impact on git-scm's generation scripts. |
This comment has been minimized.
This comment has been minimized.
I know little about managing a GitHub project board, but, hey, let's try this. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
5b1b34b
to
3914dc5
Compare
This comment has been minimized.
This comment has been minimized.
3914dc5
to
ce427ff
Compare
Hello, In fact, I already updated my PR: the compilation passes on my laptop, without warnings or errors. There is still some need for proof-reading, but the overall state seems pretty good. What's your thought on this? |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Change style to new specifications.
6d77fbe
to
a8ec5ac
Compare
#1389 can be merged after this one, if the output is correct here. |
I'll go try out the stricter set of warnings then, and see if we're really clear of any errors. |
Hmm I notice we have a problem with Chinese/Japanese character handling in the PDF file (HTML file is rendering OK). This is a known issue I think?
|
One solution would be to request system fonts for this part of rendering. But I'm not versed enough in PDF and asciidoctor-pdf tweaking to achieve this result. |
Yeah using Evince as the PDF reader gets me that "tofu" as well. 😄 Shall we just let this slide for now then? It seems to only affect this small part of the book. We can open a issue to track this problem once we have migrated the I'm trying my Travis CI build improvements on this branch, and it is complaining, but I suspect that's because of something stupid I'm doing... 😄 I think it's easier to figure this out together once we've done the migration to Asciidoctor 2 instead of cramming it in this pull request as well. Shall we just freeze our work on this branch, so that I can review the full diff and walk through the book in full? |
You're welcome! |
The PDF not rendering properly is indeed a old issue, so it's not something we're breaking with this migration, as it was broken to begin with. 😄 #977 (comment)
I'll go do a full review of the diff tomorrow, and compare the HTML files between |
🙏 |
HonkingGoose's review progress:
|
@@ -15,7 +15,7 @@ exit(0) unless File.exists? path | |||
|
|||
known = {} # <3> | |||
while line = STDIN.gets | |||
break if line.strip == '' | |||
break if line.strip == `" |
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.
break if line.strip == `" | |
break if line.strip == `` |
I don't think we should be migrating this code?
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.
True. My script is blind to the context and has also applied to code blocks. How does it render?
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.
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.
This isn't correct. The hunk must be completely reverted to the original line.
@@ -59,7 +59,7 @@ If there is no project for your language, you can start your own translation. | |||
Base your work on the second edition of the book, available [here](https://github.com/progit/progit2). To do so: | |||
1. Pick the correct [ISO 639 code](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) for your language. | |||
1. Create a [GitHub organization](https://docs.github.com/en/github/setting-up-and-managing-organizations-and-teams/creating-a-new-organization-from-scratch), for example: `progit2-[your code]` on GitHub. | |||
1. Create a project ``progit2``. | |||
1. Create a project "`progit2"`. |
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.
1. Create a project "`progit2"`. | |
1. Create a project `progit2`. |
Undo changes the migration script has made, as this is not valid Markdown.
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 correct change is:
- 1. Create a project ``progit2``.
+ 1. Create a project "`progit2`".
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.
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.
Oh, ah. It's markdown here… Let's keep it as it was before the patch.
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.
There are some changes we need to make.
We also have problems with some images, but those problems are also present on our current Check out the diagram that comes with This seems to be a known issue, compare Ben's output with what we have currently on |
This comment has been minimized.
This comment has been minimized.
I've skimmed the entire book and compared many sections against the html files on |
Checklist before merge:
Discussion: version number strategyMost software follows the: If we were following semantic versioning it even merits a 3.0.0 release, as we making a "breaking change" in the way the book is generated. I understand and agree that for branding/marketing purposes a 3.0.0 release is for a major rewrite of the book. Readers will be disappointed if we release a To make this change, we need to edit the following files: Lines 1 to 19 in a8ec5ac
Lines 26 to 29 in a8ec5ac
|
Co-authored-by: HonkingGoose <34918129+HonkingGoose@users.noreply.github.com>
I didn't know that the # sign is a marker for highlighting. It seems a bit tricky but We may change these occurrences to +#3+. As for version number, right now this is just an image of the edition number (second edition) + a build number. This is not optimal, but it's enough to tell book versions apart. Bumping to 3 seems odd, because this isn't really a rewrite of the book. It's an internal number so, we could just bump to a larger build number. Anyway, this won't help for upcoming pull requests. |
Agree, bumping to 3 is not the right thing to do, as this is not a rewrite. Do you want to bump the minor version from I'm not sure I understand what you mean with:
|
Fix highlighted text in AsciiDoctor 2 migration branch.
There are also still some items we need to do from the checklist #1373 (comment). Can you take a look and respond to those items? |
Hi @ben, I thought I would write a quick status report for you to catch up, as a lot has happened on this pull request.
I do want your feedback on whether or not you think this merits a minor version bump (from Greetings, HonkingGoose |
Thanks so much to you both for working through this! I'll owe you 🍻 if we ever happen to be in the same place. I actually don't have a preference as to what kind of merge happens here. GitHub makes it pretty easy to revert an entire PR, and we haven't been historically picky about the shape of the history. If you feel like there'll be too much noise when using Git to browse the history, then by all means do a squash. |
Change style to new specifications.
reference to #1355