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

Improved contributing docs in web-sys README #4302

Merged
merged 1 commit into from
Dec 6, 2024

Conversation

RunDevelopment
Copy link
Contributor

Changes:

  1. Steps did not mention that you need to cd into crates/web-sys for the commands to work.
  2. The command failed to format the generated files, because the path of one file was too long. cargo fmt worked, so I added a note for that.
  3. While cargo fmt did work, it also used CRLF on Windows. I have git setup to check out everything as is (and WBG is LF) to make contributing to cross-platform repos easier. So cargo fmt resulted in ~2k changed files because of the different line endings. I added a note with how to fix that.
  4. Formatting.

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.

Thank you!

My suggestions can be addressed in a follow-up. This is an improvement as-is already.

3. `cd crates/web-sys`
4. Run `cargo run --release --package wasm-bindgen-webidl -- webidls src/features ./Cargo.toml`

If formatting fails, you can run `cargo fmt` in the `crates/web-sys` directory. On Windows, you might also want to run `cargo fmt -- --config newline_style=Unix` depending on your git configuration.
Copy link
Collaborator

@daxpedda daxpedda Dec 6, 2024

Choose a reason for hiding this comment

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

  • Considering you are running Windows, could you try and see if prefixing paths with \\?\ fixes the issue on Windows?
  • We should set this configuration in the rustfmt.toml file (which we don't have, so feel free to create one).

@daxpedda daxpedda merged commit 0a02046 into rustwasm:main Dec 6, 2024
46 checks passed
@RunDevelopment RunDevelopment deleted the web-sys-contr-docs branch December 7, 2024 10:04
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