reinterpretcat / vrp

A Vehicle Routing Problem solver
https://reinterpretcat.github.io/vrp/
Apache License 2.0
331 stars 68 forks source link

Can't compile 1.10.0 #29

Closed Duoquote closed 3 years ago

Duoquote commented 3 years ago

I have tried this command to compile 1.10.0 version but looks like it tries to compile with vrp-core=1.10.4 and vrp-pragmatic=1.10.4,

root@c7751a4f9151:/# ~/.cargo/bin/cargo install vrp-cli --vers 1.10.0
    Updating crates.io index
  Installing vrp-cli v1.10.0
   Compiling autocfg v1.0.1
   Compiling libc v0.2.94
   Compiling cfg-if v1.0.0
   Compiling lazy_static v1.4.0
   Compiling proc-macro2 v1.0.27
   Compiling unicode-xid v0.2.2
   Compiling syn v1.0.72
   Compiling rayon-core v1.9.1
   Compiling serde_derive v1.0.126
   Compiling version_check v0.9.3
   Compiling scopeguard v1.1.0
   Compiling serde v1.0.126
   Compiling ppv-lite86 v0.2.10
   Compiling once_cell v1.7.2
   Compiling memchr v2.4.0
   Compiling ryu v1.0.5
   Compiling either v1.6.1
   Compiling bitflags v1.2.1
   Compiling serde_json v1.0.64
   Compiling itoa v0.4.7
   Compiling byteorder v1.4.3
   Compiling unicode-width v0.1.8
   Compiling ansi_term v0.11.0
   Compiling strsim v0.8.0
   Compiling vec_map v0.8.2
   Compiling ahash v0.7.2
   Compiling crossbeam-utils v0.8.4
   Compiling memoffset v0.6.3
   Compiling rayon v1.5.1
   Compiling num-traits v0.2.14
   Compiling num-integer v0.1.44
   Compiling textwrap v0.11.0
   Compiling regex-automata v0.1.9
   Compiling csv-core v0.1.10
   Compiling quote v1.0.9
   Compiling getrandom v0.2.3
   Compiling num_cpus v1.13.0
   Compiling time v0.1.43
   Compiling atty v0.2.14
   Compiling rand_core v0.6.2
   Compiling clap v2.33.3
   Compiling crossbeam-epoch v0.9.4
   Compiling crossbeam-channel v0.5.1
   Compiling rand_chacha v0.3.0
   Compiling hashbrown v0.11.2
   Compiling crossbeam-deque v0.8.0
   Compiling rand v0.8.3
   Compiling chrono v0.4.19
   Compiling vrp-core v1.10.4
   Compiling vrp-scientific v1.10.4
   Compiling bstr v0.2.16
   Compiling csv v1.1.6
   Compiling vrp-pragmatic v1.10.4
   Compiling vrp-cli v1.10.0
error[E0560]: struct `vrp_pragmatic::format::problem::Job` has no field named `priority`
  --> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/vrp-cli-1.10.0/src/extensions/generate/plan.rs:67:17
   |
67 |                 priority: job_proto.priority,
   |                 ^^^^^^^^ `vrp_pragmatic::format::problem::Job` does not have this field
   |
   = note: available fields are: `id`, `pickups`, `deliveries`, `replacements`, `services` ... and 3 others

error[E0609]: no field `priority` on type `&vrp_pragmatic::format::problem::Job`
  --> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/vrp-cli-1.10.0/src/extensions/generate/plan.rs:67:37
   |
67 |                 priority: job_proto.priority,
   |                                     ^^^^^^^^ unknown field
   |
   = note: available fields are: `id`, `pickups`, `deliveries`, `replacements`, `services` ... and 3 others

error[E0560]: struct `vrp_pragmatic::format::problem::Job` has no field named `priority`
   --> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/vrp-cli-1.10.0/src/extensions/import/csv.rs:100:17
    |
100 |                 priority: None,
    |                 ^^^^^^^^ `vrp_pragmatic::format::problem::Job` does not have this field
    |
    = note: available fields are: `id`, `pickups`, `deliveries`, `replacements`, `services` ... and 3 others

error[E0560]: struct `vrp_pragmatic::format::problem::Job` has no field named `priority`
   --> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/vrp-cli-1.10.0/src/extensions/import/hre.rs:287:21
    |
287 |                     priority: job.priority.as_ref().copied(),
    |                     ^^^^^^^^ `vrp_pragmatic::format::problem::Job` does not have this field
    |
    = note: available fields are: `id`, `pickups`, `deliveries`, `replacements`, `services` ... and 3 others

error[E0609]: no field `priority` on type `&vrp_pragmatic::format::problem::Job`
   --> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/vrp-cli-1.10.0/src/extensions/import/hre.rs:442:39
    |
442 |                         priority: job.priority,
    |                                       ^^^^^^^^ unknown field
    |
    = note: available fields are: `id`, `pickups`, `deliveries`, `replacements`, `services` ... and 3 others

error[E0599]: no method named `with_cost_variation` found for struct `vrp_core::solver::Builder` in the current scope
   --> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/vrp-cli-1.10.0/src/extensions/solve/config.rs:517:27
    |
517 |         builder = builder.with_cost_variation(config.variation.as_ref().map(|v| (v.sample, v.cv)));
    |                           ^^^^^^^^^^^^^^^^^^^ method not found in `vrp_core::solver::Builder`

error: aborting due to 6 previous errors

Some errors have detailed explanations: E0560, E0599, E0609.
For more information about an error, try `rustc --explain E0560`.
error: failed to compile `vrp-cli v1.10.0`, intermediate artifacts can be found at `/tmp/cargo-installZ6HHcC`

Caused by:
  could not compile `vrp-cli`
Duoquote commented 3 years ago

My current solution is as below:

root@c7751a4f9151:/# git clone https://github.com/reinterpretcat/vrp.git
Cloning into 'vrp'...
remote: Enumerating objects: 24927, done.
remote: Counting objects: 100% (1264/1264), done.
remote: Compressing objects: 100% (871/871), done.
remote: Total 24927 (delta 644), reused 866 (delta 379), pack-reused 23663
Receiving objects: 100% (24927/24927), 5.06 MiB | 10.52 MiB/s, done.
Resolving deltas: 100% (15289/15289), done.
root@c7751a4f9151:/# cd vrp/
root@c7751a4f9151:/vrp# git checkout v1.10.0
HEAD is now at 27ee30e5 Bump version to 1.10.0
root@c7751a4f9151:/vrp# ~/.cargo/bin/cargo build --release
   Compiling autocfg v1.0.1
   Compiling libc v0.2.94
   Compiling lazy_static v1.4.0
   Compiling proc-macro2 v1.0.27
   Compiling unicode-xid v0.2.2
   Compiling syn v1.0.72
   Compiling version_check v0.9.3
   Compiling rayon-core v1.9.1
   Compiling scopeguard v1.1.0
   Compiling serde_derive v1.0.126
   Compiling serde v1.0.126
   Compiling ryu v1.0.5
   Compiling ppv-lite86 v0.2.10
   Compiling once_cell v1.7.2
   Compiling memchr v2.4.0
   Compiling either v1.6.1
   Compiling serde_json v1.0.64
   Compiling itoa v0.4.7
   Compiling byteorder v1.4.3
   Compiling bitflags v1.2.1
   Compiling unicode-width v0.1.8
   Compiling ansi_term v0.11.0
   Compiling strsim v0.8.0
   Compiling vec_map v0.8.2
   Compiling ahash v0.7.2
   Compiling textwrap v0.11.0
   Compiling crossbeam-utils v0.8.4
   Compiling memoffset v0.6.3
   Compiling rayon v1.5.1
   Compiling num-traits v0.2.14
   Compiling num-integer v0.1.44
   Compiling regex-automata v0.1.9
   Compiling csv-core v0.1.10
   Compiling quote v1.0.9
   Compiling getrandom v0.2.3
   Compiling num_cpus v1.13.0
   Compiling time v0.1.44
   Compiling atty v0.2.14
   Compiling clap v2.33.3
   Compiling rand_core v0.6.2
   Compiling crossbeam-epoch v0.9.4
   Compiling crossbeam-channel v0.5.1
   Compiling rand_chacha v0.3.0
   Compiling hashbrown v0.11.2
   Compiling crossbeam-deque v0.8.0

   Compiling rand v0.8.3
   Compiling chrono v0.4.19
   Compiling vrp-core v1.10.0 (/vrp/vrp-core)
   Compiling vrp-scientific v1.10.0 (/vrp/vrp-scientific)
   Compiling bstr v0.2.16
   Compiling csv v1.1.6
   Compiling vrp-pragmatic v1.10.0 (/vrp/vrp-pragmatic)
   Compiling vrp-cli v1.10.0 (/vrp/vrp-cli)
   Compiling json-pragmatic v1.10.0 (/vrp/examples/json-pragmatic)
    Finished release [optimized] target(s) in 2m 51s
root@c7751a4f9151:/vrp# target/release/vrp-cli -V
Vehicle Routing Problem Solver 1.10.0
reinterpretcat commented 3 years ago

I guess it is related the way version specified and actual breaking changes between minor versions (which I do time to time). If you can use the latest version, please use.

Duoquote commented 3 years ago

There was some breaking changes between 1.10.0 and 1.10.2 i guess that's why i left it on that version and the routing was already good for me, updating that caused a lot of headaches so I kept going with that, time to time i will update it for sure but it was urgent to get it working.

reinterpretcat commented 3 years ago

Yeah, I'm still considering a project a bit experimental and when I need some breaking change, I do it. Maybe, the proper solution would be to follow strictly semantic versioning, but I want to keep 1.x and increment a minor version for some significant, but rather logical changes.

Duoquote commented 3 years ago

It's up to your choice I guess but at some point I think minor versions should not break things, anyways good project, I appreciate it :)

reinterpretcat commented 3 years ago

Thanks for feedback!

At the moment, I don't have really information about project users, so I felt a bit free to break compatibility time to time..