Skip to content

Conversation

@sagudev
Copy link
Member

@sagudev sagudev commented Sep 11, 2023

Fixes #398

@sagudev
Copy link
Member Author

sagudev commented Sep 11, 2023

@redfire75369 can you check if it works for you.

@redfire75369
Copy link
Contributor

Yes, it works. Seems fine to me

@mrobinson
Copy link
Member

Is it possible to refactor the call to find and the parsing of its output into a sh function in order to avoid so much duplication?

@sagudev
Copy link
Member Author

sagudev commented Sep 23, 2023

I wish I had this idea before.

Copy link
Member

@mrobinson mrobinson left a comment

Choose a reason for hiding this comment

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

Looks good with one naming nit.

rustfmt target/jsapi.rs --config max_width=1000
cp target/debug/build/mozjs-*/out/gluebindings.rs target/glue.rs
rustfmt target/glue.rs --config max_width=1000
find_fmt_parse() {
Copy link
Member

Choose a reason for hiding this comment

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

How about find_latest_version_of_file_parse_and_format?

Copy link
Member Author

Choose a reason for hiding this comment

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

That is so loooooong. Maybe just last_file_parse?

Copy link
Member

Choose a reason for hiding this comment

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

Bits are very cheap. It is better to be verbose and obvious, rather than short and obscure. Many people will read this code in the future and it took me a bit to understand it.

Copy link
Member Author

Choose a reason for hiding this comment

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

used long name and added usage comment and some more comments inside function

@mrobinson
Copy link
Member

Thank you!

@mrobinson mrobinson added this pull request to the merge queue Sep 28, 2023
Merged via the queue into servo:master with commit 6296684 Sep 28, 2023
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.

generate_wrappers.sh only works on Clean Builds

3 participants