Skip to content
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

fix: linux musl resolve failed #8467

Merged
merged 1 commit into from
Nov 19, 2024
Merged

fix: linux musl resolve failed #8467

merged 1 commit into from
Nov 19, 2024

Conversation

jerrykingxyz
Copy link
Collaborator

@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
Copy link

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
Contributor

hardfist commented Nov 18, 2024

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

@jerrykingxyz
Copy link
Collaborator 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
29 checks passed
@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
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