-
-
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
When using @docusaurus/faster, if there is some Chinese in the md file when packaging on version 3.6, an error message will be displayed, such as byte index 4 is not a char boundary. #10646
Comments
Thanks for reporting. I don't think it's related to Chinese because our Chinese site builds fine: What makes you think it's related to Chinese chars? Have you tried replacing those with non-Chinese chars and it fixed the issue? Have you tried turning some of the Docusaurus Faster flags off one by one and see if it works better? It looks like an Rspack bug, like the error message reports. cc @hardfist |
Thank you for reply. Panic occurred at runtime. Please file an issue on GitHub with the backtrace below: https://github.com/web-infra-dev/rspack/issues |
I see thanks. We also have @ruibaby that reported a similar issue, also involving Chinese characters apparently: @hardfist any idea if there's already a Rspack bug report for that? I found a few possibly related links: |
thanks for reporting, we will take a look ASAP |
@slorber @hardfist In docusarus 3.6.2, enabling rspack for initial compilation now works fine, but the hot update error occurred. Details: PS D:\Code\eave-web> yarn start
Backtrace omitted. Run with RUST_BACKTRACE=1 environment variable to display it. |
is there a way i can repro this? |
https://github.com/EaveLuo/eave-web/tree/renovate/docusaurus-monorepo you can pull this repo, note the branch is /renovate/docusaurus-monorepo, then you can repro. |
For me(halo-dev/docs), 3.6.2 has solved this problem, now |
@EaveLuo is the new problem still related to Chinese characters? |
@slorber FWIW, I'm also seeing the error mentioned by @EaveLuo, however I don't think we use Chinese characters? I don't quite know how to debug what we're looking at since the backtrace is not useful (non-public repo). I did confirm that 3.6.1 does not have this issue (I can both start and do hot rebuilds)...3.6.2, initial build is OK, but all hot reloads crash the server |
@slorber is there any option do disable rspack incremental build in docusaurus now, the incremental is an experimental feature in rspack now, so it may contains bugs, so it maybe good to provide an option to disable incremental build in docusarus to avoid block users. |
it shouldn't have anything to do with Chinese anymore, but rather with rspack. |
I just enabled the entire project and it can be enabled normally, but the hot update will report an error, and directly enabling the English version will directly prevent it from starting. |
Unfortunately I'm not able to reproduce the issue. If you can, please try doing the following local modification and tell me if you can still see the bug?
function getExperiments() {
if (props.currentBundler.name === 'rspack') {
return {
- incremental: !isProd,
+ incremental: undefined,
};
}
return undefined;
} If that doesn't work, also try
We don't have any option but I could add one. Since Rspack support is already experimental and opt-in, I thought about being a bit aggressive and using In the short term, I think it's safer to disable it in the current minor and add a flag in next minor. I wonder what should be the default flag value though, and how many users encounter this bug compared to those who do not encounter it. Any opinion? |
|
@slorber I tried your suggestion above. Also updating RSPack seemed to fix this as referenced above: EDIT: I'm being told by devs it's still not fixed. So it works sometimes now, but not all |
Going to disable this incremental feature in #10712 for the next patch release We'll probably add a flag for it in the next major version so that users can opt-in/out of it until it works better. I'm also closing this issue since the original Rspack bug has been fixed. This one is another thing and also likely an Rspack incremental problem. |
Are you sure 100% the dev was using Rspack 1.1.3? It seems it has only been released yesterday and includes a fix: https://github.com/web-infra-dev/rspack/releases/tag/v1.1.3 |
I'm not, but it seems very likely since they saw some improvement and change in behavior when I updated the package lock to 1.1.3. But they also still had |
|
@slorber sorry for late reply
incremental flags is still in early experimental stage, we may consider enable it by default for rspress users first when we think it's stable enough, and when it's stable in rspress and then progressively enable it by default in rsbuild and rspress. |
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
● Client ■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■ (83%) sealing chunk ids
Panic occurred at runtime. Please file an issue on GitHub with the backtrace below: https://github.com/web-infra-dev/rspack/issues
Message: byte index 4 is not a char boundary; it is inside '点' (bytes 3..6) of
站点建设-7-fa-065
Location: crates\rspack_core\src\utils\compile_boolean_matcher.rs:325
Run with COLORBT_SHOW_HIDDEN=1 environment variable to disable frame filtering.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ BACKTRACE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
1: napi_register_module_v1
at
2: napi_register_module_v1
at
3: napi_register_module_v1
at
4: napi_register_module_v1
at
5: wasmer_vm_f64_nearest
at
6: wasmer_vm_f64_nearest
at
7: napi_register_module_v1
at
8: napi_register_module_v1
at
9: napi_register_module_v1
at
10: napi_register_module_v1
at
11: napi_register_module_v1
at
12: napi_register_module_v1
at
13: napi_register_module_v1
at
14: napi_register_module_v1
at
15: napi_register_module_v1
at
16: napi_register_module_v1
at
17: napi_register_module_v1
at
18: napi_register_module_v1
at
19: napi_register_module_v1
at
20: napi_register_module_v1
at
21: napi_register_module_v1
at
22: napi_register_module_v1
at
23: napi_register_module_v1
at
24: napi_register_module_v1
at
25: napi_register_module_v1
at
26: napi_register_module_v1
at
27: wasmer_vm_f64_nearest
at
28: napi_register_module_v1
at
29: napi_register_module_v1
at
30: napi_register_module_v1
at
31: BaseThreadInitThunk
at
32: RtlUserThreadStart
at
error Command failed with exit code 3221226505.
Reproducible demo
No response
Steps to reproduce
1.upgrade to 3.6.0
2.copy these to docusaurus.config.ts :
future: {
experimental_faster: {
swcJsLoader: true,
swcJsMinimizer: true,
swcHtmlMinimizer: true,
lightningCssMinimizer: true,
rspackBundler: true,
mdxCrossCompilerCache: true,
},
},
3.start or build
4.error happened
Expected behavior
package correctly and then start.
Actual behavior
I suspect there is a problem with the byte compilation of Chinese when packaging.
Your environment
Self-service
The text was updated successfully, but these errors were encountered: