-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Clean old_artifact_path By Default #1387
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
Comments
This seems like a good idea. The main issue is that Sphinx caches things in the build directories, but as long as we're removing the outputed _build/html directory, and not the _build/doctrees, this shouldn't effect the build caches. |
MkDocs already cleans up. So this probably wont add much, but wont cause harm either. |
Nice catch @d0ugal. Sorry I missed that in the first place. Maybe we can do away with We can just move |
I think it is still a reasonable think to do in the base builder - it will make sure things are consistent if a new builder is ever added. |
@d0ugal so rather than calling it in What are your thoughts on strategies for calling it when build is called? My only thought is to create a decorator that can be applied to the build method of each builder, and the decorator would call However, that stills requires every developer of a builder to remember to add the decorator. Is that reasonable? |
I'm not sure :) I am not familiar enough with the RTD code to say. |
@destroyerofbuilds (your name is quite funnily related to this ticket, is this intended? 😄) As you mentioned adding a decorator wouldn't be good as it's not enforced then for every builder. I would consider adding a What do you think? |
@gregmuellegger the For a brief moment I started looking at creating a |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
This is still valid for consideration. |
Our Sphinx builder is already cleaning the However, we don't have more builders at this point and we are not planning to add another one for now. So, I'm closing this issue here. We can revisit if needed. Related with the doctree directory for Sphinx: #4363 |
As part of 8180356 a clean method was added to the Sphinx build to cleanup the checkout directory before beginning a build.
The clean method is in
doc_builder/base.py
file. However, it is manually called only in the Sphinx builder. Not the Mkdocs builder.Could the clean method be called by default as part of the
finish_build
task in tasks.py to delete theold_artifact_path
directory?This should have no impact on the rest of the checkout directory contents.
The text was updated successfully, but these errors were encountered: