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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

cargo install wasm-pack --version 0.12.1 fails on MacOS #1365

Open
ibeckermayer opened this issue Jan 30, 2024 · 4 comments
Open

cargo install wasm-pack --version 0.12.1 fails on MacOS #1365

ibeckermayer opened this issue Jan 30, 2024 · 4 comments

Comments

@ibeckermayer
Copy link

ibeckermayer commented Jan 30, 2024

馃悰 Bug description

cargo install wasm-pack --version 0.12.1 is failing on MacOS with the following error log:

error[E0445]: crate-private trait `types::Private` in public interface
  --> /Users/ibeckermayer/.cargo/registry/src/index.crates.io-6f17d22bba15001f/hoot-0.1.2/src/types.rs:10:1
   |
7  | pub(crate) trait Private {
   | ------------------------ `types::Private` declared as crate-private
...
10 | pub trait State: Private {}
   | ^^^^^^^^^^^^^^^^^^^^^^^^ can't leak crate-private trait

error[E0445]: crate-private trait `types::Private` in public interface
  --> /Users/ibeckermayer/.cargo/registry/src/index.crates.io-6f17d22bba15001f/hoot-0.1.2/src/types.rs:12:1
   |
7  | pub(crate) trait Private {
   | ------------------------ `types::Private` declared as crate-private
...
12 | pub trait Version: Private {
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^ can't leak crate-private trait

error[E0445]: crate-private trait `types::Private` in public interface
  --> /Users/ibeckermayer/.cargo/registry/src/index.crates.io-6f17d22bba15001f/hoot-0.1.2/src/types.rs:19:1
   |
7  | pub(crate) trait Private {
   | ------------------------ `types::Private` declared as crate-private
...
19 | pub trait Method: Private {
   | ^^^^^^^^^^^^^^^^^^^^^^^^^ can't leak crate-private trait

error[E0445]: crate-private trait `types::Private` in public interface
  --> /Users/ibeckermayer/.cargo/registry/src/index.crates.io-6f17d22bba15001f/hoot-0.1.2/src/types.rs:42:1
   |
7  | pub(crate) trait Private {
   | ------------------------ `types::Private` declared as crate-private
...
42 | pub trait BodyType: Private {}
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ can't leak crate-private trait

error[E0446]: crate-private type `Writer<'_, '_>` in public interface
  --> /Users/ibeckermayer/.cargo/registry/src/index.crates.io-6f17d22bba15001f/hoot-0.1.2/src/header.rs:60:1
   |
60 | / pub fn check_and_output_header(
61 | |     mut w: Writer,
62 | |     version: HttpVersion,
63 | |     name: &str,
64 | |     bytes: &[u8],
65 | |     trailer: bool,
66 | | ) -> Result<()> {
   | |_______________^ can't leak crate-private type
   |
  ::: /Users/ibeckermayer/.cargo/registry/src/index.crates.io-6f17d22bba15001f/hoot-0.1.2/src/out.rs:42:1
   |
42 |   pub(crate) struct Writer<'b, 'a> {
   |   -------------------------------- `Writer<'_, '_>` declared as crate-private

error[E0446]: private type `CallState` in public interface
   --> /Users/ibeckermayer/.cargo/registry/src/index.crates.io-6f17d22bba15001f/hoot-0.1.2/src/body.rs:10:1
    |
10  | / pub fn do_read_body<'a, 'b>(
11  | |     state: &mut CallState,
12  | |     src: &'a [u8],
13  | |     dst: &'b mut [u8],
14  | | ) -> Result<BodyPart<'b>> {
    | |_________________________^ can't leak private type
    |
   ::: /Users/ibeckermayer/.cargo/registry/src/index.crates.io-6f17d22bba15001f/hoot-0.1.2/src/lib.rs:106:1
    |
106 |   pub(crate) struct CallState {
    |   --------------------------- `CallState` declared as private

   Compiling semver v1.0.21
Some errors have detailed explanations: E0445, E0446.
For more information about an error, try `rustc --explain E0445`.
error: could not compile `hoot` (lib) due to 6 previous errors
warning: build failed, waiting for other jobs to finish...
error: failed to compile `wasm-pack v0.12.1`, intermediate artifacts can be found at `/var/folders/2g/285gxqwx5lxbx55v62jx93m00000gn/T/cargo-installOyZHaX`

This was apparently working for us previously (both locally, and in CI) but has stopped.

馃 Expected Behavior

It should build successfully

馃憻 Steps to reproduce

Set up the environment and run cargo install wasm-pack --version 0.12.1

馃實 Your environment

Include the relevant details of your environment.
wasm-pack version: wasm-pack 0.12.1
rustc version: rustc 1.71.1 (eb26296b5 2023-08-03)
macOS: macOS Sonoma 14.3 (23D56) on M1 chip (locally)

@strideynet
Copy link

strideynet commented Jan 30, 2024

Also seeing this in our GitHub Actions CI - so not sure this is MacOS specific.

@strideynet
Copy link

Looks like an upstream issue with the hoot crate - algesten/hoot#1

camscale added a commit to gravitational/teleport that referenced this issue Jan 30, 2024
When installing `wasm-pack` with `cargo`, use the `--locked` flag to
ensure the versions referenced in the Cargo.lock file are used and not
any newer versions. This creates a repeatable build and insulates us
from upstream breakage in new versions.

In particular an upstream version change included the hoot-0.1.2
dependency on a new build which fails to build with rust 1.71.1, which
is the version we are using.

Link: rustwasm/wasm-pack#1365
camscale added a commit to gravitational/teleport that referenced this issue Jan 30, 2024
When installing `wasm-pack` with `cargo`, use the `--locked` flag to
ensure the versions referenced in the Cargo.lock file are used and not
any newer versions. This creates a repeatable build and insulates us
from upstream breakage in new versions.

In particular an upstream version change included the hoot-0.1.2
dependency on a new build which fails to build with rust 1.71.1, which
is the version we are using.

Link: rustwasm/wasm-pack#1365
camscale added a commit to gravitational/teleport that referenced this issue Jan 30, 2024
When installing `wasm-pack` with `cargo`, use the `--locked` flag to
ensure the versions referenced in the Cargo.lock file are used and not
any newer versions. This creates a repeatable build and insulates us
from upstream breakage in new versions.

In particular an upstream version change included the hoot-0.1.2
dependency on a new build which fails to build with rust 1.71.1, which
is the version we are using.

Link: rustwasm/wasm-pack#1365
github-merge-queue bot pushed a commit to gravitational/teleport that referenced this issue Jan 30, 2024
* build: Ensure pinned versions when installing wasm-pack

When installing `wasm-pack` with `cargo`, use the `--locked` flag to
ensure the versions referenced in the Cargo.lock file are used and not
any newer versions. This creates a repeatable build and insulates us
from upstream breakage in new versions.

In particular an upstream version change included the hoot-0.1.2
dependency on a new build which fails to build with rust 1.71.1, which
is the version we are using.

Link: rustwasm/wasm-pack#1365

* Update e ref for version pinned cargo build of wasm-pack
github-merge-queue bot pushed a commit to gravitational/teleport that referenced this issue Jan 30, 2024
* [v15] build: Ensure pinned versions when installing wasm-pack

When installing `wasm-pack` with `cargo`, use the `--locked` flag to
ensure the versions referenced in the Cargo.lock file are used and not
any newer versions. This creates a repeatable build and insulates us
from upstream breakage in new versions.

In particular an upstream version change included the hoot-0.1.2
dependency on a new build which fails to build with rust 1.71.1, which
is the version we are using.

Link: rustwasm/wasm-pack#1365

* Update e ref for version pinned cargo build of wasm-pack
@nam178
Copy link

nam178 commented Jan 30, 2024

Confirmed that cargo install --locked --version XXX wasm-pack worked for me, thanks @camscale

@nam178
Copy link

nam178 commented Jan 30, 2024

@ibeckermayer Are you building locally with docker/finch?

If so your local build works probably because of the cache, try again with --no-cache docker/finch argument

github-merge-queue bot pushed a commit to gravitational/teleport that referenced this issue Jan 30, 2024
* [v15] build: Ensure pinned versions when installing wasm-pack

When installing `wasm-pack` with `cargo`, use the `--locked` flag to
ensure the versions referenced in the Cargo.lock file are used and not
any newer versions. This creates a repeatable build and insulates us
from upstream breakage in new versions.

In particular an upstream version change included the hoot-0.1.2
dependency on a new build which fails to build with rust 1.71.1, which
is the version we are using.

Link: rustwasm/wasm-pack#1365

* Update e ref for version pinned cargo build of wasm-pack
github-merge-queue bot pushed a commit to gravitational/teleport that referenced this issue Jan 30, 2024
* build: Ensure pinned versions when installing wasm-pack

When installing `wasm-pack` with `cargo`, use the `--locked` flag to
ensure the versions referenced in the Cargo.lock file are used and not
any newer versions. This creates a repeatable build and insulates us
from upstream breakage in new versions.

In particular an upstream version change included the hoot-0.1.2
dependency on a new build which fails to build with rust 1.71.1, which
is the version we are using.

Link: rustwasm/wasm-pack#1365

* Update e ref for version pinned cargo build of wasm-pack
github-merge-queue bot pushed a commit to gravitational/teleport that referenced this issue Jan 31, 2024
* [v15] build: Ensure pinned versions when installing wasm-pack

When installing `wasm-pack` with `cargo`, use the `--locked` flag to
ensure the versions referenced in the Cargo.lock file are used and not
any newer versions. This creates a repeatable build and insulates us
from upstream breakage in new versions.

In particular an upstream version change included the hoot-0.1.2
dependency on a new build which fails to build with rust 1.71.1, which
is the version we are using.

Link: rustwasm/wasm-pack#1365

* Update e ref for version pinned cargo build of wasm-pack
camscale added a commit to gravitational/teleport that referenced this issue Jan 31, 2024
When installing `wasm-pack` with `cargo`, use the `--locked` flag to
ensure the versions referenced in the Cargo.lock file are used and not
any newer versions. This creates a repeatable build and insulates us
from upstream breakage in new versions.

In particular an upstream version change included the hoot-0.1.2
dependency on a new build which fails to build with rust 1.71.1, which
is the version we are using.

Link: rustwasm/wasm-pack#1365
github-merge-queue bot pushed a commit to gravitational/teleport that referenced this issue Jan 31, 2024
* build: Ensure pinned versions when installing wasm-pack

When installing `wasm-pack` with `cargo`, use the `--locked` flag to
ensure the versions referenced in the Cargo.lock file are used and not
any newer versions. This creates a repeatable build and insulates us
from upstream breakage in new versions.

In particular an upstream version change included the hoot-0.1.2
dependency on a new build which fails to build with rust 1.71.1, which
is the version we are using.

Link: rustwasm/wasm-pack#1365

* Update e ref for version pinned cargo build of wasm-pack
camscale added a commit to gravitational/teleport that referenced this issue Jan 31, 2024
When installing `wasm-pack` with `cargo`, use the `--locked` flag to
ensure the versions referenced in the Cargo.lock file are used and not
any newer versions. This creates a repeatable build and insulates us
from upstream breakage in new versions.

In particular an upstream version change included the hoot-0.1.2
dependency on a new build which fails to build with rust 1.71.1, which
is the version we are using.

Link: rustwasm/wasm-pack#1365
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

No branches or pull requests

3 participants