Uploaded image for project: 'Apache Arrow'
  1. Apache Arrow
  2. ARROW-10710

[Rust] Example flight server is broken after tokio upgrade (among other things)

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 3.0.0
    • Rust

    Description

      As pointed out by rdettai on https://github.com/apache/arrow/pull/8697#issuecomment-732936572

      Doing this:

      cd rust/arrow-flight; cargo run --example server
      

      results in the following compile error

      error: The #[tokio::main] macro requires rt or rt-multi-thread.
         --> arrow-flight/examples/server.rs:121:1
          |
      121 | #[tokio::main]
          | ^^^^^^^^^^^^^^
          |
          = note: this error originates in an attribute macro (in Nightly builds, run with -Z macro-backtrace for more info)
      
      warning: unused import: `tonic::transport::Server`
        --> arrow-flight/examples/server.rs:21:5
         |
      21 | use tonic::transport::Server;
         |     ^^^^^^^^^^^^^^^^^^^^^^^^
         |
         = note: `#[warn(unused_imports)]` on by default
      
      warning: unused import: `flight_service_server::FlightServiceServer`
        --> arrow-flight/examples/server.rs:25:43
         |
      25 |     flight_service_server::FlightService, flight_service_server::FlightServiceServer,
         |                                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      
      error[E0601]: `main` function not found in crate `server`
         --> arrow-flight/examples/server.rs:18:1
          |
      18  | / use std::pin::Pin;
      19  | |
      20  | | use futures::Stream;
      21  | | use tonic::transport::Server;
      ...   |
      130 | |     Ok(())
      131 | | }
          | |_^ consider adding a `main` function to `arrow-flight/examples/server.rs`
      
      error: aborting due to 2 previous errors; 2 warnings emitted
      
      

      Attachments

        Issue Links

          Activity

            People

              alamb Andrew Lamb
              alamb Andrew Lamb
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 2h 20m
                  2h 20m