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

Fixed webidl output formatting on Windows #4335

Merged
merged 1 commit into from
Dec 7, 2024

Conversation

RunDevelopment
Copy link
Contributor

I found the reason formatting the output files from webidl didn't work on Windows. The rustfmt command was invoked with all files given as command arguments. On Windows, there's a 32k character limit to command strings, so it failed to execute the command, because it was too long.

My solution was to invoke the command multiple times with 400 files each. In my testing ~840 files was the limit, but since the command length obviously depends on the file names, I gave us a lot of breathing room by picking 400.


I also removed the note about formatting failing, since it isn't relevant anymore. I'll also make another PR to address the newline issue.

Copy link
Collaborator

@daxpedda daxpedda left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, and here I thought its an issue about long paths.

Thank you for fixing this!

@daxpedda daxpedda merged commit 6e09815 into rustwasm:main Dec 7, 2024
54 checks passed
@RunDevelopment RunDevelopment deleted the foramt-windows branch December 8, 2024 00:54
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.

2 participants