Comments (8)
Here's a minimal reproduction: https://github.com/mattyg/bug-reproduction-nix-zome-build
Run npm run build:happ
and it fails to build on linux x64
Sorry I meant latest 0_2 holonix
Looks like mio is coming in from tokio, which I think is coming in from including holochain test_utils as a dev dependency
from holochain.
Looking at the docs, Cargo makes no promise not to build
dev-dependencies
with the release flag, it just affects optimisation. I find that incredibly strange but that's what it currently does I think https://doc.rust-lang.org/cargo/commands/cargo-build.html#examplesHolochain wasmer does this to avoid pulling deps into a wasm build, maybe that's a possible solution here? https://github.com/holochain/holochain-wasmer/blob/develop/crates/common/Cargo.toml#L20C57-L20C57
huh bizarre okay thanks I'll try that
though in the rust book it does say dev-dependencies are not compiled for building:
Dev-dependencies are not used when compiling a package for building, but are used for compiling tests, examples, and benchmarks.
https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html#development-dependencies
from holochain.
I wonder if it makes sense to actually build the scaffolded web-app in test to confirm all the build tooling is as expected in holonix:
holochain/holonix/test/scaffolding.bats
Line 19 in 6dbf9a2
from holochain.
can you share the steps you took to scaffold the happ or alternatively share a git repository?
at first sight i'm confused why mio
is pulled in as a dependency for the wasm build, as i understand mio
uses system API that is not provided by the wasm32-unknown-unknown
target.
from holochain.
Looking at the docs, Cargo makes no promise not to build dev-dependencies
with the release flag, it just affects optimisation. I find that incredibly strange but that's what it currently does I think https://doc.rust-lang.org/cargo/commands/cargo-build.html#examples
Holochain wasmer does this to avoid pulling deps into a wasm build, maybe that's a possible solution here? https://github.com/holochain/holochain-wasmer/blob/develop/crates/common/Cargo.toml#L20C57-L20C57
from holochain.
Interesting, yes they say different things on different doc pages. The page dedicated to dev-dependencies just says "These dependencies are not propagated to other packages which depend on this package." - https://doc.rust-lang.org/rust-by-example/testing/dev_dependencies.html
I actually wonder though whether this should be a dependency of the coordinator. It would be nice to have the tests live alongside the zome but the tests are actually going to want to depend on the compiled wasm output so it'll be two steps to run them anyway. So it might make sense to have a tests project... It feels a bit untidy to have to do that though, I'd rather it was a choice.
The other possibility is to raise this for clarification with the Rust project because this behavior certainly isn't desirable. It'd be worth checking if this happens in a project that isn't in a workspace before going to them, but otherwise this does seem like at very least a documentation gap.
from holochain.
Closing since it's definitely not a holonix issue -- I think it's related to some limitations in cargo workspaces.
from holochain.
I just needed to specify resolver = "2"
in the workspace manifest. Added a PR to scaffolder here: holochain/scaffolding#132
from holochain.
Related Issues (20)
- [BUG] Invalid fields in DNA manifests are ignored HOT 5
- winerror when installing lair_keystore on Windows HOT 5
- [BUG] Conductor warning "failed to resolve stun host" HOT 5
- [BUG] Long-running conductor eventually jumps to consume 100% cpu and stops logging HOT 13
- [BUG] hc scaffold entry-type fails with "Error: expected expression" HOT 6
- [BUG] "failed to get data_local_dir" error on Android HOT 12
- [ENHANCEMENT] Cache cranelift builds to database / filesystem HOT 14
- [ENHANCEMENT] Functions to get integrity, coordinator and UI hashes HOT 8
- [BUG] this error feels 'over the top' as an error HOT 1
- [BUG] Error building hdk_derive HOT 11
- [BUG] delete_entry & delete_link validation runs in all zomes in DNA HOT 7
- [ENHANCEMENT] Disambiguate `get_details(action_or_entry_hash)` into `get_record_details(action_hash)` and `get_entry_details(entry_hash)` HOT 1
- Crate Licensing HOT 12
- [Feature Request] Ability to get `CellInfo` for all cells running in the current app with `app_info()` HOT 5
- [BUG] Validation with must_get_agent_activity results in "awaiting deps" when called by the target agent HOT 3
- [BUG] Unable to build hdk_derive for test HOT 10
- [QUESTION] how to interpret certain 'error' logs HOT 14
- [ENHANCEMENT] Make sqlite_encrypted feature default for release profile HOT 3
- [ENHANCEMENT] Publish binaries to github releases HOT 10
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from holochain.