-
-
Notifications
You must be signed in to change notification settings - Fork 8.6k
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
Files in exclude
are still processed by the build system, leading to hangs
#10708
Comments
Can you provide a full repro branch where I can reliably reproduce the problem? If cargo generates files, then please commit them. |
Your exclude overrides the default, maybe the problem could be related:
Maybe try appending to that exclude list instead. And also try with
|
I can't commit the files as they are large. Better steps:
I'll try the other configs, but again I know the blog code at least is using that exclude. |
I tried the excludes specified above, with "*" and "**". The build is still being triggered. |
The problem is that you assume I have cargo installed and that it's safe for me to run random commands of ecosystems I don't know much 😅 all this to help a single user. Cargo is not part of Docusaurus, please don't ask me to install a tool I don't need. I also access a zip hosted anywhere. What I understand is that this bug only affects HMR, and it gets triggered even by files that are not excluded. I think I see the problem in our But have you also modified the |
I updated the repro, using |
It does not only affect HMR, it was affecting |
I have not modified the include option, there is no |
This was suggested in facebook/docusaurus#10708 (comment). It doesn't fix the build issue, but seems good to do regardless to not hit other issues down the road.
This was suggested in facebook/docusaurus#10708 (comment). It doesn't fix the build issue, but seems good to do regardless to not hit other issues down the road.
This was suggested in facebook/docusaurus#10708 (comment). It doesn't fix the build issue, but seems good to do regardless to not hit other issues down the road.
Have you read the Contributing Guidelines on issues?
Prerequisites
npm run clear
oryarn clear
command.rm -rf node_modules yarn.lock package-lock.json
and re-installing packages.Description
I have a site that uses the classic preset. There is some Rust code in one of the blog directories (
blog/2024-11-21-optimizing-matrix-mul/code
). I explicitly exclude the Rust code and subdirectories from the blog config:Full config is on GitHub
Rust puts the
target/
output directory with intermediate and compiled artifacts in the top-level (that is,blog/2024-11-21-optimizing-matrix-mul/code/target
). After doing a couple of Rust builds (cargo build
) and benchmark runs (cargo bench
) the target directory is full of many files, some large.With a full
target/
directory, docusaurus stops building the website successfully. Bothyarn start
andyarn build
make some progress and then stall out with node using 100% CPU. I have waited for 20 mins with no forward progress (usually builds are < 10s). Deleting theblog/2024-11-21-optimizing-matrix-mul/code/target
directory's many files enables the build to make forward progress and succeed.Note when I run
yarn start
and then do a Rust build in the supposedly excluded directory, I can see the client hot-reloading / compiling being kicked off as well.I know the
exclude
entry in the config is being respected, as previously I had to put a truncate marker inREADME.md
files in the Rust code (I have missing markers set to throw). After I put the exclude entry in the settings, markdown files in code were correctly not being treated as blog posts and I could remove the truncate markers.So, it appears that something in the build process is globbing or reading/processing each file and then applying the excludes.
Reproducible demo
https://github.com/Rust-GPU/rust-gpu.github.io
Steps to reproduce
yarn start
Expected behavior
Build completes.
Actual behavior
Build is triggered. If there are tons of files, node goes to 100% CPU usage during
yarn build
, no progress on the build. Deleting the files in "exclude" directory allows the build to make progress and finish.Your environment
Self-service
The text was updated successfully, but these errors were encountered: