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: use non-blocking io because rust does not support it now #1252

Merged
merged 1 commit into from
Jun 6, 2024

Conversation

xusd320
Copy link
Contributor

@xusd320 xusd320 commented Jun 6, 2024

rust 目前不支持非阻塞 stdio: rust-lang/rust#100673 , 在 antd 项目中跑挂了 https://github.com/ant-design/ant-design/actions/runs/9395487649/job/25875528581?pr=49109。

nextjs 同类问题:https://github.com/vercel/next.js/pull/56789/files#diff-907b7be0cfc75bd37773e5ebc38d1deffa40861b8ac1cde92e4992e284a1ee59

Summary by CodeRabbit

  • 优化
    • 简化了mako包中index.ts中的blockStdout函数,移除了对'darwin'平台的检查,并将stdout和stderr的设置合并为阻塞以实现Rust兼容性。

@xusd320 xusd320 requested a review from sorrycc June 6, 2024 07:13
Copy link
Contributor

coderabbitai bot commented Jun 6, 2024

Walkthrough

整体变更涉及简化mako包中index.ts中的blockStdout函数,通过移除对'darwin'的平台检查并将stdout和stderr设置为阻塞以实现Rust兼容性。

Changes

文件 变更摘要
packages/mako/src/index.ts 移除对'darwin'的平台检查,统一设置stdout和stderr为阻塞,以实现Rust兼容性。

Poem

兔子编码忙修改,

'darwin'检查不再重,

stdout、stderr阻塞定,

Rust友好更亲切。🐇✨


Note

Summarized by CodeRabbit Free

Your organization is on the Free plan. CodeRabbit will generate a high-level summary and a walkthrough for each pull request. For a comprehensive line-by-line review, please upgrade your subscription to CodeRabbit Pro by visiting https://coderabbit.ai

Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@PeachScript
Copy link
Member

看了下 antd 的产物,小尺寸的 async chunk 好多,感觉得把这个行为做成开关加回来,#929

让小尺寸的 async chunk 直接进 entry,运行时性能上可能更好?

@xusd320 xusd320 merged commit cf8bb86 into master Jun 6, 2024
8 checks passed
@delete-merged-branch delete-merged-branch bot deleted the fix/set-non-blocking-io branch June 6, 2024 07:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants