| return [path = std::string(path)](auto key, auto&&) { // | return [path = std::string(path)](auto key, auto&&) { // | ||||
| return reject(fmt::format("{}: unknown key '{}'", path, key)); | return reject(fmt::format("{}: unknown key '{}'", path, key)); | ||||
| }; | }; | ||||
| }; | |||||
| } | |||||
| std::vector<dependency> parse_deps_json_v1(const json5::data& deps, std::string_view path) { | std::vector<dependency> parse_deps_json_v1(const json5::data& deps, std::string_view path) { | ||||
| std::vector<dependency> acc_deps; | std::vector<dependency> acc_deps; | ||||
| errc::invalid_catalog_json>("{}: Requires a remote listing (e.g. a 'git' proprety).", | errc::invalid_catalog_json>("{}: Requires a remote listing (e.g. a 'git' proprety).", | ||||
| path); | path); | ||||
| } | } | ||||
| auto rej = std::get_if<semester::dc_reject_t>(&result); | |||||
| if (rej) { | |||||
| throw_user_error<errc::invalid_catalog_json>("{}: {}", path, rej->message); | |||||
| } | |||||
| return ret; | return ret; | ||||
| } | } | ||||