Giter Club home page Giter Club logo

Comments (6)

hawkw avatar hawkw commented on August 25, 2024

What's the correct way to set up for development?

Do I edit Cargo.toml all over the place and edit the dependencies, then clean it all up before packaging?

The easiest way to override a dependency with a development version is to use Cargo's [patch] section. The nice thing about using [patch] (rather than hand-editing Cargo.tomls) is that it patches all dependencies on a crate in the project's dependency tree.

This means you should be able to put something like this in the root Cargo.toml in the console repo:

[patch.crates.io]
prost = { git = "https://github.com/joelreymont/prost", branch = "the-branch-your-changes-are-on" }
prost-build = { git = "https://github.com/joelreymont/prost", branch = "the-branch-your-changes-are-on" }
prost-types = { git = "https://github.com/joelreymont/prost", branch = "the-branch-your-changes-are-on" }

and it should replace all prost dependencies, including tonic's --- a tonic fork shouldn't be necessary if you're using [patch].

If that doesn't fix the errors, let me know!

from console.

joelreymont avatar joelreymont commented on August 25, 2024

It's close but... 😢

   Compiling console-api v0.1.0 (/Users/joelr/Work/Rust/console/console-api)
error[E0433]: failed to resolve: use of undeclared type `InterceptedService`
   --> /Users/joelr/Work/Rust/console/target/debug/build/console-api-d4acf0bef599edb6/out/rs.tokio.console.tasks.rs:157:1641
    |
157 | ...Send + Sync , { TasksClient :: new (InterceptedService :: new (inner , interceptor)) } # [doc = r" Compress requests with `gzip`."] # ...
    |                                        ^^^^^^^^^^^^^^^^^^ use of undeclared type `InterceptedService`

InterceptedService is in tonic but not 0.4?

from console.

hawkw avatar hawkw commented on August 25, 2024

It's close but... cry

   Compiling console-api v0.1.0 (/Users/joelr/Work/Rust/console/console-api)
error[E0433]: failed to resolve: use of undeclared type `InterceptedService`
   --> /Users/joelr/Work/Rust/console/target/debug/build/console-api-d4acf0bef599edb6/out/rs.tokio.console.tasks.rs:157:1641
    |
157 | ...Send + Sync , { TasksClient :: new (InterceptedService :: new (inner , interceptor)) } # [doc = r" Compress requests with `gzip`."] # ...
    |                                        ^^^^^^^^^^^^^^^^^^ use of undeclared type `InterceptedService`

InterceptedService is in tonic but not 0.4?

hmm... make sure that you're using the same version of both tonic and tonic-build?

from console.

joelreymont avatar joelreymont commented on August 25, 2024

Making a bit of progress here...

console specifies tonic 0.4 and prost 0.7 whereas the latest versions are 0.5 and 0.7 respectively. I had to update the version numbers in various console cargo files for the patches to be used.

I'm at a loss about this one, though. Trying to figure it out but it positively has to do with the version upgrade!

   Compiling console v0.1.0 (/Users/joelr/Work/Rust/console/console)
error[E0277]: the trait bound `SystemTime: From<Timestamp>` is not satisfied
   --> console/src/tasks.rs:116:41
    |
116 |             self.last_updated_at = Some(now.into());
    |                                         ^^^^^^^^^^ the trait `From<Timestamp>` is not implemented for `SystemTime`
    |
    = help: the following implementations were found:
              <SystemTime as From<httpdate::date::HttpDate>>
    = note: required because of the requirements on the impl of `Into<SystemTime>` for `Timestamp`

from console.

seanmonstar avatar seanmonstar commented on August 25, 2024

We've since upgraded to tonic v0.5, would this be all fixed with that?

from console.

seanmonstar avatar seanmonstar commented on August 25, 2024

I'm going to assume this is indeed fixed.

from console.

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.