Skip to content

fix: linux musl resolve failed#8467

Merged
JSerFeng merged 1 commit intomainfrom
jerry/resolve
Nov 19, 2024
Merged

fix: linux musl resolve failed#8467
JSerFeng merged 1 commit intomainfrom
jerry/resolve

Conversation

@jerrykingxyz
Copy link
Copy Markdown
Contributor

@jerrykingxyz jerrykingxyz commented Nov 18, 2024

Summary

Some linux musl can not get create time, and it will make resolve failed because of metadata return err.

This PR will specify a default value of 0 for the creation time when the platform does not support it.

Should fix:

Checklist

  • Tests updated (or not required).
  • Documentation updated (or not required).

@github-actions github-actions bot added release: bug fix release: bug related release(mr only) team The issue/pr is created by the member of Rspack. labels Nov 18, 2024
@netlify
Copy link
Copy Markdown

netlify bot commented Nov 18, 2024

Deploy Preview for rspack canceled.

Name Link
🔨 Latest commit c000bcd
🔍 Latest deploy log https://app.netlify.com/sites/rspack/deploys/673bc8ba07f4060008add755

JSerFeng
JSerFeng previously approved these changes Nov 18, 2024
@JSerFeng JSerFeng enabled auto-merge (squash) November 18, 2024 22:11
@hardfist
Copy link
Copy Markdown
Contributor

hardfist commented Nov 18, 2024

why the resolve succeed before and dont get the panic message now

@jerrykingxyz
Copy link
Copy Markdown
Contributor Author

why the resolve succeed before and dont get the panic message now

Before #8366, We use rspack_resolver::FileMetadata::from with std::fs::Metadata and it does not get the metadata.created() values.

code:
https://github.com/web-infra-dev/rspack/pull/8366/files#diff-bf8cd6ecce0c487ed3834f3fa4e20f4bdde318d99fc6f2ff75a49a6e08307948L22

Currently we will convert std::fs::Metadata -> rspack_fs::FileMetadata -> rspack_resolver::FileMetadata, and this error occurs during the first conversion.

@JSerFeng JSerFeng merged commit 91efd3d into main Nov 19, 2024
@JSerFeng JSerFeng deleted the jerry/resolve branch November 19, 2024 03:49
@h-a-n-a h-a-n-a mentioned this pull request Nov 19, 2024
NyanKiyoshi added a commit to NyanKiyoshi/saleor-docs that referenced this pull request Dec 5, 2024
When running the docs inside containers (specifically with volumes), the docs would fail to build with errors such as:

```
[INFO] Starting the development server...
[SUCCESS] Docusaurus website is running at: http://localhost:5000/
× Module not found: Can't resolve '/app/src/css/theme.css' in '/app/.docusaurus'
   ╭─[5:4]
 3 │     require("/app/node_modules/@docusaurus/theme-classic/lib/prism-include-languages"),
 4 │     require("/app/node_modules/@docusaurus/theme-classic/lib/nprogress"),
 5 │     require("/app/src/css/theme.css")
   ·     ─────────────────────────────────
 6 │ ];
   ╰────
[...]
× Cannot find module '@generated/site-storage' for matched aliased key '@generated'
[...]
client (Rspack 1.1.1) compiled with 34 errors
```

This commit fixes the issue by upgrading `@rspack/core` to v1.1.2 which contains the fix: web-infra-dev/rspack#8467
aniav added a commit to saleor/saleor-docs that referenced this pull request Dec 9, 2024
* Fix build errors on container volumes

When running the docs inside containers (specifically with volumes), the docs would fail to build with errors such as:

```
[INFO] Starting the development server...
[SUCCESS] Docusaurus website is running at: http://localhost:5000/
× Module not found: Can't resolve '/app/src/css/theme.css' in '/app/.docusaurus'
   ╭─[5:4]
 3 │     require("/app/node_modules/@docusaurus/theme-classic/lib/prism-include-languages"),
 4 │     require("/app/node_modules/@docusaurus/theme-classic/lib/nprogress"),
 5 │     require("/app/src/css/theme.css")
   ·     ─────────────────────────────────
 6 │ ];
   ╰────
[...]
× Cannot find module '@generated/site-storage' for matched aliased key '@generated'
[...]
client (Rspack 1.1.1) compiled with 34 errors
```

This commit fixes the issue by upgrading `@rspack/core` to v1.1.2 which contains the fix: web-infra-dev/rspack#8467

* Exclude .json files from cspell check

---------

Co-authored-by: Ania Warzecha <anna.warzecha@saleor.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release: bug fix release: bug related release(mr only) team The issue/pr is created by the member of Rspack.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants