-
Notifications
You must be signed in to change notification settings - Fork 21
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
Cannot clear docs/_build
directory due to locked database files
#865
Comments
The easiest and cleanest solution would be to store the database files outside of My thoughts would be to have some Esbonio storage folder - in %APPDATA% or %LOCALAPPDATA%, I am not sure - and create a directory for each project there with the preview database files stored in them. I snooped around a bit and I found something like |
An alternative option could be to store the Esbonio database files in the The comments in this topic might be of interest to you: microsoft/vscode#22557 |
Yes... but it's VSCode specific and the server would have to be told about it via a config option set by the extension (not necessarily a bad thing and how it works in the stable release).
If the Or shall I also add a separate
The only way to reference it I know of is via the VSCode API in the extension itself... |
Hm, yes, that would fix the whole issue! And this behavior would be similar to the current stable release version I think.
With the above solution it won't be needed in our case, but for people who want to have the exact same build location for the preview docs and normal docs that would be an option to solve the issue with the locked database files.
Thanks. Yes, I thought that as well. But with your suggested solution using |
Unless esbonio finds a `sphinx-build` command to use from the user's config it will attempt to guess something reasonable. During this process it generates a default build directory to use, in a subfolder of `platformdirs.user_cache_dir()` so that it does not interfere with the user's files. Up until now, the moment a user sets their own `sphinx-build` command this behavior is lost, which can lead to issues on some systems (see swyddfa#865). This commit introduces a `${defaultBuildDir}` placeholder value that the user can use to provide their own build flags, while maintaining the default choice of build dir provided by esbonio.
Unless esbonio finds a `sphinx-build` command to use from the user's config it will attempt to guess something reasonable. During this process it generates a default build directory to use, in a subfolder of `platformdirs.user_cache_dir()` so that it does not interfere with the user's files. Up until now, the moment a user sets their own `sphinx-build` command this behavior is lost, which can lead to issues on some systems (see swyddfa#865). This commit introduces a `${defaultBuildDir}` placeholder value that the user can use to provide their own build flags, while maintaining the default choice of build dir provided by esbonio.
Unless esbonio finds a `sphinx-build` command to use from the user's config it will attempt to guess something reasonable. During this process it generates a default build directory to use, in a subfolder of `platformdirs.user_cache_dir()` so that it does not interfere with the user's files. Up until now, the moment a user sets their own `sphinx-build` command this behavior is lost, which can lead to issues on some systems (see #865). This commit introduces a `${defaultBuildDir}` placeholder value that the user can use to provide their own build flags, while maintaining the default choice of build dir provided by esbonio.
Is this included in the new pre-release? |
The |
Thanks! I have it running now, in a multi-root workspace setup 😊 Nice work 👍👍👍 |
Expected behavior
We have a script to clear (remove) the build directory. This does not work anymore due to locked Esbonio database files.
Actual behavior
When I try to delete the
docs/_build
directory I get the following errors:If I try to delete it in Windows Explorer, it says
The action can't be completed because the file is open in Python
. When I close VS Code and then delete the folder it's gone. How can we make sure thedocs/_build
directory can be removed successfully? This should work independently from the Preview function. For example, we have scripts to clear the entire code and documentation builds and rebuild everything from scratch, if necessary.Log output
No response
(Optional) Settings from conf.py
No response
The text was updated successfully, but these errors were encountered: