Giter Club home page Giter Club logo

Comments (5)

yusdacra avatar yusdacra commented on July 24, 2024

This happens because the Cargo.lock file is not up-to-date, and doesn't contain the dependencies listed. If you run cargo check once, the Cargo.lock file will be updated and it builds fine.

from dream2nix.

lelongg avatar lelongg commented on July 24, 2024

Ok thanks, I missed this step. I updated the repo with a more involved example and with an updated Cargo.lock, the issue looks the same

> nix build .#ws_stream
error: builder for '/nix/store/3g67c10rfx56dw7cj6jmy1qv1nvi5wn8-ws_stream-0.1.0.drv' failed with exit code 101;
       last 10 log lines:
       > Executing cargoSetupPostUnpackHook
       > Finished cargoSetupPostUnpackHook
       > patching sources
       > configuring
       > building
       > Executing cargoBuildHook
       > ++ env CC_x86_64-unknown-linux-gnu=/nix/store/pja9g36cy32z3d51942jqk91a6l2d5nv-gcc-wrapper-10.3.0/bin/cc CXX_x86_64-unknown-linux-gnu=/nix/store/pja9g36cy32z3d51942jqk91a6l2d5nv-gcc-wrapper-10.3.0/bin/c++ CC_x86_64-unknown-linux-gnu=/nix/store/pja9g36cy32z3d51942jqk91a6l2d5nv-gcc-wrapper-10.3.0/bin/cc CXX_x86_64-unknown-linux-gnu=/nix/store/pja9g36cy32z3d51942jqk91a6l2d5nv-gcc-wrapper-10.3.0/bin/c++ cargo build -j 12 --target x86_64-unknown-linux-gnu --frozen --release --package ws_stream
       > error: no matching package named `actix-http` found
       > location searched: registry `crates-io`
       > required by package `ws_stream v0.1.0 (/build/sbsymwzcgb8dbghk7ncx9ynq70hpkkx8-source/src/backend/ws_stream)`
       For full logs, run 'nix log /nix/store/3g67c10rfx56dw7cj6jmy1qv1nvi5wn8-ws_stream-0.1.0.drv'.

from dream2nix.

lelongg avatar lelongg commented on July 24, 2024

#130 fixed the initial issue but a new one is reproducible at the same repo.

The error seems to come from actix_tls not having the connect feature activated.

error[E0432]: unresolved imports `actix_tls::connect::new_connector`, `actix_tls::connect::Connect`
  --> /build/4y8ml4p65982cqjdjjzp3by17lsmgrqn-source/../nix-vendor/actix-http-3.0.0-beta.5/src/client/connector.rs:17:5
   |
17 |     new_connector, Connect as TcpConnect, ConnectError as TcpConnectError,
   |     ^^^^^^^^^^^^^  ^^^^^^^^^^^^^^^^^^^^^ no `Connect` in `connect`
   |     |
   |     no `new_connector` in `connect`
   |
help: a similar name exists in the module
   |
17 |     connector, Connect as TcpConnect, ConnectError as TcpConnectError,
   |     ~~~~~~~~~
help: a similar name exists in the module
   |
17 |     new_connector, Connector as TcpConnect, ConnectError as TcpConnectError,
   |                    ~~~~~~~~~

error[E0432]: unresolved import `actix_tls::connect::Connect`
  --> /build/4y8ml4p65982cqjdjjzp3by17lsmgrqn-source/../nix-vendor/actix-http-3.0.0-beta.5/src/client/mod.rs:14:5
   |
14 |     Connect as TcpConnect, ConnectError as TcpConnectError, Connection as TcpConnection,
   |     -------^^^^^^^^^^^^^^
   |     |
   |     no `Connect` in `connect`
   |     help: a similar name exists in the module: `Connector`

error[E0432]: unresolved import `actix_service::pipeline_factory`
  --> /build/4y8ml4p65982cqjdjjzp3by17lsmgrqn-source/../nix-vendor/actix-http-3.0.0-beta.5/src/service.rs:13:21
   |
13 | use actix_service::{pipeline_factory, IntoServiceFactory, Service, ServiceFactory};
   |                     ^^^^^^^^^^^^^^^^ no `pipeline_factory` in the root

error[E0432]: unresolved import `actix_service::pipeline_factory`
 --> /build/4y8ml4p65982cqjdjjzp3by17lsmgrqn-source/../nix-vendor/actix-http-3.0.0-beta.5/src/h1/service.rs:8:21
  |
8 | use actix_service::{pipeline_factory, IntoServiceFactory, Service, ServiceFactory};
  |                     ^^^^^^^^^^^^^^^^ no `pipeline_factory` in the root

error[E0432]: unresolved import `actix_service::pipeline_factory`
  --> /build/4y8ml4p65982cqjdjjzp3by17lsmgrqn-source/../nix-vendor/actix-http-3.0.0-beta.5/src/h2/service.rs:10:29
   |
10 |     fn_factory, fn_service, pipeline_factory, IntoServiceFactory, Service,
   |                             ^^^^^^^^^^^^^^^^ no `pipeline_factory` in the root

error[E0282]: type annotations needed
   --> /build/4y8ml4p65982cqjdjjzp3by17lsmgrqn-source/../nix-vendor/actix-http-3.0.0-beta.5/src/client/connector.rs:267:28
    |
267 |     pub fn finish(self) -> ConnectorService<S, Io> {
    |                            ^^^^^^^^^^^^^^^^^^^^^^^ cannot infer type for type parameter `Io`

error[E0282]: type annotations needed
   --> /build/4y8ml4p65982cqjdjjzp3by17lsmgrqn-source/../nix-vendor/actix-http-3.0.0-beta.5/src/client/connector.rs:533:13
    |
533 | impl<S, Io> Service<Connect> for TcpConnectorInnerService<S>
    |             ^^^^^^^^^^^^^^^^ cannot infer type for type parameter `Io`

error[E0282]: type annotations needed
   --> /build/4y8ml4p65982cqjdjjzp3by17lsmgrqn-source/../nix-vendor/actix-http-3.0.0-beta.5/src/client/connector.rs:548:8
    |
548 |     fn call(&self, req: Connect) -> Self::Future {
    |        ^^^^ cannot infer type for type parameter `Io`

error[E0282]: type annotations needed
   --> /build/4y8ml4p65982cqjdjjzp3by17lsmgrqn-source/../nix-vendor/actix-http-3.0.0-beta.5/src/client/connector.rs:546:5
    |
546 |     actix_service::forward_ready!(service);
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot infer type for type parameter `Io`
    |
    = note: this error originates in the macro `actix_service::forward_ready` (in Nightly builds, run with -Z macro-backtrace for more info)

Some errors have detailed explanations: E0282, E0432.
For more information about an error, try `rustc --explain E0282`.
error: could not compile `actix-http` due to 9 previous errors
warning: build failed, waiting for other jobs to finish...
error: build failed

from dream2nix.

yusdacra avatar yusdacra commented on July 24, 2024

#130 fixed the initial issue but a new one is reproducible at the same repo.

The error seems to come from actix_tls not having the connect feature activated.

error[E0432]: unresolved imports `actix_tls::connect::new_connector`, `actix_tls::connect::Connect`
  --> /build/4y8ml4p65982cqjdjjzp3by17lsmgrqn-source/../nix-vendor/actix-http-3.0.0-beta.5/src/client/connector.rs:17:5
   |
17 |     new_connector, Connect as TcpConnect, ConnectError as TcpConnectError,
   |     ^^^^^^^^^^^^^  ^^^^^^^^^^^^^^^^^^^^^ no `Connect` in `connect`
   |     |
   |     no `new_connector` in `connect`
   |
help: a similar name exists in the module
   |
17 |     connector, Connect as TcpConnect, ConnectError as TcpConnectError,
   |     ~~~~~~~~~
help: a similar name exists in the module
   |
17 |     new_connector, Connector as TcpConnect, ConnectError as TcpConnectError,
   |                    ~~~~~~~~~

error[E0432]: unresolved import `actix_tls::connect::Connect`
  --> /build/4y8ml4p65982cqjdjjzp3by17lsmgrqn-source/../nix-vendor/actix-http-3.0.0-beta.5/src/client/mod.rs:14:5
   |
14 |     Connect as TcpConnect, ConnectError as TcpConnectError, Connection as TcpConnection,
   |     -------^^^^^^^^^^^^^^
   |     |
   |     no `Connect` in `connect`
   |     help: a similar name exists in the module: `Connector`

error[E0432]: unresolved import `actix_service::pipeline_factory`
  --> /build/4y8ml4p65982cqjdjjzp3by17lsmgrqn-source/../nix-vendor/actix-http-3.0.0-beta.5/src/service.rs:13:21
   |
13 | use actix_service::{pipeline_factory, IntoServiceFactory, Service, ServiceFactory};
   |                     ^^^^^^^^^^^^^^^^ no `pipeline_factory` in the root

error[E0432]: unresolved import `actix_service::pipeline_factory`
 --> /build/4y8ml4p65982cqjdjjzp3by17lsmgrqn-source/../nix-vendor/actix-http-3.0.0-beta.5/src/h1/service.rs:8:21
  |
8 | use actix_service::{pipeline_factory, IntoServiceFactory, Service, ServiceFactory};
  |                     ^^^^^^^^^^^^^^^^ no `pipeline_factory` in the root

error[E0432]: unresolved import `actix_service::pipeline_factory`
  --> /build/4y8ml4p65982cqjdjjzp3by17lsmgrqn-source/../nix-vendor/actix-http-3.0.0-beta.5/src/h2/service.rs:10:29
   |
10 |     fn_factory, fn_service, pipeline_factory, IntoServiceFactory, Service,
   |                             ^^^^^^^^^^^^^^^^ no `pipeline_factory` in the root

error[E0282]: type annotations needed
   --> /build/4y8ml4p65982cqjdjjzp3by17lsmgrqn-source/../nix-vendor/actix-http-3.0.0-beta.5/src/client/connector.rs:267:28
    |
267 |     pub fn finish(self) -> ConnectorService<S, Io> {
    |                            ^^^^^^^^^^^^^^^^^^^^^^^ cannot infer type for type parameter `Io`

error[E0282]: type annotations needed
   --> /build/4y8ml4p65982cqjdjjzp3by17lsmgrqn-source/../nix-vendor/actix-http-3.0.0-beta.5/src/client/connector.rs:533:13
    |
533 | impl<S, Io> Service<Connect> for TcpConnectorInnerService<S>
    |             ^^^^^^^^^^^^^^^^ cannot infer type for type parameter `Io`

error[E0282]: type annotations needed
   --> /build/4y8ml4p65982cqjdjjzp3by17lsmgrqn-source/../nix-vendor/actix-http-3.0.0-beta.5/src/client/connector.rs:548:8
    |
548 |     fn call(&self, req: Connect) -> Self::Future {
    |        ^^^^ cannot infer type for type parameter `Io`

error[E0282]: type annotations needed
   --> /build/4y8ml4p65982cqjdjjzp3by17lsmgrqn-source/../nix-vendor/actix-http-3.0.0-beta.5/src/client/connector.rs:546:5
    |
546 |     actix_service::forward_ready!(service);
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot infer type for type parameter `Io`
    |
    = note: this error originates in the macro `actix_service::forward_ready` (in Nightly builds, run with -Z macro-backtrace for more info)

Some errors have detailed explanations: E0282, E0432.
For more information about an error, try `rustc --explain E0282`.
error: could not compile `actix-http` due to 9 previous errors
warning: build failed, waiting for other jobs to finish...
error: build failed

Can you open a separate issue for this?

from dream2nix.

lelongg avatar lelongg commented on July 24, 2024

#131

from dream2nix.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.