alan-turing-institute / uatk-spc

Synthetic Population Catalyst
https://alan-turing-institute.github.io/uatk-spc/
MIT License
21 stars 12 forks source link

Compile error #25

Closed nickmalleson closed 2 years ago

nickmalleson commented 2 years ago

I'm trying to run spc for police force areas. I've generated some MSOA area lists, like this one:

(base) Mac-Pro:uatk-spc nick$ head config/Cleveland_Police.csv
"E02002488"
"E02002487"
"E02002490"
"E02002483"
"E02002485"
"E02002489"
"E02006909"
"E02002492"
"E02002484"
"E02002493"

But running the command cargo run --release -- config/Cleveland_Police.csv give me the compilation error below. I tried with one of the default config files (berkshire.txt) but same problem. Any ideas? Thanks in advance!

error[E0004]: non-exhaustive patterns: `University` not covered
   --> src/init/quant.rs:38:44
    |
38  |       let (population_csv, prob_sij) = match activity {
    |                                              ^^^^^^^^ pattern `University` not covered
    |
   ::: src/lib.rs:129:1
    |
129 | / pub enum Activity {
130 | |     Retail,
131 | |     PrimarySchool,
132 | |     SecondarySchool,
...   |
135 | |     University,
    | |     ---------- not covered
136 | | }
    | |_- `Activity` defined here
    |
    = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
    = note: the matched value is of type `Activity`

error[E0004]: non-exhaustive patterns: `University` not covered
   --> src/init/quant.rs:67:36
    |
67  |           let pr_visit_venue = match activity {
    |                                      ^^^^^^^^ pattern `University` not covered
    |
   ::: src/lib.rs:129:1
    |
129 | / pub enum Activity {
130 | |     Retail,
131 | |     PrimarySchool,
132 | |     SecondarySchool,
...   |
135 | |     University,
    | |     ---------- not covered
136 | | }
    | |_- `Activity` defined here
    |
    = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
    = note: the matched value is of type `Activity`

error[E0004]: non-exhaustive patterns: `University` not covered
   --> src/init/quant.rs:132:26
    |
132 |       let csv_path = match activity {
    |                            ^^^^^^^^ pattern `University` not covered
    |
   ::: src/lib.rs:129:1
    |
129 | / pub enum Activity {
130 | |     Retail,
131 | |     PrimarySchool,
132 | |     SecondarySchool,
...   |
135 | |     University,
    | |     ---------- not covered
136 | | }
    | |_- `Activity` defined here
    |
    = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
    = note: the matched value is of type `Activity`

error[E0004]: non-exhaustive patterns: `University` not covered
   --> src/protobuf.rs:135:11
    |
135 |       match activity {
    |             ^^^^^^^^ pattern `University` not covered
    |
   ::: src/lib.rs:129:1
    |
129 | / pub enum Activity {
130 | |     Retail,
131 | |     PrimarySchool,
132 | |     SecondarySchool,
...   |
135 | |     University,
    | |     ---------- not covered
136 | | }
    | |_- `Activity` defined here
    |
    = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
    = note: the matched value is of type `Activity`

For more information about this error, try `rustc --explain E0004`.
error: could not compile `spc` due to 4 previous errors
dabreegster commented 2 years ago

Ahh sorry, I had local edits to write some of the docs and somehow managed to commit them. If you do git pull to update and try again, it should work. We have automation on github to make sure things build, but nobody noticed the red X since my error!

nickmalleson commented 2 years ago

Thanks @dabreegster ! It's working now (or at least it has compiled and is now working hard)