You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2021/07/13 19:18:59 UTC

[GitHub] [arrow-rs] alamb opened a new pull request #545: Fix build, Make the js package a feature that can be enabled for wasm, rather than always on

alamb opened a new pull request #545:
URL: https://github.com/apache/arrow-rs/pull/545


   # Which issue does this PR close?
   Closes https://github.com/apache/arrow-rs/issues/544
   
   # Rationale for this change
   
   We upgraded Arrow to the latest version of `rand` in https://github.com/apache/arrow-rs/pull/488 which has changed how they do js/ wasm support
   
   When I tried to use arrow/datafusion in IOx (which depends on both arrow and datafusion) I got this crazy error while trying to resolve dependencies:
   
   ```
   error: cyclic package dependency: package `ahash v0.7.4` depends on itself. Cycle:
   package `ahash v0.7.4`
       ... which is depended on by `hashbrown v0.11.2`
       ... which is depended on by `indexmap v1.7.0`
       ... which is depended on by `serde_json v1.0.64`
       ... which is depended on by `wasm-bindgen v0.2.74`
       ... which is depended on by `js-sys v0.3.51`
       ... which is depended on by `getrandom v0.2.3`
       ... which is depended on by `ahash v0.7.4`
   ```
   
   The issue appears to be that the `js` feature of rand somehow pulls in ahsah again. 
   
   # What changes are included in this PR?
   
   Make the `getrandom/js` (needed to build for wasm) dependency optional for arrow
   
   # Are there any user-facing changes?
   
   Yes, In order to build for WASM, the previous command
   
   ```shell
   cargo build --target wasm32-unknown-unknown
   ```
   
   Fails with an error such as
   ```
   cd /Users/alamb/Software/arrow-rs/arrow && cargo build --target wasm32-unknown-unknown
      Compiling getrandom v0.2.3
   error: the wasm32-unknown-unknown target is not supported by default, you may need to enable the "js" feature. For more information see: https://docs.rs/getrandom/#webassembly-support
      --> /Users/alamb/.cargo/registry/src/github.com-1ecc6299db9ec823/getrandom-0.2.3/src/lib.rs:219:9
       |
   219 | /         compile_error!("the wasm32-unknown-unknown target is not supported by \
   220 | |                         default, you may need to enable the \"js\" feature. \
   221 | |                         For more information see: \
   222 | |                         https://docs.rs/getrandom/#webassembly-support");
       | |_________________________________________________________________________^
   
   ```
   
   Now, arrow users will have to explicitly specify the `js` feature:
   ```shell
   cargo build --features=js --target wasm32-unknown-unknown
   ```
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [arrow-rs] codecov-commenter commented on pull request #545: Fix build, Make the js package a feature that can be enabled for wasm, rather than always on

Posted by GitBox <gi...@apache.org>.
codecov-commenter commented on pull request #545:
URL: https://github.com/apache/arrow-rs/pull/545#issuecomment-879376748


   # [Codecov](https://codecov.io/gh/apache/arrow-rs/pull/545?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#545](https://codecov.io/gh/apache/arrow-rs/pull/545?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (89a087c) into [master](https://codecov.io/gh/apache/arrow-rs/commit/6698eed2900cffadc549a92defe2030d36ccf0d6?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (6698eed) will **not change** coverage.
   > The diff coverage is `n/a`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/arrow-rs/pull/545/graphs/tree.svg?width=650&height=150&src=pr&token=pq9V9qWZ1N&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/arrow-rs/pull/545?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   
   ```diff
   @@           Coverage Diff           @@
   ##           master     #545   +/-   ##
   =======================================
     Coverage   82.60%   82.60%           
   =======================================
     Files         167      167           
     Lines       45984    45984           
   =======================================
     Hits        37984    37984           
     Misses       8000     8000           
   ```
   
   
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/arrow-rs/pull/545?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/arrow-rs/pull/545?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [6698eed...89a087c](https://codecov.io/gh/apache/arrow-rs/pull/545?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [arrow-rs] nevi-me merged pull request #545: Fix build, Make the js package a feature that can be enabled for wasm, rather than always on

Posted by GitBox <gi...@apache.org>.
nevi-me merged pull request #545:
URL: https://github.com/apache/arrow-rs/pull/545


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org