Is `make doc` via the asciidoc meant to be working at the moment?
PhilipOakley opened this issue · 20 comments
When I try to use make doc
from the sdk to confirm that a documentation change is correct, I'm getting a failure that asciidoc isn't finding it's own asciidoc.conf
file:
phili@Philip-Win10 MINGW64 /c/git-sdk-64/usr/src/git ((v2.27.0-rc0))
$ git checkout docfixup2
Previous HEAD position was efcab5b7a3 Git 2.27-rc0
Switched to branch 'docfixup2'
Your branch is ahead of 'origin/master' by 1 commit.
(use "git push" to publish your local commits)
phili@Philip-Win10 MINGW64 /c/git-sdk-64/usr/src/git (docfixup2)
$ make V=1 doc
make -C Documentation all
make[1]: Entering directory '/c/git-sdk-64/usr/src/git/Documentation'
rm -f cmd-list.made && \
/usr/bin/perl ./cmd-list.perl ../command-list.txt && \
date >cmd-list.made
rm -f doc.dep+ doc.dep && \
/usr/bin/perl ./build-docdep.perl >doc.dep+ && \
mv doc.dep+ doc.dep
make -C ../ GIT-VERSION-FILE
make[2]: Entering directory '/c/git-sdk-64/usr/src/git'
make[2]: 'GIT-VERSION-FILE' is up to date.
make[2]: Leaving directory '/c/git-sdk-64/usr/src/git'
make -C ../ GIT-VERSION-FILE
make[2]: Entering directory '/c/git-sdk-64/usr/src/git'
make[2]: 'GIT-VERSION-FILE' is up to date.
make[2]: Leaving directory '/c/git-sdk-64/usr/src/git'
rm -f git-add.html+ git-add.html && \
asciidoc -a git-asciidoc-no-roff -f asciidoc.conf -amanversion=2.26.2.windows.1.9.gdb3dacfacb -amanmanual='Git Manual' -amansource='Git' -b xhtml11 -d manpage -o git-add.html+ git-add.txt && \
mv git-add.html+ git-add.html
asciidoc: FAILED: configuration file asciidoc.conf missing
make[1]: *** [Makefile:363: git-add.html] Error 1
make[1]: Leaving directory '/c/git-sdk-64/usr/src/git/Documentation'
make: *** [Makefile:2506: doc] Error 2
phili@Philip-Win10 MINGW64 /c/git-sdk-64/usr/src/git (docfixup2)
If I copy the C:\git-sdk-64\etc\asciidoc\asciidoc.conf
into the C:\git-sdk-64\usr\bin
folder (where asciidoc is located) then the error moves onto not finding other files from the \etc\ folder.
The USE_ASCIIDOCTOR=1 make doc
also fails:
Traceback (most recent call last):
2: from C:/git-sdk-64/mingw64/bin/asciidoctor:23:in `<main>'
1: from C:/git-sdk-64/mingw64/lib/ruby/2.7.0/rubygems.rb:294:in `activate_bin_path'
C:/git-sdk-64/mingw64/lib/ruby/2.7.0/rubygems.rb:275:in `find_spec_for_exe': can't find gem asciidoctor (>= 0.a) with executable asciidoctor (Gem::GemNotFoundEx
ception)
My sdk is up to date via the update-via-pacman.bat
script.
I do keep bash and cmd separate.
Any suggestions? inc, is there a Documenation build (only) option for pushes to Github?
The
USE_ASCIIDOCTOR=1 make doc
also fails:
This should work, as we do exactly that when building mingw-w64-git
.
As part of building mingw-w64-git
, we do install mingw-w64-asciidoctor-extensions
, though. Maybe try that? (Make sure to use the correct name: mingw-w64-x86_64-asciidoctor-extensions
for the 64-bit version...)
As part of building mingw-w64-git, we do install mingw-w64-asciidoctor-extensions, though. Maybe try that? (Make sure to use the correct name: mingw-w64-x86_64-asciidoctor-extensions for the 64-bit version...)
Is that something that would be part of the sdk normally? just wondering about the update process and whether I was getting 'left behind' in missing that. (still to go look/find/get it ;-)
As part of building mingw-w64-git, we do install mingw-w64-asciidoctor-extensions, though. Maybe try that? (Make sure to use the correct name: mingw-w64-x86_64-asciidoctor-extensions for the 64-bit version...)
Is that something that would be part of the sdk normally? just wondering about the update process and whether I was getting 'left behind' in missing that. (still to go look/find/get it ;-)
Simple oversight on my part: I did not think of documentation contributions. I guess I should add asciidoctor to the tracked packages.
Looks like it was 'up to date'
phili@Philip-Win10 MINGW64 /c/git-sdk-64/usr/src/git (docfixup2)
$ pacman -S mingw-w64-x86_64-asciidoctor-extensions
warning: mingw-w64-x86_64-asciidoctor-extensions-150.9846486-1 is up to date -- reinstalling
resolving dependencies...
looking for conflicting packages...
Packages (1) mingw-w64-x86_64-asciidoctor-extensions-150.9846486-1
Total Download Size: 0.07 MiB
Total Installed Size: 0.30 MiB
Net Upgrade Size: 0.00 MiB
:: Proceed with installation? [Y/n]
:: Retrieving packages...
mingw-w64-x86_64-asciidoctor-exte... 72.8 KiB 242 KiB/s 00:00 [####################################] 100%
(1/1) checking keys in keyring [####################################] 100%
(1/1) checking package integrity [####################################] 100%
(1/1) loading package files [####################################] 100%
(1/1) checking for file conflicts [####################################] 100%
(1/1) checking available disk space [####################################] 100%
:: Processing package changes...
(1/1) reinstalling mingw-w64-x86_64-asciidoctor-extensions [####################################] 100%
phili@Philip-Win10 MINGW64 /c/git-sdk-64/usr/src/git (docfixup2)
then still
ASCIIDOC git-add.html
Traceback (most recent call last):
2: from C:/git-sdk-64/mingw64/bin/asciidoctor:23:in `<main>'
1: from C:/git-sdk-64/mingw64/lib/ruby/2.7.0/rubygems.rb:294:in `activate_bin_path'
C:/git-sdk-64/mingw64/lib/ruby/2.7.0/rubygems.rb:275:in `find_spec_for_exe': can't find gem asciidoctor (>= 0.a)
with executable asciidoctor (Gem::GemNotFoundException)
These things are fun...
Hrm. Works here (until I hit Ctrl+C):
$ make USE_ASCIIDOCTOR=1
GEN mergetools-list.made
GEN cmd-list.made
GEN doc.dep
SUBDIR ../
GIT_VERSION = 2.27.0.rc0.windows.1.dirty
make[1]: 'GIT-VERSION-FILE' is up to date.
SUBDIR ../
make[1]: 'GIT-VERSION-FILE' is up to date.
* new asciidoc flags
ASCIIDOC git-add.html
ASCIIDOC git-am.html
ASCIIDOC git-annotate.html
ASCIIDOC git-apply.html
make: *** [Makefile:341: git-apply.html] Interrupt
Maybe call ls-files
to the rescue?
$ git -C / ls-files \*asciidoctor.rb
mingw32/lib/ruby/gems/2.3.0/gems/asciidoctor-1.5.5/lib/asciidoctor.rb
mingw32/lib/ruby/gems/2.4.0/gems/asciidoctor-1.5.5/lib/asciidoctor.rb
mingw32/lib/ruby/gems/2.5.0/gems/asciidoctor-1.5.6.1/lib/asciidoctor.rb
mingw32/lib/ruby/gems/2.6.0/gems/asciidoctor-1.5.8/lib/asciidoctor.rb
mingw32/lib/ruby/gems/2.7.0/gems/asciidoctor-2.0.10/lib/asciidoctor.rb
mingw64/lib/ruby/gems/2.3.0/gems/asciidoctor-1.5.4/lib/asciidoctor.rb
mingw64/lib/ruby/gems/2.3.0/gems/asciidoctor-1.5.5/lib/asciidoctor.rb
mingw64/lib/ruby/gems/2.4.0/gems/asciidoctor-1.5.5/lib/asciidoctor.rb
mingw64/lib/ruby/gems/2.5.0/gems/asciidoctor-1.5.6.1/lib/asciidoctor.rb
mingw64/lib/ruby/gems/2.6.0/gems/asciidoctor-1.5.8/lib/asciidoctor.rb
mingw64/lib/ruby/gems/2.7.0/gems/asciidoctor-2.0.10/lib/asciidoctor.rb
FWIW I get totally different errors:
XMLTO git-add.1
I/O error : Attempt to load network entity http://docbook.sourceforge.net/release/xsl-ns/current/manpages/docbook.xsl
warning: failed to load external entity "http://docbook.sourceforge.net/release/xsl-ns/current/manpages/docbook.xsl"
compilation error: file /usr/src/git/Documentation/manpage.xsl line 2 element import
xsl:import : unable to load http://docbook.sourceforge.net/release/xsl-ns/current/manpages/docbook.xsl
make: *** [Makefile:376: git-add.1] Error 5
That's because you have to use an ugly workaround for the lack of docbook-ns
in MSYS2: https://github.com/git-for-windows/MINGW-packages/blob/faf74a867a5bdaa6cfe4c2c830f566e4c0dfd1d3/mingw-w64-git/PKGBUILD#L109-L122
Thanks for that command ;-)
phili@Philip-Win10 MINGW64 /c/git-sdk-64/usr/src/git (docfixup2)
$ git -C / ls-files \*asciidoctor.rb
mingw32/lib/ruby/gems/2.3.0/gems/asciidoctor-1.5.5/lib/asciidoctor.rb
mingw32/lib/ruby/gems/2.4.0/gems/asciidoctor-1.5.5/lib/asciidoctor.rb
mingw32/lib/ruby/gems/2.5.0/gems/asciidoctor-1.5.6.1/lib/asciidoctor.rb
mingw32/lib/ruby/gems/2.6.0/gems/asciidoctor-1.5.8/lib/asciidoctor.rb
mingw64/lib/ruby/gems/2.3.0/gems/asciidoctor-1.5.4/lib/asciidoctor.rb
mingw64/lib/ruby/gems/2.3.0/gems/asciidoctor-1.5.5/lib/asciidoctor.rb
mingw64/lib/ruby/gems/2.4.0/gems/asciidoctor-1.5.5/lib/asciidoctor.rb
mingw64/lib/ruby/gems/2.5.0/gems/asciidoctor-1.5.6.1/lib/asciidoctor.rb
mingw64/lib/ruby/gems/2.6.0/gems/asciidoctor-1.5.8/lib/asciidoctor.rb
looks like mine is missing 2.7.0/gems/asciidoctor-2.0.10
FWIW I get totally different errors:
XMLTO git-add.1
I/O error : ...
I think I had that when I moved/copied the asciidoc.conf file from the /etc/ directory to the bin/ascidoc directory
What does your git -C / status
say? Are there tons of out-of-date files?
What does your git -C / status say? Are there tons of out-of-date files?
There are tons of modified/deleted files.
$ git -C / status | wc -l
Refresh index: 100% (151357/151357), done.
68441
Is that enough? (do I need more ;-)
I did do a fetch
this morning, so do have an up to date origin/master
if that helps.
Please run that git reset --soft origin/master && git stash
I suggested earlier.
Sorry about missing that advice.
The stash is taking / took some time...
then
$ git stash
Saved working directory and index state WIP on (no branch): e27af3962 Update 202
00518-030842
Unlink of file 'git-bash.exe' failed. Should I try again? (y/n) n
error: unable to unlink old 'git-bash.exe': Invalid argument
Unlink of file 'mingw64/bin/git.exe' failed. Should I try again? (y/n) n
error: unable to unlink old 'mingw64/bin/git.exe': Invalid argument
Unlink of file 'mingw64/bin/libpcre2-8-0.dll' failed. Should I try again? (y/n)
n
error: unable to unlink old 'mingw64/bin/libpcre2-8-0.dll': Invalid argument
Unlink of file 'mingw64/bin/libssp-0.dll' failed. Should I try again? (y/n) n
error: unable to unlink old 'mingw64/bin/libssp-0.dll': Invalid argument
Unnlink of file 'mingw64/bin/zlib1.dll' failed. Should I try again? (y/n)
error: unable to unlink old 'mingw64/bin/zlib1.dll': Invalid argument
Unlink of file 'mingw64/libexec/git-core/git.exe' failed. Should I try again? (y
/n
n) error: unable to unlink old 'mingw64/libexec/git-core/git.exe': Invalid argum
ent
Unlink of file 'usr/bin/cygwin-console-helper.exe' failed. Should I try againn
? (y/n) error: unable to unlink old 'usr/bin/cygwin-console-helper.exe': Invalid
argument
Un
nlink of file 'usr/bin/mintty.exe' failed. Should I try again? (y/n) error: unab
le to unlink old 'usr/bin/mintty.exe': Invalid argument
Unlink of file 'usr/bin/msys-2.0.dll' failed. Should I try again? (y/n) n
error: unable to unlink old 'usr/bin/msys-2.0.dll': Invalid argument
fatal: Could not reset index file to revision 'HEAD'.
so success in a small way.
not closed window, just in case...
testing asciidoctor - yay (got past the first doc, so ctrl+C)
phili@Philip-Win10 MINGW64 /c/git-sdk-64 ((e27af3962...))
$ cd /c/git-sdk-64/usr/src/git
phili@Philip-Win10 MINGW64 /c/git-sdk-64/usr/src/git (docfixup2)
$ USE_ASCIIDOCTOR=1 make doc
make -C Documentation all
make[1]: Entering directory '/c/git-sdk-64/usr/src/git/Documentation'
make[2]: Entering directory '/c/git-sdk-64/usr/src/git'
make[2]: 'GIT-VERSION-FILE' is up to date.
make[2]: Leaving directory '/c/git-sdk-64/usr/src/git'
ASCIIDOC git-add.html
ASCIIDOC git-am.html
ASCIIDOC git-annotate.html
ASCIIDOC git-apply.html
ASCIIDOC git-archimport.html
ASCIIDOC git-archive.html
ASCIIDOC git-bisect.html
ASCIIDOC git-blame.html
make[1]: *** [Makefile:363: git-blame.html] Interrupt
make: *** [Makefile:2506: doc] Interrupt
phili@Philip-Win10 MINGW64 /c/git-sdk-64/usr/src/git (docfixup2)
so, let me close and restart the (SDK-64) window
Unlink of file 'git-bash.exe' failed. Should I try again? (y/n) n
This means that a Git SDK Bash is still running.
Yes. Brain fade. I've swapped to MINGW64:/c/git-sdk-64 and done the stash OK, and now its a much shorter list of untracked files (inc setup-git-sdk.bak
;-)
git status | wc -l
gives 355
A quick review of the list doesn't show anything that I thought was mine (to be expected given the --soft reset && stash
?)
to be expected given the
--soft reset && stash
?
Yes.
Thanks.
Obviously there's a lot of stuff in the stash. I get the feeling that it's just being retained as a precaution, but otherwise it's junk. And that I could (should) now simply checkout origin/master
But I'm always nervy about these things - it's a bit snakes & ladders.
Closing: It does look like my SDK had slowly lost synchronisation with all the moving parts of the upstream sdk & sources. The git reset --soft origin/master && git stash (in a non sdk bash, but cd to the sdk..)) was needed to clear the issues.
Closing: [...]
Did you mean to also close the ticket, as it has been addressed by now?
I thought I'd clicked "close & comment" for this issue (as opposed to other discussions which I haven't checked yet - lots of juggling balls rolling on the floor at the moment 😉)