Tarlab / energiatili

MIT License
3 stars 2 forks source link

Error comping latest master #8

Closed thauta closed 7 months ago

thauta commented 7 months ago

Trying the project for the first time and having trouble compiling it. I have zero knowledge on Rust but looks like https://github.com/influxdata/influxdb_iox doesnt exist anymore?

cargo install --path energiatili-import && cargo install --path influxdb-export
...
   Compiling energiatili-config v0.1.0 (/home/thauta/raspi/energiatili/energiatili-config)
   Compiling energiatili-model v0.1.0 (/home/thauta/raspi/energiatili/energiatili-model)
warning: use of deprecated associated function `chrono::NaiveDateTime::from_timestamp`: use `from_timestamp_opt()` instead
   --> energiatili-model/src/measurement.rs:219:37
    |
219 |     let naive_date = NaiveDateTime::from_timestamp((timestamp / 1000) as i64, 0);
    |                                     ^^^^^^^^^^^^^^
    |
    = note: `#[warn(deprecated)]` on by default

warning: use of deprecated associated function `chrono::NaiveDateTime::from_timestamp`: use `from_timestamp_opt()` instead
  --> energiatili-model/src/utils.rs:17:45
   |
17 |             let naive_date = NaiveDateTime::from_timestamp(date_int / 1000, 0);
   |                                             ^^^^^^^^^^^^^^

warning: `energiatili-model` (lib) generated 2 warnings
   Compiling energiatili-import v0.1.0 (/home/thauta/raspi/energiatili/energiatili-import)
    Finished release [optimized] target(s) in 2m 10s
  Installing /home/thauta/.cargo/bin/energiatili-import
   Installed package `energiatili-import v0.1.0 (/home/thauta/raspi/energiatili/energiatili-import)` (executable `energiatili-import`)
warning: virtual workspace defaulting to `resolver = "1"` despite one or more workspace members being on edition 2021 which implies `resolver = "2"`
note: to keep the current resolver, specify `workspace.resolver = "1"` in the workspace root's manifest
note: to use the edition 2021 resolver, specify `workspace.resolver = "2"` in the workspace root's manifest
note: for more details see https://doc.rust-lang.org/cargo/reference/resolver.html#resolver-versions
warning: virtual workspace defaulting to `resolver = "1"` despite one or more workspace members being on edition 2021 which implies `resolver = "2"`
note: to keep the current resolver, specify `workspace.resolver = "1"` in the workspace root's manifest
note: to use the edition 2021 resolver, specify `workspace.resolver = "2"` in the workspace root's manifest
note: for more details see https://doc.rust-lang.org/cargo/reference/resolver.html#resolver-versions
  Installing influxdb-export v0.1.0 (/home/thauta/raspi/energiatili/influxdb-export)
    Updating crates.io index
    Updating git repository `https://github.com/influxdata/influxdb_iox`
error: failed to compile `influxdb-export v0.1.0 (/home/thauta/raspi/energiatili/influxdb-export)`, intermediate artifacts can be found at `/home/thauta/raspi/energiatili/target`.
To reuse those artifacts with a future compilation, set the environment variable `CARGO_TARGET_DIR` to that path.

Caused by:
  failed to get `influxdb2_client` as a dependency of package `influxdb-export v0.1.0 (/home/thauta/raspi/energiatili/influxdb-export)`

Caused by:
  failed to load source for dependency `influxdb2_client`

Caused by:
  Unable to update https://github.com/influxdata/influxdb_iox?rev=bf39649d64e2890e2ae9e5a4e245c67624d2df43

Caused by:
  failed to clone into: /home/thauta/.cargo/git/db/influxdb_iox-1b9c42dace7f47b7

Caused by:
  failed to authenticate when downloading repository

  * attempted to find username/password via git's `credential.helper` support, but failed

  if the git CLI succeeds then `net.git-fetch-with-cli` may help here
  https://doc.rust-lang.org/cargo/reference/config.html#netgit-fetch-with-cli

Caused by:
  failed to acquire username/password from local configuration
oherrala commented 7 months ago

Probably not something you'd like to hear, but #9 removes InfluxDB support. The code is dead and I don't have any interest in InfluxDB currently.

After removing this code the project can be at least compiled and energiatili-import tool can be used to fetch the contents of Energiatili in JSON format.

thauta commented 7 months ago

Okay, thats fine. Im looking to push this data into InfluxDBv3 but that should be quite easy now that I got energiatili-import working :+1: