summaryrefslogtreecommitdiff
path: root/src/other_tools/just_mr
diff options
context:
space:
mode:
Diffstat (limited to 'src/other_tools/just_mr')
-rw-r--r--src/other_tools/just_mr/main.cpp42
-rw-r--r--src/other_tools/just_mr/utils.hpp31
2 files changed, 30 insertions, 43 deletions
diff --git a/src/other_tools/just_mr/main.cpp b/src/other_tools/just_mr/main.cpp
index 33a09531..56ba4a18 100644
--- a/src/other_tools/just_mr/main.cpp
+++ b/src/other_tools/just_mr/main.cpp
@@ -790,26 +790,28 @@ void DefaultReachableRepositories(
(*resolved_repo_desc)
->Get("ignore_special", Expression::none_t{});
ArchiveRepoInfo archive_info = {
- {
- repo_desc_content->get()->String(), /* content */
- repo_desc_distfile->IsString()
- ? std::make_optional(repo_desc_distfile->String())
- : std::nullopt, /* distfile */
- repo_desc_fetch->get()->String(), /* fetch_url */
- repo_desc_sha256->IsString()
- ? std::make_optional(repo_desc_sha256->String())
- : std::nullopt, /* sha256 */
- repo_desc_sha512->IsString()
- ? std::make_optional(repo_desc_sha512->String())
- : std::nullopt, /* sha512 */
- repo_name, /* origin */
- false /* origin_from_distdir */
- }, /* archive */
- repo_type_str, /* repo_type */
- subdir.empty() ? "." : subdir.string(), /* subdir */
- repo_desc_ignore_special->IsBool()
- ? repo_desc_ignore_special->Bool()
- : false /* ignore_special */};
+ .archive = {.content = repo_desc_content->get()->String(),
+ .distfile =
+ repo_desc_distfile->IsString()
+ ? std::make_optional(
+ repo_desc_distfile->String())
+ : std::nullopt,
+ .fetch_url = repo_desc_fetch->get()->String(),
+ .sha256 = repo_desc_sha256->IsString()
+ ? std::make_optional(
+ repo_desc_sha256->String())
+ : std::nullopt,
+ .sha512 = repo_desc_sha512->IsString()
+ ? std::make_optional(
+ repo_desc_sha512->String())
+ : std::nullopt,
+ .origin = repo_name,
+ .origin_from_distdir = false},
+ .repo_type = repo_type_str,
+ .subdir = subdir.empty() ? "." : subdir.string(),
+ .ignore_special = repo_desc_ignore_special->IsBool()
+ ? repo_desc_ignore_special->Bool()
+ : false};
// add to list
repos_to_fetch.emplace_back(std::move(archive_info));
}
diff --git a/src/other_tools/just_mr/utils.hpp b/src/other_tools/just_mr/utils.hpp
index d992a895..5caf33d0 100644
--- a/src/other_tools/just_mr/utils.hpp
+++ b/src/other_tools/just_mr/utils.hpp
@@ -55,36 +55,21 @@ struct JustSubCmdFlags {
// ordered, so that we have replicability
std::map<std::string, JustSubCmdFlags> const kKnownJustSubcommands{
{"version",
- {false /*config*/,
- false /*build_root*/,
- false /*launch*/,
- false /*defines*/}},
+ {.config = false, .build_root = false, .launch = false, .defines = false}},
{"describe",
- {true /*config*/,
- false /*build_root*/,
- false /*launch*/,
- true /*defines*/}},
+ {.config = true, .build_root = false, .launch = false, .defines = true}},
{"analyse",
- {true /*config*/,
- true /*build_root*/,
- false /*launch*/,
- true /*defines*/}},
+ {.config = true, .build_root = true, .launch = false, .defines = true}},
{"build",
- {true /*config*/, true /*build_root*/, true /*launch*/, true /*defines*/}},
+ {.config = true, .build_root = true, .launch = true, .defines = true}},
{"install",
- {true /*config*/, true /*build_root*/, true /*launch*/, true /*defines*/}},
+ {.config = true, .build_root = true, .launch = true, .defines = true}},
{"rebuild",
- {true /*config*/, true /*build_root*/, true /*launch*/, true /*defines*/}},
+ {.config = true, .build_root = true, .launch = true, .defines = true}},
{"install-cas",
- {false /*config*/,
- true /*build_root*/,
- false /*launch*/,
- false /*defines*/}},
+ {.config = false, .build_root = true, .launch = false, .defines = false}},
{"gc",
- {false /*config*/,
- true /*build_root*/,
- false /*launch*/,
- false /*defines*/}}};
+ {.config = false, .build_root = true, .launch = false, .defines = false}}};
nlohmann::json const kDefaultConfigLocations = nlohmann::json::array(
{{{"root", "workspace"}, {"path", "repos.json"}},