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

Update to the latest Linebender CI standard. #39

Merged
merged 2 commits into from
Nov 4, 2024

Conversation

xStrom
Copy link
Member

@xStrom xStrom commented Nov 3, 2024

The new CI script can be best compared to vello.

Copy link
Member

@DJMcNab DJMcNab left a comment

Choose a reason for hiding this comment

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

All looks as expected. Thanks

Copy link
Member

Choose a reason for hiding this comment

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

I was going to suggest moving to a standard gitignore, but it turns out that we don't really have one 🙃

@@ -23,3 +23,6 @@ instant = "0.1"
byte-unit = "4.0.19"
inquire = "0.7"
ureq = "2.9.6"

[target.'cfg(target_arch = "wasm32")'.dependencies]
getrandom = { version = "0.2.15", features = ["js"] }
Copy link
Member

Choose a reason for hiding this comment

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

We should probably have a comment here, because we don't use this dependency ourselves. I recognise that the corresponding Vello example almost certainly doesn't have such a comment.

Copy link
Member

Choose a reason for hiding this comment

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

Are we using getrandom currently? I don't think the "example" code (e.g. with_winit) has been updated in a long time. I am assuming this was copy/pasted from vello which does use it?

Copy link
Contributor

Choose a reason for hiding this comment

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

@simbleau rand requires a source of randomness. To get this, it uses the getrandom crate, but for WebAssembly, it doesn't enable anything by default for wasm32-unknown-unknown targets, so we have to tell it to enable something:

https://github.com/rust-random/getrandom?tab=readme-ov-file#webassembly-support

(The config here should be more specific and only happen for wasm32-unknown-unknown but that's a separate thing.)

Copy link
Member

Choose a reason for hiding this comment

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

I've ran into that issue many times and am aware, but I don't see any new use of rand, or any changes to the example, making me wonder why it's being added now?

Copy link
Contributor

Choose a reason for hiding this comment

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

Without looking, I assume because updating the CI builds more now for wasm32 and so this is related to that. But you can probably verify that.

Copy link
Member Author

Choose a reason for hiding this comment

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

It was always required, the old CI just wasn't good enough to catch the issue.

@@ -1,7 +1,3 @@
# Remove Cargo.lock from gitignore if creating an executable, leave it for libraries
# More information here https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html
Cargo.lock
Copy link
Member

Choose a reason for hiding this comment

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

Why is the lock being removed?

Copy link
Contributor

Choose a reason for hiding this comment

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

@simbleau All Linebender crates (apart from stragglers like this one) have a Cargo.lock committed to git. The Rust team changed their guidance.

Also, see https://github.com/linebender/rfcs/blob/main/rfcs/0005-version-matrix.md

@@ -23,3 +23,6 @@ instant = "0.1"
byte-unit = "4.0.19"
inquire = "0.7"
ureq = "2.9.6"

[target.'cfg(target_arch = "wasm32")'.dependencies]
getrandom = { version = "0.2.15", features = ["js"] }
Copy link
Member

Choose a reason for hiding this comment

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

Are we using getrandom currently? I don't think the "example" code (e.g. with_winit) has been updated in a long time. I am assuming this was copy/pasted from vello which does use it?

github-merge-queue bot pushed a commit to linebender/vello that referenced this pull request Nov 4, 2024
As was pointed out in
[velato#39](linebender/velato#39) this `js`
feature specification can be more narrow than all of `wasm32` and should
also be documented.
@xStrom xStrom added this pull request to the merge queue Nov 4, 2024
Merged via the queue into linebender:main with commit 5723a03 Nov 4, 2024
16 checks passed
@xStrom xStrom deleted the syncci branch November 4, 2024 11:58
github-merge-queue bot pushed a commit to linebender/vello_svg that referenced this pull request Nov 4, 2024
The changes can be best compared to
[velato#39](linebender/velato#39).
github-merge-queue bot pushed a commit to linebender/kurbo that referenced this pull request Nov 5, 2024
As was pointed out in
[velato#39](linebender/velato#39) this `js`
feature specification can be more narrow than all of `wasm32` and should
also be documented.
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.

4 participants