twitchax/rtz

Unable to run

ringsaturn opened this issue · 9 comments

Hi there,

I am maintaning another project named tzf-rs and I want to run some benchmark compared with rtz, however codes compiled failed:

error[E0432]: unresolved imports `rtz_core::geo::shared::generate_bincodes`, `rtz_core::geo::tz::ned`
Error:    --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/rtz-build-0.2.6/src/lib.rs:29:9
    |
29  |         shared::generate_bincodes,
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^ no `generate_bincodes` in `geo::shared`
30  |         tz::ned::{get_geojson_features_from_source, NedTimezone, LOOKUP_BINCODE_DESTINATION_NAME, TIMEZONE_BINCODE_DESTINATION_NAME},
    |             ^^^ could not find `ned` in `tz`
    |
note: found an item that was configured out
   --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/rtz-core-0.1.4/src/geo/shared.rs:281:8
    |
281 | pub fn generate_bincodes<T>(geojson_features: FeatureCollection, timezone_bincode_destination: impl AsRef<Path>, lookup_bincode_destinati...
    |        ^^^^^^^^^^^^^^^^^
    = note: the item is gated behind the `self-contained` feature

error[E0432]: unresolved imports `rtz_core::geo::shared::generate_bincodes`, `rtz_core::geo::tz::osm`
Error:    --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/rtz-build-0.2.6/src/lib.rs:52:9
    |
52  |         shared::generate_bincodes,
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^ no `generate_bincodes` in `geo::shared`
53  |         tz::osm::{get_geojson_features_from_source, OsmTimezone, LOOKUP_BINCODE_DESTINATION_NAME, TIMEZONE_BINCODE_DESTINATION_NAME},
    |             ^^^ could not find `osm` in `tz`
    |
note: found an item that was configured out
   --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/rtz-core-0.1.4/src/geo/shared.rs:281:8
    |
281 | pub fn generate_bincodes<T>(geojson_features: FeatureCollection, timezone_bincode_destination: impl AsRef<Path>, lookup_bincode_destinati...
    |        ^^^^^^^^^^^^^^^^^
    = note: the item is gated behind the `self-contained` feature

error[E0432]: unresolved import `rtz_core::geo::shared::generate_bincodes`
Error:    --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/rtz-build-0.2.6/src/lib.rs:76:9
    |
76  |         shared::generate_bincodes,
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^ no `generate_bincodes` in `geo::shared`
    |
note: found an item that was configured out
   --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/rtz-core-0.1.4/src/geo/shared.rs:281:8
    |
281 | pub fn generate_bincodes<T>(geojson_features: FeatureCollection, timezone_bincode_destination: impl AsRef<Path>, lookup_bincode_destinati...
    |        ^^^^^^^^^^^^^^^^^
    = note: the item is gated behind the `self-contained` feature

For more information about this error, try `rustc --explain E0432`.
error: could not compile `rtz-build` (lib) due to 3 previous errors
warning: build failed, waiting for other jobs to finish...

Do you know where is wrong?

Hmmm, which features are you using? Works for me right now.

Regardless, the best way to test it is to use --features full.

Interested to see the results! :)

That's weird. Can you switch to latest temporarily?

Also, you might want to try both datasets, since they are a bit different: NedTimezone and OsmTimezone.

I have push a commit update rtz to:

rtz = { git = "https://github.com/twitchax/rtz", features = [
    "full",
    "self-contained",
], rev = "4ccd2fdfa292b2de3260f221abede8a6525a8437" }

Same fail logs https://github.com/ringsaturn/tz-benchmark/actions/runs/5852609802/job/15865116065?pr=118#step:6:18

error[E0432]: unresolved imports `rtz_core::geo::shared::generate_bincodes`, `rtz_core::geo::tz::ned`
Error:    --> /home/runner/.cargo/git/checkouts/rtz-fe1cf998f7025f5f/4ccd2fd/rtz-build/src/lib.rs:29:9
    |
29  |         shared::generate_bincodes,
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^ no `generate_bincodes` in `geo::shared`
30  |         tz::ned::{get_geojson_features_from_source, NedTimezone, LOOKUP_BINCODE_DESTINATION_NAME, TIMEZONE_BINCODE_DESTINATION_NAME},
    |             ^^^ could not find `ned` in `tz`
    |
note: found an item that was configured out
   --> /home/runner/.cargo/git/checkouts/rtz-fe1cf998f7025f5f/4ccd2fd/rtz-core/src/geo/shared.rs:287:8
    |
287 | pub fn generate_bincodes<T>(geojson_features: FeatureCollection, timezone_bincode_destination: impl AsRef<Path>, lookup_bincode_destinati...
    |        ^^^^^^^^^^^^^^^^^
    = note: the item is gated behind the `self-contained` feature

error[E0432]: unresolved imports `rtz_core::geo::shared::generate_bincodes`, `rtz_core::geo::tz::osm`
Error:    --> /home/runner/.cargo/git/checkouts/rtz-fe1cf998f7025f5f/4ccd2fd/rtz-build/src/lib.rs:52:9
    |
52  |         shared::generate_bincodes,
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^ no `generate_bincodes` in `geo::shared`
53  |         tz::osm::{get_geojson_features_from_source, OsmTimezone, LOOKUP_BINCODE_DESTINATION_NAME, TIMEZONE_BINCODE_DESTINATION_NAME},
    |             ^^^ could not find `osm` in `tz`
    |
note: found an item that was configured out
   --> /home/runner/.cargo/git/checkouts/rtz-fe1cf998f7025f5f/4ccd2fd/rtz-core/src/geo/shared.rs:287:8
    |
287 | pub fn generate_bincodes<T>(geojson_features: FeatureCollection, timezone_bincode_destination: impl AsRef<Path>, lookup_bincode_destinati...
    |        ^^^^^^^^^^^^^^^^^
    = note: the item is gated behind the `self-contained` feature

error[E0432]: unresolved import `rtz_core::geo::shared::generate_bincodes`
Error:    --> /home/runner/.cargo/git/checkouts/rtz-fe1cf998f7025f5f/4ccd2fd/rtz-build/src/lib.rs:76:9
    |
76  |         shared::generate_bincodes,
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^ no `generate_bincodes` in `geo::shared`
    |
note: found an item that was configured out
   --> /home/runner/.cargo/git/checkouts/rtz-fe1cf998f7025f5f/4ccd2fd/rtz-core/src/geo/shared.rs:287:8
    |
287 | pub fn generate_bincodes<T>(geojson_features: FeatureCollection, timezone_bincode_destination: impl AsRef<Path>, lookup_bincode_destinati...
    |        ^^^^^^^^^^^^^^^^^
    = note: the item is gated behind the `self-contained` feature

For more information about this error, try `rustc --explain E0432`.
error: could not compile `rtz-build` (lib) due to 3 previous errors
warning: build failed, waiting for other jobs to finish...

That doesn't make any sense.

That use statement is gated by the same feature. Let me try pulling your source.

Ok, update to 021eab5, and it should work. It was a quirk of how the features get pulled in for the build step.

Thanks, it could work now:

running 6 tests
test benches_tz_crates::bench_rtz_get_timezone_ned_random_city ... bench:       1,138 ns/iter (+/- 42)
test benches_tz_crates::bench_rtz_get_timezone_osm_random_city ... bench:       4,477 ns/iter (+/- 283)
test benches_tz_crates::bench_tz_search_lookup_random_city     ... bench:         256 ns/iter (+/- 21)
test benches_tz_crates::bench_tzf_default_finder_random_city   ... bench:       3,162 ns/iter (+/- 207)
test benches_tz_crates::bench_tzf_finder_random_city           ... bench:      15,375 ns/iter (+/- 904)
test benches_tz_crates::bench_tzf_fuzzy_finder_random_city     ... bench:         958 ns/iter (+/- 13)

test result: ok. 0 passed; 0 failed; 0 ignored; 6 measured; 0 filtered out; finished in 26.80s