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

wasm-bindgen-cli: init at 0.2.51 #67722

Merged
merged 1 commit into from Oct 16, 2019
Merged

Conversation

Ma27
Copy link
Member

@Ma27 Ma27 commented Aug 29, 2019

Motivation for this change

CLI for wasm-bindgen, a tool that helps to interact between WASM
modules written in Rust and JS-Code. This contains only the CLI[1], the
libraries are usually included via Cargo.toml in a project.

[1] https://crates.io/crates/wasm-bindgen-cli

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nix-review --run "nix-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.
Notify maintainers

cc @

@Ma27
Copy link
Member Author

Ma27 commented Aug 30, 2019

@mmahut fixed :)

@disassembler
Copy link
Member

@GrahamcOfBorg build wasm-bindgen-cli

@Ma27 Ma27 force-pushed the package-wasm-bindgen-cli branch 2 times, most recently from 0dc0aec to afe6a95 Compare September 3, 2019 11:46
@Ma27
Copy link
Member Author

Ma27 commented Sep 3, 2019

Disabled darwin build for now as I have no time and interest in maintaining a stable darwin build for this package as well. In case somebody is interested in darwin suport, feel free to file a patch :)

@worldofpeace
Copy link
Contributor

Disabled darwin build for now as I have no time and interest in maintaining a stable darwin build for this package as well. In case somebody is interested in darwin suport, feel free to file a patch :)

That's fine 👍 As the package maintainer it's best to support what you actually can support.

@B4dM4n
Copy link
Contributor

B4dM4n commented Sep 16, 2019

I made a patch to support macOS builds, if you want to merge it:

Ma27/nixpkgs@package-wasm-bindgen-cli...B4dM4n:wasm-bindgen-cli-darwin

Also note, when building the package I got a cargoSha256 mismatch. Not sure what changed, but the old cargoSha256 = "0a7w99az4yqlzi6nh0hyrpalvps6nzc5cbzgrimf1vg7kh16plxr" is not working anymore.

@B4dM4n
Copy link
Contributor

B4dM4n commented Sep 16, 2019

I dug a bit deeper and the issue probably arises from the fact that wasm-bindgen-cli-0.2.50-vendor is a fixed-output derivation.
This implies, that changing the patch that modifies the Cargo.lock does not trigger a rebuild of wasm-bindgen-cli-0.2.50-vendor, if a old version with a matching hash is in the store or available from substituters.

So whenever the inputs of fetchcargo change (currently src srcs sourceRoot cargoUpdateHook cargoPatches), the cargoSha256 needs to be invalidated.

@Ma27
Copy link
Member Author

Ma27 commented Sep 16, 2019

Yeah, this is one of the downsides of this approach with fixed-output derivations. I'm currently investigating a different issue with wasm-bindgen-cli 0.2.50 which is why this is a bit delayed now... Will report back as soon as I have something usable :)

@Ma27 Ma27 force-pushed the package-wasm-bindgen-cli branch 2 times, most recently from ebe4fbb to 8dc6919 Compare October 16, 2019 10:33
@Ma27 Ma27 changed the title wasm-bindgen-cli: init at 0.2.50 wasm-bindgen-cli: init at 0.2.51 Oct 16, 2019
@Ma27
Copy link
Member Author

Ma27 commented Oct 16, 2019

Now having 0.2.51.

@B4dM4n thanks for the fix! Squashed it together and added you as co-author :)

@ofborg build wasm-bindgen-cli

@Ma27
Copy link
Member Author

Ma27 commented Oct 16, 2019

Hmm, it actually seems as the cargo hash isn't deterministic (I actually rechecked it locally). Let's see what the x86_64-linux and darwin build does. Will take a look into this.

@Ma27
Copy link
Member Author

Ma27 commented Oct 16, 2019

Aah.... it seems as some cargo-vendor changes were made, this branch is rather old. After rebasing onto latest master I get the same hash now. Currently rebuilding, will push a fix then :)

CLI for `wasm-bindgen`, a tool that helps to interact between WASM
modules written in Rust and JS-Code. This contains only the CLI[1], the
libraries are usually included via `Cargo.toml` in a project.

Co-authored-by: Fabian Möller <fabianm88@gmail.com>

[1] https://crates.io/crates/wasm-bindgen-cli
@Ma27
Copy link
Member Author

Ma27 commented Oct 16, 2019

@ofborg build wasm-bindgen-cli

@Ma27 Ma27 merged commit f0057b6 into NixOS:master Oct 16, 2019
@Ma27 Ma27 deleted the package-wasm-bindgen-cli branch October 16, 2019 11:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants