Publish crate that has a dependency version unavailable on crates.io

I am trying to publish a crate that has a dependency that is pinned to a specific git commit using the rev since the version on crates.io does not have the features I'm using in my code. In the below snippet, both the arrow and parquet crates use the rev + version.

[dependencies]
parquet = { git = "https://github.com/apache/arrow", features = ["cli"], rev = "a321cded", version = "4.0.0-SNAPSHOT" }
arrow = { git = "https://github.com/apache/arrow", rev = "a321cded", version = "4.0.0-SNAPSHOT" }

Is it possible to publish such a crate? This is the error message I'm getting at the moment:

error: failed to prepare local package for uploading

Caused by:
  failed to select a version for the requirement `arrow = "^4.0.0-SNAPSHOT"`
  candidate versions found which didn't match: 3.0.0, 2.0.0, 1.0.1, ...
  location searched: crates.io index

I'm still a Rust n00b, so any help here would be great. Thanks!

All software on crates.io must have all its dependencies on crates.io. If you want to publish this package there, you'll need to first publish the forked dependency (under a new name), and change your package to depend on that published fork.

1 Like