-1

On the git repository for Datafusion, it says to add the following to the Cargo.toml file to use it as a library:

[dependencies]
datafusion = "1.0.0-SNAPSHOT"

I get this as an output when running cargo build

 Updating crates.io index
error: failed to select a version for the requirement `datafusion = "^1.0.0-SNAPSHOT"`
  candidate versions found which didn't match: 0.17.0, 0.16.0, 0.15.1, ...
  location searched: crates.io index
required by package `hello_cargo v0.1.0 (/Users/jay/Projects/hello_cargo)`

I then tried to use 0.17.0 and ran cargo +nightly build:

error: failed to run custom build command for `arrow-flight v0.17.0`

    Caused by:
      process didn't exit successfully: `/Users/jay/Projects/hello_cargo/target/debug/build/arrow-flight-46000fbc5b8b474b/build-script-build` (exit code: 1)
    --- stderr
    Error: "Failed to locate format/Flight.proto in any parent directory"
    
    warning: build failed, waiting for other jobs to finish...
    error: build failed

It seems to work when I use version 0.16.0

Shepmaster
  • 388,571
  • 95
  • 1,107
  • 1,366
Jay
  • 25
  • 7
  • *Failed to locate format/Flight.proto* seems reasonably self-explanatory of an error message. – Shepmaster Jun 29 '20 at 18:30
  • *seems to work* — so... problem solved? – Shepmaster Jun 29 '20 at 18:40
  • I'm wondering why having datafusion = "1.0.0-SNAPSHOT" is not working on its on. Feel like I'm missing something, was hoping someone could illuminate the situation. – Jay Jun 29 '20 at 18:54
  • Because [datafusion haven't released version 1.0.0-SNAPSHOT yet](https://crates.io/crates/datafusion). You're looking at the README for the future version. – Jmb Jun 30 '20 at 06:30
  • makes sense, thank you! – Jay Jul 01 '20 at 17:23

1 Answers1

1

As Cargo tells you:

candidate versions found which didn't match: 0.17.0, 0.16.0, 0.15.1, ...

There are no versions called 1.0.0-SNAPSHOT of this crate published to crates.io. If you wish to use unreleased code from a git repository, you need to use a git dependency:

[dependencies]
rand = { git = "https://github.com/apache/arrow/" }

See also:

Shepmaster
  • 388,571
  • 95
  • 1,107
  • 1,366