-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Build: log usage of old output directory _build/html
#10038
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
Changes from 1 commit
9388658
dbb31eb
1ef0a87
b4b5034
5930761
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -92,8 +92,27 @@ def collect(self): | |
}, | ||
} | ||
data["doctool"] = self._get_doctool() | ||
|
||
# NOTE: Check if there are files at `_build/html` (the old output directory) | ||
# and log these projects so we can communicate with their maintainers | ||
# | ||
# This temporal and should be removed in the future once we have | ||
# decided what to do with this collected data. | ||
self._check_using_old_output_directory() | ||
|
||
return data | ||
|
||
def _check_using_old_output_directory(self): | ||
code, stdout, stderr = self.run( | ||
"ls", | ||
humitos marked this conversation as resolved.
Show resolved
Hide resolved
|
||
"_build/html", | ||
cwd=self.project.checkout_path(self.version.slug), | ||
) | ||
if code == 0: | ||
log.warning( | ||
"Directory '_build/html' exists. This may lead to unexpected behavior." | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We should raise something user facing as well. I'm still a huge +1 on better error/warning patterns, but would it make sense to set the |
||
) | ||
|
||
def _get_doctool_name(self): | ||
if self.version.is_sphinx_type: | ||
return "sphinx" | ||
|
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.
We probably aren't as concerned about collecting this data as we are about saving user builds from having bad content. Anyone using doxygen and friends could have
_build/html
hardcoded, and will have silently broken docs.