FieldReport: Upgrading from geo 0.31.x to 0.32.x breaks the build #1476
+13
−0
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I see this when building for the browser
The problems is side-effects from changes inside of the getrandom crate.
MyApp -> MyLib -> geo -> rand -> getrandom
getrandom The change here releates to the sourcing of randomness for "supported targets" Here is the relevant quote from the getrandom README
For this PR the summary is
rand must enable the "wasm-js" and the root crate ( MyApp in this example ) must set this enviromment variable
RUSTFLAGS='--cfg getrandom_backend="wasm_js"'
rand takes its own view on this matter
Here is the relevant quote form the rand README
"The WASI and Emscripten targets are directly supported. The wasm32-unknown-unknown target is not automatically supported. To enable support for this target, refer to the getrandom documentation for WebAssembly. Alternatively, the os_rng feature may be disabled."The best we can do, in geo, I think, is to optionally remove the rand crate, for builds that target the web.
geo = { path ="0.32", features = [ "earcutr", "spade", "multithreading"], default-features = false }
I should empahsise this comes at the cost of removing the kmeans module and its associated functionality.
CHANGES.mdif knowledge of this change could be valuable to users.