Closed
Bug 1599142
Opened 5 years ago
Closed 4 years ago
Several issues preventing `mach doc` from running on Windows
Categories
(Developer Infrastructure :: Source Documentation, defect)
Tracking
(firefox73 fixed)
RESOLVED
FIXED
mozilla73
Tracking | Status | |
---|---|---|
firefox73 | --- | fixed |
People
(Reporter: molly, Assigned: molly)
Details
Attachments
(1 file)
I've been attempting to add some documentation for a new feature using my Windows development machine, and I've found that the ./mach doc
command is not usable on Windows because of several separate issues. I'll list the ones that I've encountered:
check_jsdoc
attempts to launch a file by the name ofjsdoc
usingsubprocess.check_output()
. But, the filejsdoc
is a Bash script, so it can't be launched this way on Windows.jsdoc.cmd
should be used instead.- The Sphinx initialization process adds an environment variable called
DOCUTILSCONFIG
. It always creates this variable as a Unicode string, which in Python 2 means thesubprocess
module thinks it isn't a string and refuses to use that environment. This results in an exception when trying to set up the virtualenv here. - The Windows
CopyFile
API will fail if the destination directory does not exist. The procedure that creates the staging directory for Sphinx attempts to use this API before any directories are created, so most calls to it fail and most files don't get staged. These errors are ignored, so the result is that Sphinx succeeds in generating a set of documentation that is mostly empty. - Several instances where manually constructed paths that contain both back and forward slashes are compared to or otherwise used with normalized paths, resulting in incorrect behaviors.
I have a patch which addresses these and allows me to build the documentation; I'll put it up here.
Assignee | ||
Comment 1•5 years ago
|
||
This patch addresses the following issues which prevent building the
documentation on a Windows system:
- check_jsdoc attempts to launch a file by the name of jsdoc using
subprocess.check_output(). But, the file jsdoc is a Bash script,
so it can't be launched this way on Windows. jsdoc.cmd should be
used instead. - The Sphinx initialization process adds an environment variable
called DOCUTILSCONFIG. It always creates this variable as a Unicode
string, which in Python 2 means the subprocess module thinks it isn't
a string and refuses to use that environment. This results in an
exception when trying to set up the virtualenv here. - The Windows CopyFile API will fail if the destination directory does
not exist. The procedure that creates the staging directory for Sphinx
attempts to use this API before any directories are created, so most calls
to it fail and most files don't get staged. These errors are ignored, so
the result is that Sphinx succeeds in generating a set of documentation
that is mostly empty. - Several instances where manually constructed paths that contain both back
and forward slashes are compared to or otherwise used with normalized paths,
resulting in incorrect behaviors.
Updated•4 years ago
|
Attachment #9111286 -
Attachment description: Bug 1599142 - Fix several Windows compatibility issues in documentation generation. r=ahal → Bug 1599142 - Fix several Windows compatibility issues in documentation generation. r=ahal,froydnj
Pushed by mhowell@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/c5a5d332e1b7 Fix several Windows compatibility issues in documentation generation. r=ahal,froydnj
Comment 3•4 years ago
|
||
bugherder |
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
status-firefox73:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla73
Updated•2 years ago
|
Product: Firefox Build System → Developer Infrastructure
You need to log in
before you can comment on or make changes to this bug.
Description
•