diff --git a/src/build/delta.cc b/src/build/delta.cc index a3d425cb..63a72222 100644 --- a/src/build/delta.cc +++ b/src/build/delta.cc @@ -560,8 +560,7 @@ auto delta(const BuildPhase phase, const BuildPlan::Type build_type, } TargetMap targets; - targets.reserve(schemas.size() * PER_SCHEMA_RULES.size() + - AGGREGATE_RULES.size()); + targets.reserve(schemas.size() * PER_SCHEMA_RULES.size()); const auto &output_string{output.native()}; const auto configuration_string{configuration_path.string()}; const auto explorer_string{explorer_path.string()}; @@ -837,42 +836,6 @@ auto delta(const BuildPhase phase, const BuildPlan::Type build_type, } } - for (std::size_t index{0}; index < AGGREGATE_RULES.size(); index++) { - const auto &rule{AGGREGATE_RULES[index]}; - - std::vector all_collected; - all_collected.reserve(active_schemas.size()); - for (const auto &schema : active_schemas) { - const auto &base{rule.collector_base == TargetBase::Schema - ? schema.schema_base - : schema.explorer_base}; - all_collected.push_back(append_filename(base, rule.collector_filename)); - } - - std::string destination; - if (rule.output_base == AggregateOutputBase::Explorer) { - destination.reserve( - explorer_string.size() + 4 + - std::char_traits::length(rule.output_filename)); - destination += explorer_string; - destination += '/'; - destination += SENTINEL; - destination += '/'; - destination += rule.output_filename; - } else { - destination.reserve( - output_string.size() + 1 + - std::char_traits::length(rule.output_filename)); - destination += output_string; - destination += '/'; - destination += rule.output_filename; - } - - declare_target(targets, rule.action, destination, - std::move(all_collected)); - dirty_set.insert(std::move(destination)); - } - auto has_graph_change{!removed_uris.empty()}; if (!has_graph_change) { for (const auto &schema : active_schemas) { @@ -918,6 +881,8 @@ auto delta(const BuildPhase phase, const BuildPlan::Type build_type, const auto affected_dirs{ collect_affected_directories(schemas_path, affected_relative_paths)}; + const auto all_dirs{ + collect_affected_directories(schemas_path, all_relative_paths)}; for (const auto &rule : DIRECTORY_RULES) { if (rule.gate == TargetGate::FullOnly && @@ -978,12 +943,26 @@ auto delta(const BuildPhase phase, const BuildPlan::Type build_type, if (other_parent == relative) { rule_dependencies.push_back( (explorer_path / other_relative / SENTINEL / - DIRECTORY_RULES[0].filename) + DIRECTORY_LIST_RULE.filename) .lexically_normal() .string()); } } break; + case DirectoryDependencyKind::AllDirectoryListings: + for (const auto &any_directory : all_dirs) { + const auto dir_relative{ + std::filesystem::relative(any_directory, schemas_path)}; + rule_dependencies.push_back( + (dir_relative == "." + ? explorer_path / SENTINEL / + DIRECTORY_LIST_RULE.filename + : explorer_path / dir_relative / SENTINEL / + DIRECTORY_LIST_RULE.filename) + .lexically_normal() + .string()); + } + break; case DirectoryDependencyKind::SameDirectoryTarget: rule_dependencies.push_back( (explorer_path / relative / SENTINEL / dependency.filename) @@ -1122,14 +1101,6 @@ auto delta(const BuildPhase phase, const BuildPlan::Type build_type, const auto output_prefix{output_string + "/"}; std::unordered_set global_skip_paths; - for (const auto &rule : AGGREGATE_RULES) { - if (rule.output_base == AggregateOutputBase::Explorer) { - global_skip_paths.insert(explorer_string + '/' + SENTINEL + '/' + - rule.output_filename); - } else { - global_skip_paths.insert(output_string + '/' + rule.output_filename); - } - } for (const auto &rule : GLOBAL_RULES) { global_skip_paths.insert(output_string + '/' + rule.filename); } diff --git a/src/build/rules.h b/src/build/rules.h index fc3c4e33..8089f4b0 100644 --- a/src/build/rules.h +++ b/src/build/rules.h @@ -190,29 +190,12 @@ static constexpr std::array PER_SCHEMA_RULES{{ .dependency_count = 2}, }}; -enum class AggregateOutputBase : std::uint8_t { Output, Explorer }; - -struct AggregateRule { - BuildPlan::Action::Type action; - const char *output_filename; - AggregateOutputBase output_base; - TargetBase collector_base; - const char *collector_filename; -}; - -static constexpr std::array AGGREGATE_RULES{{ - {.action = BuildPlan::Action::Type::SearchIndex, - .output_filename = "search.metapack", - .output_base = AggregateOutputBase::Explorer, - .collector_base = TargetBase::Explorer, - .collector_filename = "schema.metapack"}, -}}; - enum class DirectoryScope : std::uint8_t { AllDirectories, NonRoot, RootOnly }; enum class DirectoryDependencyKind : std::uint8_t { SchemaMetadata, ChildDirectories, + AllDirectoryListings, SameDirectoryTarget, ExternalConfig }; @@ -234,7 +217,7 @@ struct DirectoryRule { std::uint8_t dependency_count; }; -static constexpr std::array DIRECTORY_RULES{{ +static constexpr std::array DIRECTORY_RULES{{ {.action = BuildPlan::Action::Type::DirectoryList, .filename = "directory.metapack", .gate = TargetGate::Always, @@ -246,6 +229,15 @@ static constexpr std::array DIRECTORY_RULES{{ .filename = nullptr}}}, .dependency_count = 2}, + {.action = BuildPlan::Action::Type::SearchIndex, + .filename = "search.metapack", + .gate = TargetGate::Always, + .scope = DirectoryScope::RootOnly, + .only_full_rebuild = false, + .dependencies = {{{.kind = DirectoryDependencyKind::AllDirectoryListings, + .filename = nullptr}}}, + .dependency_count = 1}, + {.action = BuildPlan::Action::Type::WebIndex, .filename = "directory-html.metapack", .gate = TargetGate::FullOnly, @@ -345,6 +337,21 @@ static constexpr auto find_rule_by_action(BuildPlan::Action::Type action) static constexpr const auto &SCHEMA_METADATA_RULE = find_rule_by_action(BuildPlan::Action::Type::SchemaMetadata); +static constexpr auto +find_directory_rule_by_action(BuildPlan::Action::Type action) + -> const DirectoryRule & { + for (const auto &rule : DIRECTORY_RULES) { + if (rule.action == action) { + return rule; + } + } + + return DIRECTORY_RULES[0]; +} + +static constexpr const auto &DIRECTORY_LIST_RULE = + find_directory_rule_by_action(BuildPlan::Action::Type::DirectoryList); + } // namespace sourcemeta::one #endif diff --git a/src/index/explorer.h b/src/index/explorer.h index f6d583e2..e516c764 100644 --- a/src/index/explorer.h +++ b/src/index/explorer.h @@ -419,35 +419,32 @@ struct GENERATE_EXPLORER_SEARCH_INDEX { const sourcemeta::core::JSON &) -> bool { const auto timestamp_start{std::chrono::steady_clock::now()}; std::vector result; - result.reserve(action.dependencies.size()); for (const auto &dependency : action.dependencies) { - sourcemeta::core::FileView dependency_view{dependency}; - const auto extension_offset{ - sourcemeta::one::metapack_extension_offset(dependency_view)}; - if (extension_offset == 0) { - continue; - } + const auto directory_option{ + sourcemeta::one::metapack_read_json(dependency)}; + assert(directory_option.has_value()); + const auto &directory{directory_option.value()}; + assert(directory.is_object()); + assert(directory.defines("entries")); + + for (const auto &directory_entry : directory.at("entries").as_array()) { + if (!directory_entry.defines("type") || + directory_entry.at("type").to_string() != "schema") { + continue; + } - const auto *extension{ - sourcemeta::one::metapack_extension( - dependency_view)}; - if (extension == nullptr) { - continue; + auto entry{sourcemeta::core::JSON::make_array()}; + entry.push_back( + sourcemeta::core::JSON{directory_entry.at("path").to_string()}); + entry.push_back(directory_entry.defines("title") + ? directory_entry.at("title") + : sourcemeta::core::JSON{""}); + entry.push_back(directory_entry.defines("description") + ? directory_entry.at("description") + : sourcemeta::core::JSON{""}); + result.push_back(std::move(entry)); } - - const auto *extension_base{ - dependency_view.as(extension_offset)}; - const auto path{explorer_extension_path(extension, extension_base)}; - const auto title{explorer_extension_title(extension, extension_base)}; - const auto description{ - explorer_extension_description(extension, extension_base)}; - - auto entry{sourcemeta::core::JSON::make_array()}; - entry.push_back(sourcemeta::core::JSON{std::string{path}}); - entry.push_back(sourcemeta::core::JSON{std::string{title}}); - entry.push_back(sourcemeta::core::JSON{std::string{description}}); - result.push_back(std::move(entry)); } std::sort(result.begin(), result.end(), diff --git a/test/cli/CMakeLists.txt b/test/cli/CMakeLists.txt index b3c9cb32..3b8d1a37 100644 --- a/test/cli/CMakeLists.txt +++ b/test/cli/CMakeLists.txt @@ -35,6 +35,7 @@ if(ONE_INDEX) sourcemeta_one_test_cli(common index rebuild-cache-config-change) sourcemeta_one_test_cli(common index rebuild-deleted-deps) sourcemeta_one_test_cli(common index rebuild-nested-directories) + sourcemeta_one_test_cli(common index search-index-nested-rebuild) sourcemeta_one_test_cli(common index rebuild-to-empty) sourcemeta_one_test_cli(common index verbose-long) sourcemeta_one_test_cli(common index verbose-short) diff --git a/test/cli/index/common/comment-removed-on-rebuild.sh b/test/cli/index/common/comment-removed-on-rebuild.sh index 559460fb..c199e2a6 100755 --- a/test/cli/index/common/comment-removed-on-rebuild.sh +++ b/test/cli/index/common/comment-removed-on-rebuild.sh @@ -35,8 +35,8 @@ Using configuration: $(realpath "$TMP")/one.json ( 37%) Producing: version.json ( 50%) Producing: explorer/%/404.metapack ( 62%) Producing: explorer/%/directory.metapack -( 75%) Producing: explorer/%/search.metapack -( 87%) Producing: explorer/%/directory-html.metapack +( 75%) Producing: explorer/%/directory-html.metapack +( 87%) Producing: explorer/%/search.metapack (100%) Producing: routes.bin EOF diff --git a/test/cli/index/common/comment-updated-on-rebuild.sh b/test/cli/index/common/comment-updated-on-rebuild.sh index 4fe571b5..a98e7e99 100755 --- a/test/cli/index/common/comment-updated-on-rebuild.sh +++ b/test/cli/index/common/comment-updated-on-rebuild.sh @@ -35,8 +35,8 @@ Using configuration: $(realpath "$TMP")/one.json ( 37%) Producing: version.json ( 50%) Producing: explorer/%/404.metapack ( 62%) Producing: explorer/%/directory.metapack -( 75%) Producing: explorer/%/search.metapack -( 87%) Producing: explorer/%/directory-html.metapack +( 75%) Producing: explorer/%/directory-html.metapack +( 87%) Producing: explorer/%/search.metapack (100%) Producing: routes.bin EOF diff --git a/test/cli/index/common/dependents-remove-referencing-schema.sh b/test/cli/index/common/dependents-remove-referencing-schema.sh index ec0a1390..8dbda025 100755 --- a/test/cli/index/common/dependents-remove-referencing-schema.sh +++ b/test/cli/index/common/dependents-remove-referencing-schema.sh @@ -71,8 +71,8 @@ Writing output to: $(realpath "$TMP")/output Using configuration: $(realpath "$TMP")/one.json Detecting: $(realpath "$TMP")/schemas/a.json (#1) ( 20%) Producing: explorer/%/directory.metapack -( 40%) Producing: explorer/%/search.metapack -( 60%) Producing: explorer/%/directory-html.metapack +( 40%) Producing: explorer/%/directory-html.metapack +( 60%) Producing: explorer/%/search.metapack ( 80%) Disposing: explorer/example/schemas/b (100%) Disposing: schemas/example/schemas/b (100%) Combining: schemas/example/schemas/a/%/dependents.metapack diff --git a/test/cli/index/common/extra-files-on-rebuild.sh b/test/cli/index/common/extra-files-on-rebuild.sh index 52df0436..d4db9e02 100755 --- a/test/cli/index/common/extra-files-on-rebuild.sh +++ b/test/cli/index/common/extra-files-on-rebuild.sh @@ -63,14 +63,14 @@ Detecting: $(realpath "$TMP")/schemas/test.json (#1) ( 52%) Producing: schemas/example/schemas/old/%/blaze-exhaustive.metapack ( 56%) Producing: schemas/example/schemas/old/%/blaze-fast.metapack ( 60%) Producing: schemas/example/schemas/old/%/editor.metapack -( 65%) Producing: explorer/%/search.metapack -( 69%) Producing: explorer/example/schemas/%/directory.metapack -( 73%) Producing: explorer/example/schemas/old/%/schema-html.metapack -( 78%) Producing: explorer/example/%/directory.metapack -( 82%) Producing: explorer/example/schemas/%/directory-html.metapack -( 86%) Producing: explorer/%/directory.metapack -( 91%) Producing: explorer/example/%/directory-html.metapack -( 95%) Producing: explorer/%/directory-html.metapack +( 65%) Producing: explorer/example/schemas/%/directory.metapack +( 69%) Producing: explorer/example/schemas/old/%/schema-html.metapack +( 73%) Producing: explorer/example/%/directory.metapack +( 78%) Producing: explorer/example/schemas/%/directory-html.metapack +( 82%) Producing: explorer/%/directory.metapack +( 86%) Producing: explorer/example/%/directory-html.metapack +( 91%) Producing: explorer/%/directory-html.metapack +( 95%) Producing: explorer/%/search.metapack (100%) Producing: routes.bin (100%) Combining: schemas/example/schemas/old/%/dependents.metapack EOF @@ -116,14 +116,14 @@ Detecting: $(realpath "$TMP")/schemas/test.json (#1) ( 42%) Producing: schemas/example/schemas/new/%/blaze-exhaustive.metapack ( 47%) Producing: schemas/example/schemas/new/%/blaze-fast.metapack ( 52%) Producing: schemas/example/schemas/new/%/editor.metapack -( 57%) Producing: explorer/%/search.metapack -( 61%) Producing: explorer/example/schemas/%/directory.metapack -( 66%) Producing: explorer/example/schemas/new/%/schema-html.metapack -( 71%) Producing: explorer/example/%/directory.metapack -( 76%) Producing: explorer/example/schemas/%/directory-html.metapack -( 80%) Producing: explorer/%/directory.metapack -( 85%) Producing: explorer/example/%/directory-html.metapack -( 90%) Producing: explorer/%/directory-html.metapack +( 57%) Producing: explorer/example/schemas/%/directory.metapack +( 61%) Producing: explorer/example/schemas/new/%/schema-html.metapack +( 66%) Producing: explorer/example/%/directory.metapack +( 71%) Producing: explorer/example/schemas/%/directory-html.metapack +( 76%) Producing: explorer/%/directory.metapack +( 80%) Producing: explorer/example/%/directory-html.metapack +( 85%) Producing: explorer/%/directory-html.metapack +( 90%) Producing: explorer/%/search.metapack ( 95%) Disposing: explorer/example/schemas/old (100%) Disposing: schemas/example/schemas/old (100%) Combining: schemas/example/schemas/new/%/dependents.metapack diff --git a/test/cli/index/common/rebuild-cache-config-change.sh b/test/cli/index/common/rebuild-cache-config-change.sh index bc643813..90df194b 100755 --- a/test/cli/index/common/rebuild-cache-config-change.sh +++ b/test/cli/index/common/rebuild-cache-config-change.sh @@ -93,14 +93,14 @@ Detecting: $(realpath "$TMP")/schemas/foo.json (#1) ( 52%) Producing: schemas/example/schemas/foo/%/blaze-exhaustive.metapack ( 56%) Producing: schemas/example/schemas/foo/%/blaze-fast.metapack ( 60%) Producing: schemas/example/schemas/foo/%/editor.metapack -( 65%) Producing: explorer/%/search.metapack -( 69%) Producing: explorer/example/schemas/%/directory.metapack -( 73%) Producing: explorer/example/schemas/foo/%/schema-html.metapack -( 78%) Producing: explorer/example/%/directory.metapack -( 82%) Producing: explorer/example/schemas/%/directory-html.metapack -( 86%) Producing: explorer/%/directory.metapack -( 91%) Producing: explorer/example/%/directory-html.metapack -( 95%) Producing: explorer/%/directory-html.metapack +( 65%) Producing: explorer/example/schemas/%/directory.metapack +( 69%) Producing: explorer/example/schemas/foo/%/schema-html.metapack +( 73%) Producing: explorer/example/%/directory.metapack +( 78%) Producing: explorer/example/schemas/%/directory-html.metapack +( 82%) Producing: explorer/%/directory.metapack +( 86%) Producing: explorer/example/%/directory-html.metapack +( 91%) Producing: explorer/%/directory-html.metapack +( 95%) Producing: explorer/%/search.metapack (100%) Producing: routes.bin EOF diff "$TMP/output.txt" "$TMP/expected.txt" diff --git a/test/cli/index/common/rebuild-cache.sh b/test/cli/index/common/rebuild-cache.sh index de3fdafb..12bdaac5 100755 --- a/test/cli/index/common/rebuild-cache.sh +++ b/test/cli/index/common/rebuild-cache.sh @@ -62,14 +62,14 @@ Detecting: $(realpath "$TMP")/schemas/foo.json (#1) ( 52%) Producing: schemas/example/schemas/foo/%/blaze-exhaustive.metapack ( 56%) Producing: schemas/example/schemas/foo/%/blaze-fast.metapack ( 60%) Producing: schemas/example/schemas/foo/%/editor.metapack -( 65%) Producing: explorer/%/search.metapack -( 69%) Producing: explorer/example/schemas/%/directory.metapack -( 73%) Producing: explorer/example/schemas/foo/%/schema-html.metapack -( 78%) Producing: explorer/example/%/directory.metapack -( 82%) Producing: explorer/example/schemas/%/directory-html.metapack -( 86%) Producing: explorer/%/directory.metapack -( 91%) Producing: explorer/example/%/directory-html.metapack -( 95%) Producing: explorer/%/directory-html.metapack +( 65%) Producing: explorer/example/schemas/%/directory.metapack +( 69%) Producing: explorer/example/schemas/foo/%/schema-html.metapack +( 73%) Producing: explorer/example/%/directory.metapack +( 78%) Producing: explorer/example/schemas/%/directory-html.metapack +( 82%) Producing: explorer/%/directory.metapack +( 86%) Producing: explorer/example/%/directory-html.metapack +( 91%) Producing: explorer/%/directory-html.metapack +( 95%) Producing: explorer/%/search.metapack (100%) Producing: routes.bin (100%) Combining: schemas/example/schemas/foo/%/dependents.metapack EOF @@ -112,14 +112,14 @@ Detecting: $(realpath "$TMP")/schemas/foo.json (#1) ( 47%) Producing: schemas/example/schemas/foo/%/blaze-exhaustive.metapack ( 52%) Producing: schemas/example/schemas/foo/%/blaze-fast.metapack ( 57%) Producing: schemas/example/schemas/foo/%/editor.metapack -( 63%) Producing: explorer/%/search.metapack -( 68%) Producing: explorer/example/schemas/%/directory.metapack -( 73%) Producing: explorer/example/schemas/foo/%/schema-html.metapack -( 78%) Producing: explorer/example/%/directory.metapack -( 84%) Producing: explorer/example/schemas/%/directory-html.metapack -( 89%) Producing: explorer/%/directory.metapack -( 94%) Producing: explorer/example/%/directory-html.metapack -(100%) Producing: explorer/%/directory-html.metapack +( 63%) Producing: explorer/example/schemas/%/directory.metapack +( 68%) Producing: explorer/example/schemas/foo/%/schema-html.metapack +( 73%) Producing: explorer/example/%/directory.metapack +( 78%) Producing: explorer/example/schemas/%/directory-html.metapack +( 84%) Producing: explorer/%/directory.metapack +( 89%) Producing: explorer/example/%/directory-html.metapack +( 94%) Producing: explorer/%/directory-html.metapack +(100%) Producing: explorer/%/search.metapack EOF diff "$TMP/output.txt" "$TMP/expected.txt" diff --git a/test/cli/index/common/rebuild-deleted-deps.sh b/test/cli/index/common/rebuild-deleted-deps.sh index 0a5cfa07..bc4e3861 100755 --- a/test/cli/index/common/rebuild-deleted-deps.sh +++ b/test/cli/index/common/rebuild-deleted-deps.sh @@ -69,14 +69,14 @@ Detecting: $(realpath "$TMP")/schemas/a.json (#1) ( 52%) Producing: schemas/example/schemas/a/%/blaze-exhaustive.metapack ( 56%) Producing: schemas/example/schemas/a/%/blaze-fast.metapack ( 60%) Producing: schemas/example/schemas/a/%/editor.metapack -( 65%) Producing: explorer/%/search.metapack -( 69%) Producing: explorer/example/schemas/%/directory.metapack -( 73%) Producing: explorer/example/schemas/a/%/schema-html.metapack -( 78%) Producing: explorer/example/%/directory.metapack -( 82%) Producing: explorer/example/schemas/%/directory-html.metapack -( 86%) Producing: explorer/%/directory.metapack -( 91%) Producing: explorer/example/%/directory-html.metapack -( 95%) Producing: explorer/%/directory-html.metapack +( 65%) Producing: explorer/example/schemas/%/directory.metapack +( 69%) Producing: explorer/example/schemas/a/%/schema-html.metapack +( 73%) Producing: explorer/example/%/directory.metapack +( 78%) Producing: explorer/example/schemas/%/directory-html.metapack +( 82%) Producing: explorer/%/directory.metapack +( 86%) Producing: explorer/example/%/directory-html.metapack +( 91%) Producing: explorer/%/directory-html.metapack +( 95%) Producing: explorer/%/search.metapack (100%) Producing: routes.bin (100%) Combining: schemas/example/schemas/a/%/dependents.metapack EOF diff --git a/test/cli/index/common/rebuild-nested-directories.sh b/test/cli/index/common/rebuild-nested-directories.sh index dc184abe..b4e51e49 100755 --- a/test/cli/index/common/rebuild-nested-directories.sh +++ b/test/cli/index/common/rebuild-nested-directories.sh @@ -110,14 +110,14 @@ cat << 'EOF' > "$TMP/expected.txt" ( 47%) Producing: schemas/left/left-a/s5/%/blaze-exhaustive.metapack ( 52%) Producing: schemas/left/left-a/s5/%/blaze-fast.metapack ( 57%) Producing: schemas/left/left-a/s5/%/editor.metapack -( 63%) Producing: explorer/%/search.metapack -( 68%) Producing: explorer/left/left-a/%/directory.metapack -( 73%) Producing: explorer/left/left-a/s5/%/schema-html.metapack -( 78%) Producing: explorer/left/%/directory.metapack -( 84%) Producing: explorer/left/left-a/%/directory-html.metapack -( 89%) Producing: explorer/%/directory.metapack -( 94%) Producing: explorer/left/%/directory-html.metapack -(100%) Producing: explorer/%/directory-html.metapack +( 63%) Producing: explorer/left/left-a/%/directory.metapack +( 68%) Producing: explorer/left/left-a/s5/%/schema-html.metapack +( 73%) Producing: explorer/left/%/directory.metapack +( 78%) Producing: explorer/left/left-a/%/directory-html.metapack +( 84%) Producing: explorer/%/directory.metapack +( 89%) Producing: explorer/left/%/directory-html.metapack +( 94%) Producing: explorer/%/directory-html.metapack +(100%) Producing: explorer/%/search.metapack (100%) Combining: schemas/left/left-a/s5/%/dependents.metapack EOF diff --git a/test/cli/index/common/rebuild-one-to-zero.sh b/test/cli/index/common/rebuild-one-to-zero.sh index 753166c3..6fef5b10 100755 --- a/test/cli/index/common/rebuild-one-to-zero.sh +++ b/test/cli/index/common/rebuild-one-to-zero.sh @@ -60,12 +60,12 @@ Detecting: $(realpath "$TMP")/schemas/test.json (#1) ( 57%) Producing: schemas/schemas/test/%/blaze-exhaustive.metapack ( 61%) Producing: schemas/schemas/test/%/blaze-fast.metapack ( 66%) Producing: schemas/schemas/test/%/editor.metapack -( 71%) Producing: explorer/%/search.metapack -( 76%) Producing: explorer/schemas/%/directory.metapack -( 80%) Producing: explorer/schemas/test/%/schema-html.metapack -( 85%) Producing: explorer/%/directory.metapack -( 90%) Producing: explorer/schemas/%/directory-html.metapack -( 95%) Producing: explorer/%/directory-html.metapack +( 71%) Producing: explorer/schemas/%/directory.metapack +( 76%) Producing: explorer/schemas/test/%/schema-html.metapack +( 80%) Producing: explorer/%/directory.metapack +( 85%) Producing: explorer/schemas/%/directory-html.metapack +( 90%) Producing: explorer/%/directory-html.metapack +( 95%) Producing: explorer/%/search.metapack (100%) Producing: routes.bin (100%) Combining: schemas/schemas/test/%/dependents.metapack EOF @@ -122,8 +122,8 @@ cat << EOF > "$TMP/expected.txt" Writing output to: $(realpath "$TMP")/output Using configuration: $(realpath "$TMP")/one.json ( 20%) Producing: explorer/%/directory.metapack -( 40%) Producing: explorer/%/search.metapack -( 60%) Producing: explorer/%/directory-html.metapack +( 40%) Producing: explorer/%/directory-html.metapack +( 60%) Producing: explorer/%/search.metapack ( 80%) Disposing: explorer/schemas (100%) Disposing: schemas EOF diff --git a/test/cli/index/common/rebuild-two-to-three-with-ref.sh b/test/cli/index/common/rebuild-two-to-three-with-ref.sh index 4521f12f..fb18fd47 100755 --- a/test/cli/index/common/rebuild-two-to-three-with-ref.sh +++ b/test/cli/index/common/rebuild-two-to-three-with-ref.sh @@ -78,14 +78,14 @@ cat << 'EOF' > "$TMP/expected.txt" ( 47%) Producing: schemas/example/schemas/c/%/blaze-exhaustive.metapack ( 52%) Producing: schemas/example/schemas/c/%/blaze-fast.metapack ( 57%) Producing: schemas/example/schemas/c/%/editor.metapack -( 63%) Producing: explorer/%/search.metapack -( 68%) Producing: explorer/example/schemas/%/directory.metapack -( 73%) Producing: explorer/example/schemas/c/%/schema-html.metapack -( 78%) Producing: explorer/example/%/directory.metapack -( 84%) Producing: explorer/example/schemas/%/directory-html.metapack -( 89%) Producing: explorer/%/directory.metapack -( 94%) Producing: explorer/example/%/directory-html.metapack -(100%) Producing: explorer/%/directory-html.metapack +( 63%) Producing: explorer/example/schemas/%/directory.metapack +( 68%) Producing: explorer/example/schemas/c/%/schema-html.metapack +( 73%) Producing: explorer/example/%/directory.metapack +( 78%) Producing: explorer/example/schemas/%/directory-html.metapack +( 84%) Producing: explorer/%/directory.metapack +( 89%) Producing: explorer/example/%/directory-html.metapack +( 94%) Producing: explorer/%/directory-html.metapack +(100%) Producing: explorer/%/search.metapack ( 50%) Combining: schemas/example/schemas/a/%/dependents.metapack (100%) Combining: schemas/example/schemas/c/%/dependents.metapack EOF diff --git a/test/cli/index/common/rebuild-two-to-three.sh b/test/cli/index/common/rebuild-two-to-three.sh index acc3846e..c8976db7 100755 --- a/test/cli/index/common/rebuild-two-to-three.sh +++ b/test/cli/index/common/rebuild-two-to-three.sh @@ -75,14 +75,14 @@ cat << 'EOF' > "$TMP/expected.txt" ( 47%) Producing: schemas/example/schemas/c/%/blaze-exhaustive.metapack ( 52%) Producing: schemas/example/schemas/c/%/blaze-fast.metapack ( 57%) Producing: schemas/example/schemas/c/%/editor.metapack -( 63%) Producing: explorer/%/search.metapack -( 68%) Producing: explorer/example/schemas/%/directory.metapack -( 73%) Producing: explorer/example/schemas/c/%/schema-html.metapack -( 78%) Producing: explorer/example/%/directory.metapack -( 84%) Producing: explorer/example/schemas/%/directory-html.metapack -( 89%) Producing: explorer/%/directory.metapack -( 94%) Producing: explorer/example/%/directory-html.metapack -(100%) Producing: explorer/%/directory-html.metapack +( 63%) Producing: explorer/example/schemas/%/directory.metapack +( 68%) Producing: explorer/example/schemas/c/%/schema-html.metapack +( 73%) Producing: explorer/example/%/directory.metapack +( 78%) Producing: explorer/example/schemas/%/directory-html.metapack +( 84%) Producing: explorer/%/directory.metapack +( 89%) Producing: explorer/example/%/directory-html.metapack +( 94%) Producing: explorer/%/directory-html.metapack +(100%) Producing: explorer/%/search.metapack (100%) Combining: schemas/example/schemas/c/%/dependents.metapack EOF diff --git a/test/cli/index/common/rebuild-zero-to-one.sh b/test/cli/index/common/rebuild-zero-to-one.sh index d51f1bd2..1e7d03d0 100755 --- a/test/cli/index/common/rebuild-zero-to-one.sh +++ b/test/cli/index/common/rebuild-zero-to-one.sh @@ -40,8 +40,8 @@ Using configuration: $(realpath "$TMP")/one.json ( 28%) Producing: version.json ( 42%) Producing: explorer/%/404.metapack ( 57%) Producing: explorer/%/directory.metapack -( 71%) Producing: explorer/%/search.metapack -( 85%) Producing: explorer/%/directory-html.metapack +( 71%) Producing: explorer/%/directory-html.metapack +( 85%) Producing: explorer/%/search.metapack (100%) Producing: routes.bin EOF diff "$TMP/output.txt" "$TMP/expected.txt" @@ -93,12 +93,12 @@ Detecting: $(realpath "$TMP")/schemas/test.json (#1) ( 52%) Producing: schemas/schemas/test/%/blaze-exhaustive.metapack ( 58%) Producing: schemas/schemas/test/%/blaze-fast.metapack ( 64%) Producing: schemas/schemas/test/%/editor.metapack -( 70%) Producing: explorer/%/search.metapack -( 76%) Producing: explorer/schemas/%/directory.metapack -( 82%) Producing: explorer/schemas/test/%/schema-html.metapack -( 88%) Producing: explorer/%/directory.metapack -( 94%) Producing: explorer/schemas/%/directory-html.metapack -(100%) Producing: explorer/%/directory-html.metapack +( 70%) Producing: explorer/schemas/%/directory.metapack +( 76%) Producing: explorer/schemas/test/%/schema-html.metapack +( 82%) Producing: explorer/%/directory.metapack +( 88%) Producing: explorer/schemas/%/directory-html.metapack +( 94%) Producing: explorer/%/directory-html.metapack +(100%) Producing: explorer/%/search.metapack (100%) Combining: schemas/schemas/test/%/dependents.metapack EOF diff "$TMP/output.txt" "$TMP/expected.txt" diff --git a/test/cli/index/common/search-index-nested-rebuild.sh b/test/cli/index/common/search-index-nested-rebuild.sh new file mode 100755 index 00000000..8c795458 --- /dev/null +++ b/test/cli/index/common/search-index-nested-rebuild.sh @@ -0,0 +1,104 @@ +#!/bin/sh + +# When modifying a schema in one directory of a nested layout, the search +# index must still contain schemas from ALL directories, not just the +# affected one. + +set -o errexit +set -o nounset + +TMP="$(mktemp -d)" +clean() { rm -rf "$TMP"; } +trap clean EXIT + +cat << EOF > "$TMP/one.json" +{ + "url": "https://sourcemeta.com/", + "contents": { + "left": { + "contents": { + "schemas": { + "baseUri": "https://example.com/left/", + "path": "./schemas-left" + } + } + }, + "right": { + "contents": { + "schemas": { + "baseUri": "https://example.com/right/", + "path": "./schemas-right" + } + } + } + } +} +EOF + +mkdir "$TMP/schemas-left" "$TMP/schemas-right" + +cat << 'EOF' > "$TMP/schemas-left/a.json" +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "https://example.com/left/a" +} +EOF + +cat << 'EOF' > "$TMP/schemas-right/b.json" +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "https://example.com/right/b" +} +EOF + +SEARCH="$TMP/output/explorer/%/search.metapack" + +extract_search_entries() { + strings "$1" | grep '^\[' | LC_ALL=C sort +} + +# Run 1: full build with two schemas in separate directories +"$1" --skip-banner "$TMP/one.json" "$TMP/output" --concurrency 1 > /dev/null 2>&1 + +extract_search_entries "$SEARCH" > "$TMP/search_actual.txt" +cat << 'EOF' > "$TMP/search_expected.txt" +["/left/schemas/a","",""] +["/right/schemas/b","",""] +EOF +diff "$TMP/search_actual.txt" "$TMP/search_expected.txt" + +# Run 2: modify only the left schema +cat << 'EOF' > "$TMP/schemas-left/a.json" +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "https://example.com/left/a", + "type": "string" +} +EOF + +"$1" --skip-banner "$TMP/one.json" "$TMP/output" --concurrency 1 > /dev/null 2>&1 + +extract_search_entries "$SEARCH" > "$TMP/search_actual.txt" +cat << 'EOF' > "$TMP/search_expected.txt" +["/left/schemas/a","",""] +["/right/schemas/b","",""] +EOF +diff "$TMP/search_actual.txt" "$TMP/search_expected.txt" + +# Run 3: add a third schema to the right directory +cat << 'EOF' > "$TMP/schemas-right/c.json" +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "https://example.com/right/c" +} +EOF + +"$1" --skip-banner "$TMP/one.json" "$TMP/output" --concurrency 1 > /dev/null 2>&1 + +extract_search_entries "$SEARCH" > "$TMP/search_actual.txt" +cat << 'EOF' > "$TMP/search_expected.txt" +["/left/schemas/a","",""] +["/right/schemas/b","",""] +["/right/schemas/c","",""] +EOF +diff "$TMP/search_actual.txt" "$TMP/search_expected.txt" diff --git a/test/cli/index/common/verbose-long.sh b/test/cli/index/common/verbose-long.sh index c7d42ec9..1093622f 100755 --- a/test/cli/index/common/verbose-long.sh +++ b/test/cli/index/common/verbose-long.sh @@ -63,14 +63,14 @@ https://example.com/foo => https://sourcemeta.com/example/schemas/foo ( 52%) Producing: schemas/example/schemas/foo/%/blaze-exhaustive.metapack ( 56%) Producing: schemas/example/schemas/foo/%/blaze-fast.metapack ( 60%) Producing: schemas/example/schemas/foo/%/editor.metapack -( 65%) Producing: explorer/%/search.metapack -( 69%) Producing: explorer/example/schemas/%/directory.metapack -( 73%) Producing: explorer/example/schemas/foo/%/schema-html.metapack -( 78%) Producing: explorer/example/%/directory.metapack -( 82%) Producing: explorer/example/schemas/%/directory-html.metapack -( 86%) Producing: explorer/%/directory.metapack -( 91%) Producing: explorer/example/%/directory-html.metapack -( 95%) Producing: explorer/%/directory-html.metapack +( 65%) Producing: explorer/example/schemas/%/directory.metapack +( 69%) Producing: explorer/example/schemas/foo/%/schema-html.metapack +( 73%) Producing: explorer/example/%/directory.metapack +( 78%) Producing: explorer/example/schemas/%/directory-html.metapack +( 82%) Producing: explorer/%/directory.metapack +( 86%) Producing: explorer/example/%/directory-html.metapack +( 91%) Producing: explorer/%/directory-html.metapack +( 95%) Producing: explorer/%/search.metapack (100%) Producing: routes.bin (100%) Combining: schemas/example/schemas/foo/%/dependents.metapack EOF diff --git a/test/cli/index/common/verbose-short.sh b/test/cli/index/common/verbose-short.sh index f3fad1d7..f70bbf73 100755 --- a/test/cli/index/common/verbose-short.sh +++ b/test/cli/index/common/verbose-short.sh @@ -63,14 +63,14 @@ https://example.com/foo => https://sourcemeta.com/example/schemas/foo ( 52%) Producing: schemas/example/schemas/foo/%/blaze-exhaustive.metapack ( 56%) Producing: schemas/example/schemas/foo/%/blaze-fast.metapack ( 60%) Producing: schemas/example/schemas/foo/%/editor.metapack -( 65%) Producing: explorer/%/search.metapack -( 69%) Producing: explorer/example/schemas/%/directory.metapack -( 73%) Producing: explorer/example/schemas/foo/%/schema-html.metapack -( 78%) Producing: explorer/example/%/directory.metapack -( 82%) Producing: explorer/example/schemas/%/directory-html.metapack -( 86%) Producing: explorer/%/directory.metapack -( 91%) Producing: explorer/example/%/directory-html.metapack -( 95%) Producing: explorer/%/directory-html.metapack +( 65%) Producing: explorer/example/schemas/%/directory.metapack +( 69%) Producing: explorer/example/schemas/foo/%/schema-html.metapack +( 73%) Producing: explorer/example/%/directory.metapack +( 78%) Producing: explorer/example/schemas/%/directory-html.metapack +( 82%) Producing: explorer/%/directory.metapack +( 86%) Producing: explorer/example/%/directory-html.metapack +( 91%) Producing: explorer/%/directory-html.metapack +( 95%) Producing: explorer/%/search.metapack (100%) Producing: routes.bin (100%) Combining: schemas/example/schemas/foo/%/dependents.metapack EOF diff --git a/test/unit/build/build_delta_test.cc b/test/unit/build/build_delta_test.cc index 8ef761fa..10957958 100644 --- a/test/unit/build/build_delta_test.cc +++ b/test/unit/build/build_delta_test.cc @@ -27,17 +27,18 @@ TEST(Build_delta, full_empty_registry) { ""); EXPECT_ACTION(plan, 0, 1, 2, Version, output / "version.json", "1.0.0"); - EXPECT_ACTION(plan, 1, 0, 3, WebNotFound, + EXPECT_ACTION(plan, 1, 0, 2, WebNotFound, output / "explorer" / "%" / "404.metapack", "", output / "configuration.json"); - EXPECT_ACTION(plan, 1, 1, 3, DirectoryList, + EXPECT_ACTION(plan, 1, 1, 2, DirectoryList, output / "explorer" / "%" / "directory.metapack", ""); - EXPECT_ACTION(plan, 1, 2, 3, SearchIndex, - output / "explorer" / "%" / "search.metapack", ""); - EXPECT_ACTION(plan, 2, 0, 1, WebIndex, + EXPECT_ACTION(plan, 2, 0, 2, WebIndex, output / "explorer" / "%" / "directory-html.metapack", "", output / "explorer" / "%" / "directory.metapack"); + EXPECT_ACTION(plan, 2, 1, 2, SearchIndex, + output / "explorer" / "%" / "search.metapack", "", + output / "explorer" / "%" / "directory.metapack"); EXPECT_ACTION(plan, 3, 0, 1, Routes, output / "routes.bin", "Full", output / "configuration.json"); @@ -125,21 +126,21 @@ TEST(Build_delta, full_single_schema) { "https://example.com/foo", output / "schemas" / "foo" / "%" / "bundle.metapack"); - EXPECT_ACTION(plan, 5, 0, 3, DirectoryList, + EXPECT_ACTION(plan, 5, 0, 2, DirectoryList, output / "explorer" / "%" / "directory.metapack", "", output / "explorer" / "foo" / "%" / "schema.metapack"); - EXPECT_ACTION(plan, 5, 1, 3, SearchIndex, - output / "explorer" / "%" / "search.metapack", "", - output / "explorer" / "foo" / "%" / "schema.metapack"); - EXPECT_ACTION(plan, 5, 2, 3, WebSchema, + EXPECT_ACTION(plan, 5, 1, 2, WebSchema, output / "explorer" / "foo" / "%" / "schema-html.metapack", "https://example.com/foo", output / "explorer" / "foo" / "%" / "schema.metapack", output / "schemas" / "foo" / "%" / "health.metapack"); - EXPECT_ACTION(plan, 6, 0, 1, WebIndex, + EXPECT_ACTION(plan, 6, 0, 2, WebIndex, output / "explorer" / "%" / "directory-html.metapack", "", output / "explorer" / "%" / "directory.metapack"); + EXPECT_ACTION(plan, 6, 1, 2, SearchIndex, + output / "explorer" / "%" / "search.metapack", "", + output / "explorer" / "%" / "directory.metapack"); EXPECT_ACTION(plan, 7, 0, 1, Routes, output / "routes.bin", "Full", output / "configuration.json"); @@ -294,21 +295,21 @@ TEST(Build_delta, incremental_missing_schema_metapack) { "https://example.com/bar", output / "schemas" / "bar" / "%" / "bundle.metapack"); - EXPECT_ACTION(plan, 4, 0, 3, DirectoryList, + EXPECT_ACTION(plan, 4, 0, 2, DirectoryList, output / "explorer" / "%" / "directory.metapack", "", output / "explorer" / "bar" / "%" / "schema.metapack"); - EXPECT_ACTION(plan, 4, 1, 3, SearchIndex, - output / "explorer" / "%" / "search.metapack", "", - output / "explorer" / "bar" / "%" / "schema.metapack"); - EXPECT_ACTION(plan, 4, 2, 3, WebSchema, + EXPECT_ACTION(plan, 4, 1, 2, WebSchema, output / "explorer" / "bar" / "%" / "schema-html.metapack", "https://example.com/bar", output / "explorer" / "bar" / "%" / "schema.metapack", output / "schemas" / "bar" / "%" / "health.metapack"); - EXPECT_ACTION(plan, 5, 0, 1, WebIndex, + EXPECT_ACTION(plan, 5, 0, 2, WebIndex, output / "explorer" / "%" / "directory-html.metapack", "", output / "explorer" / "%" / "directory.metapack"); + EXPECT_ACTION(plan, 5, 1, 2, SearchIndex, + output / "explorer" / "%" / "search.metapack", "", + output / "explorer" / "%" / "directory.metapack"); EXPECT_ACTION(plan, 6, 0, 1, Routes, output / "routes.bin", "Full", output / "configuration.json"); @@ -445,24 +446,23 @@ TEST(Build_delta, incremental_one_schema_added) { "https://example.com/foo", output / "schemas" / "foo" / "%" / "bundle.metapack"); - EXPECT_ACTION_UNORDERED(plan, 4, 0, 3, DirectoryList, + EXPECT_ACTION_UNORDERED(plan, 4, 0, 2, DirectoryList, output / "explorer" / "%" / "directory.metapack", "", output / "explorer" / "foo" / "%" / "schema.metapack", output / "explorer" / "bar" / "%" / "schema.metapack"); - EXPECT_ACTION_UNORDERED( - plan, 4, 1, 3, SearchIndex, output / "explorer" / "%" / "search.metapack", - "", output / "explorer" / "foo" / "%" / "schema.metapack", - output / "explorer" / "bar" / "%" / "schema.metapack"); - EXPECT_ACTION(plan, 4, 2, 3, WebSchema, + EXPECT_ACTION(plan, 4, 1, 2, WebSchema, output / "explorer" / "foo" / "%" / "schema-html.metapack", "https://example.com/foo", output / "explorer" / "foo" / "%" / "schema.metapack", output / "schemas" / "foo" / "%" / "health.metapack"); - EXPECT_ACTION(plan, 5, 0, 1, WebIndex, + EXPECT_ACTION(plan, 5, 0, 2, WebIndex, output / "explorer" / "%" / "directory-html.metapack", "", output / "explorer" / "%" / "directory.metapack"); + EXPECT_ACTION(plan, 5, 1, 2, SearchIndex, + output / "explorer" / "%" / "search.metapack", "", + output / "explorer" / "%" / "directory.metapack"); EXPECT_TOTAL_FILES( plan, entries, output / "version.json", output / "configuration.json", @@ -517,14 +517,15 @@ TEST(Build_delta, incremental_removed_schema) { EXPECT_CONSISTENT_PLAN(plan, entries, output, Full, 4, 6); - EXPECT_ACTION(plan, 0, 0, 2, DirectoryList, + EXPECT_ACTION(plan, 0, 0, 1, DirectoryList, output / "explorer" / "%" / "directory.metapack", ""); - EXPECT_ACTION(plan, 0, 1, 2, SearchIndex, - output / "explorer" / "%" / "search.metapack", ""); - EXPECT_ACTION(plan, 1, 0, 1, WebIndex, + EXPECT_ACTION(plan, 1, 0, 2, WebIndex, output / "explorer" / "%" / "directory-html.metapack", "", output / "explorer" / "%" / "directory.metapack"); + EXPECT_ACTION(plan, 1, 1, 2, SearchIndex, + output / "explorer" / "%" / "search.metapack", "", + output / "explorer" / "%" / "directory.metapack"); EXPECT_ACTION(plan, 2, 0, 1, Routes, output / "routes.bin", "Full", output / "configuration.json"); @@ -616,21 +617,21 @@ TEST(Build_delta, full_stale_file_in_entries) { "https://example.com/foo", output / "schemas" / "foo" / "%" / "bundle.metapack"); - EXPECT_ACTION(plan, 5, 0, 3, DirectoryList, + EXPECT_ACTION(plan, 5, 0, 2, DirectoryList, output / "explorer" / "%" / "directory.metapack", "", output / "explorer" / "foo" / "%" / "schema.metapack"); - EXPECT_ACTION(plan, 5, 1, 3, SearchIndex, - output / "explorer" / "%" / "search.metapack", "", - output / "explorer" / "foo" / "%" / "schema.metapack"); - EXPECT_ACTION(plan, 5, 2, 3, WebSchema, + EXPECT_ACTION(plan, 5, 1, 2, WebSchema, output / "explorer" / "foo" / "%" / "schema-html.metapack", "https://example.com/foo", output / "explorer" / "foo" / "%" / "schema.metapack", output / "schemas" / "foo" / "%" / "health.metapack"); - EXPECT_ACTION(plan, 6, 0, 1, WebIndex, + EXPECT_ACTION(plan, 6, 0, 2, WebIndex, output / "explorer" / "%" / "directory-html.metapack", "", output / "explorer" / "%" / "directory.metapack"); + EXPECT_ACTION(plan, 6, 1, 2, SearchIndex, + output / "explorer" / "%" / "search.metapack", "", + output / "explorer" / "%" / "directory.metapack"); EXPECT_ACTION(plan, 7, 0, 1, Routes, output / "routes.bin", "Full", output / "configuration.json"); @@ -733,21 +734,21 @@ TEST(Build_delta, full_stale_directory_in_entries) { "https://example.com/foo", output / "schemas" / "foo" / "%" / "bundle.metapack"); - EXPECT_ACTION(plan, 5, 0, 3, DirectoryList, + EXPECT_ACTION(plan, 5, 0, 2, DirectoryList, output / "explorer" / "%" / "directory.metapack", "", output / "explorer" / "foo" / "%" / "schema.metapack"); - EXPECT_ACTION(plan, 5, 1, 3, SearchIndex, - output / "explorer" / "%" / "search.metapack", "", - output / "explorer" / "foo" / "%" / "schema.metapack"); - EXPECT_ACTION(plan, 5, 2, 3, WebSchema, + EXPECT_ACTION(plan, 5, 1, 2, WebSchema, output / "explorer" / "foo" / "%" / "schema-html.metapack", "https://example.com/foo", output / "explorer" / "foo" / "%" / "schema.metapack", output / "schemas" / "foo" / "%" / "health.metapack"); - EXPECT_ACTION(plan, 6, 0, 1, WebIndex, + EXPECT_ACTION(plan, 6, 0, 2, WebIndex, output / "explorer" / "%" / "directory-html.metapack", "", output / "explorer" / "%" / "directory.metapack"); + EXPECT_ACTION(plan, 6, 1, 2, SearchIndex, + output / "explorer" / "%" / "search.metapack", "", + output / "explorer" / "%" / "directory.metapack"); EXPECT_ACTION(plan, 7, 0, 1, Routes, output / "routes.bin", "Full", output / "configuration.json"); @@ -792,17 +793,18 @@ TEST(Build_delta, full_with_comment) { ""); EXPECT_ACTION(plan, 0, 2, 3, Version, output / "version.json", "1.0.0"); - EXPECT_ACTION(plan, 1, 0, 3, WebNotFound, + EXPECT_ACTION(plan, 1, 0, 2, WebNotFound, output / "explorer" / "%" / "404.metapack", "", output / "configuration.json"); - EXPECT_ACTION(plan, 1, 1, 3, DirectoryList, + EXPECT_ACTION(plan, 1, 1, 2, DirectoryList, output / "explorer" / "%" / "directory.metapack", ""); - EXPECT_ACTION(plan, 1, 2, 3, SearchIndex, - output / "explorer" / "%" / "search.metapack", ""); - EXPECT_ACTION(plan, 2, 0, 1, WebIndex, + EXPECT_ACTION(plan, 2, 0, 2, WebIndex, output / "explorer" / "%" / "directory-html.metapack", "", output / "explorer" / "%" / "directory.metapack"); + EXPECT_ACTION(plan, 2, 1, 2, SearchIndex, + output / "explorer" / "%" / "search.metapack", "", + output / "explorer" / "%" / "directory.metapack"); EXPECT_ACTION(plan, 3, 0, 1, Routes, output / "routes.bin", "Full", output / "configuration.json"); @@ -835,17 +837,18 @@ TEST(Build_delta, full_without_comment_removes_existing) { ""); EXPECT_ACTION(plan, 0, 1, 2, Version, output / "version.json", "1.0.0"); - EXPECT_ACTION(plan, 1, 0, 3, WebNotFound, + EXPECT_ACTION(plan, 1, 0, 2, WebNotFound, output / "explorer" / "%" / "404.metapack", "", output / "configuration.json"); - EXPECT_ACTION(plan, 1, 1, 3, DirectoryList, + EXPECT_ACTION(plan, 1, 1, 2, DirectoryList, output / "explorer" / "%" / "directory.metapack", ""); - EXPECT_ACTION(plan, 1, 2, 3, SearchIndex, - output / "explorer" / "%" / "search.metapack", ""); - EXPECT_ACTION(plan, 2, 0, 1, WebIndex, + EXPECT_ACTION(plan, 2, 0, 2, WebIndex, output / "explorer" / "%" / "directory-html.metapack", "", output / "explorer" / "%" / "directory.metapack"); + EXPECT_ACTION(plan, 2, 1, 2, SearchIndex, + output / "explorer" / "%" / "search.metapack", "", + output / "explorer" / "%" / "directory.metapack"); EXPECT_ACTION(plan, 3, 0, 1, Routes, output / "routes.bin", "Full", output / "configuration.json"); @@ -934,21 +937,21 @@ TEST(Build_delta, incremental_with_comment) { "https://example.com/foo", output / "schemas" / "foo" / "%" / "bundle.metapack"); - EXPECT_ACTION(plan, 5, 0, 3, DirectoryList, + EXPECT_ACTION(plan, 5, 0, 2, DirectoryList, output / "explorer" / "%" / "directory.metapack", "", output / "explorer" / "foo" / "%" / "schema.metapack"); - EXPECT_ACTION(plan, 5, 1, 3, SearchIndex, - output / "explorer" / "%" / "search.metapack", "", - output / "explorer" / "foo" / "%" / "schema.metapack"); - EXPECT_ACTION(plan, 5, 2, 3, WebSchema, + EXPECT_ACTION(plan, 5, 1, 2, WebSchema, output / "explorer" / "foo" / "%" / "schema-html.metapack", "https://example.com/foo", output / "explorer" / "foo" / "%" / "schema.metapack", output / "schemas" / "foo" / "%" / "health.metapack"); - EXPECT_ACTION(plan, 6, 0, 1, WebIndex, + EXPECT_ACTION(plan, 6, 0, 2, WebIndex, output / "explorer" / "%" / "directory-html.metapack", "", output / "explorer" / "%" / "directory.metapack"); + EXPECT_ACTION(plan, 6, 1, 2, SearchIndex, + output / "explorer" / "%" / "search.metapack", "", + output / "explorer" / "%" / "directory.metapack"); EXPECT_ACTION(plan, 7, 0, 1, Routes, output / "routes.bin", "Full", output / "configuration.json"); @@ -1047,21 +1050,21 @@ TEST(Build_delta, incremental_empty_comment_removes_existing) { "https://example.com/foo", output / "schemas" / "foo" / "%" / "bundle.metapack"); - EXPECT_ACTION(plan, 4, 0, 3, DirectoryList, + EXPECT_ACTION(plan, 4, 0, 2, DirectoryList, output / "explorer" / "%" / "directory.metapack", "", output / "explorer" / "foo" / "%" / "schema.metapack"); - EXPECT_ACTION(plan, 4, 1, 3, SearchIndex, - output / "explorer" / "%" / "search.metapack", "", - output / "explorer" / "foo" / "%" / "schema.metapack"); - EXPECT_ACTION(plan, 4, 2, 3, WebSchema, + EXPECT_ACTION(plan, 4, 1, 2, WebSchema, output / "explorer" / "foo" / "%" / "schema-html.metapack", "https://example.com/foo", output / "explorer" / "foo" / "%" / "schema.metapack", output / "schemas" / "foo" / "%" / "health.metapack"); - EXPECT_ACTION(plan, 5, 0, 1, WebIndex, + EXPECT_ACTION(plan, 5, 0, 2, WebIndex, output / "explorer" / "%" / "directory-html.metapack", "", output / "explorer" / "%" / "directory.metapack"); + EXPECT_ACTION(plan, 5, 1, 2, SearchIndex, + output / "explorer" / "%" / "search.metapack", "", + output / "explorer" / "%" / "directory.metapack"); EXPECT_ACTION(plan, 6, 0, 1, Routes, output / "routes.bin", "Full", output / "configuration.json"); @@ -1193,14 +1196,15 @@ TEST(Build_delta, incremental_schema_removed_cleans_stale_entries) { EXPECT_CONSISTENT_PLAN(plan, entries, output, Full, 3, 5); - EXPECT_ACTION(plan, 0, 0, 2, DirectoryList, + EXPECT_ACTION(plan, 0, 0, 1, DirectoryList, output / "explorer" / "%" / "directory.metapack", ""); - EXPECT_ACTION(plan, 0, 1, 2, SearchIndex, - output / "explorer" / "%" / "search.metapack", ""); - EXPECT_ACTION(plan, 1, 0, 1, WebIndex, + EXPECT_ACTION(plan, 1, 0, 2, WebIndex, output / "explorer" / "%" / "directory-html.metapack", "", output / "explorer" / "%" / "directory.metapack"); + EXPECT_ACTION(plan, 1, 1, 2, SearchIndex, + output / "explorer" / "%" / "search.metapack", "", + output / "explorer" / "%" / "directory.metapack"); EXPECT_ACTION(plan, 2, 0, 2, Remove, output / "explorer" / "foo", ""); EXPECT_ACTION(plan, 2, 1, 2, Remove, output / "schemas", ""); @@ -1241,14 +1245,15 @@ TEST(Build_delta, remove_wave_deduplicates_children_of_removed_directories) { EXPECT_CONSISTENT_PLAN(plan, entries, output, Full, 3, 5); - EXPECT_ACTION(plan, 0, 0, 2, DirectoryList, + EXPECT_ACTION(plan, 0, 0, 1, DirectoryList, output / "explorer" / "%" / "directory.metapack", ""); - EXPECT_ACTION(plan, 0, 1, 2, SearchIndex, - output / "explorer" / "%" / "search.metapack", ""); - EXPECT_ACTION(plan, 1, 0, 1, WebIndex, + EXPECT_ACTION(plan, 1, 0, 2, WebIndex, output / "explorer" / "%" / "directory-html.metapack", "", output / "explorer" / "%" / "directory.metapack"); + EXPECT_ACTION(plan, 1, 1, 2, SearchIndex, + output / "explorer" / "%" / "search.metapack", "", + output / "explorer" / "%" / "directory.metapack"); EXPECT_ACTION(plan, 2, 0, 2, Remove, output / "explorer" / "foo", ""); EXPECT_ACTION(plan, 2, 1, 2, Remove, output / "schemas", ""); @@ -1293,17 +1298,18 @@ TEST(Build_delta, full_config_change_to_empty_schemas) { ""); EXPECT_ACTION(plan, 0, 1, 2, Version, output / "version.json", "1.0.0"); - EXPECT_ACTION(plan, 1, 0, 3, WebNotFound, + EXPECT_ACTION(plan, 1, 0, 2, WebNotFound, output / "explorer" / "%" / "404.metapack", "", output / "configuration.json"); - EXPECT_ACTION(plan, 1, 1, 3, DirectoryList, + EXPECT_ACTION(plan, 1, 1, 2, DirectoryList, output / "explorer" / "%" / "directory.metapack", ""); - EXPECT_ACTION(plan, 1, 2, 3, SearchIndex, - output / "explorer" / "%" / "search.metapack", ""); - EXPECT_ACTION(plan, 2, 0, 1, WebIndex, + EXPECT_ACTION(plan, 2, 0, 2, WebIndex, output / "explorer" / "%" / "directory-html.metapack", "", output / "explorer" / "%" / "directory.metapack"); + EXPECT_ACTION(plan, 2, 1, 2, SearchIndex, + output / "explorer" / "%" / "search.metapack", "", + output / "explorer" / "%" / "directory.metapack"); EXPECT_ACTION(plan, 3, 0, 1, Routes, output / "routes.bin", "Full", output / "configuration.json"); @@ -1385,21 +1391,21 @@ TEST(Build_delta, full_single_schema_evaluate_false) { "https://example.com/foo", output / "schemas" / "foo" / "%" / "bundle.metapack"); - EXPECT_ACTION(plan, 5, 0, 3, DirectoryList, + EXPECT_ACTION(plan, 5, 0, 2, DirectoryList, output / "explorer" / "%" / "directory.metapack", "", output / "explorer" / "foo" / "%" / "schema.metapack"); - EXPECT_ACTION(plan, 5, 1, 3, SearchIndex, - output / "explorer" / "%" / "search.metapack", "", - output / "explorer" / "foo" / "%" / "schema.metapack"); - EXPECT_ACTION(plan, 5, 2, 3, WebSchema, + EXPECT_ACTION(plan, 5, 1, 2, WebSchema, output / "explorer" / "foo" / "%" / "schema-html.metapack", "https://example.com/foo", output / "explorer" / "foo" / "%" / "schema.metapack", output / "schemas" / "foo" / "%" / "health.metapack"); - EXPECT_ACTION(plan, 6, 0, 1, WebIndex, + EXPECT_ACTION(plan, 6, 0, 2, WebIndex, output / "explorer" / "%" / "directory-html.metapack", "", output / "explorer" / "%" / "directory.metapack"); + EXPECT_ACTION(plan, 6, 1, 2, SearchIndex, + output / "explorer" / "%" / "search.metapack", "", + output / "explorer" / "%" / "directory.metapack"); EXPECT_ACTION(plan, 7, 0, 1, Routes, output / "routes.bin", "Full", output / "configuration.json"); @@ -1493,21 +1499,21 @@ TEST(Build_delta, full_evaluate_false_removes_existing_blaze) { "https://example.com/foo", output / "schemas" / "foo" / "%" / "bundle.metapack"); - EXPECT_ACTION(plan, 5, 0, 3, DirectoryList, + EXPECT_ACTION(plan, 5, 0, 2, DirectoryList, output / "explorer" / "%" / "directory.metapack", "", output / "explorer" / "foo" / "%" / "schema.metapack"); - EXPECT_ACTION(plan, 5, 1, 3, SearchIndex, - output / "explorer" / "%" / "search.metapack", "", - output / "explorer" / "foo" / "%" / "schema.metapack"); - EXPECT_ACTION(plan, 5, 2, 3, WebSchema, + EXPECT_ACTION(plan, 5, 1, 2, WebSchema, output / "explorer" / "foo" / "%" / "schema-html.metapack", "https://example.com/foo", output / "explorer" / "foo" / "%" / "schema.metapack", output / "schemas" / "foo" / "%" / "health.metapack"); - EXPECT_ACTION(plan, 6, 0, 1, WebIndex, + EXPECT_ACTION(plan, 6, 0, 2, WebIndex, output / "explorer" / "%" / "directory-html.metapack", "", output / "explorer" / "%" / "directory.metapack"); + EXPECT_ACTION(plan, 6, 1, 2, SearchIndex, + output / "explorer" / "%" / "search.metapack", "", + output / "explorer" / "%" / "directory.metapack"); EXPECT_ACTION(plan, 7, 0, 1, Routes, output / "routes.bin", "Full", output / "configuration.json"); @@ -1599,21 +1605,21 @@ TEST(Build_delta, incremental_evaluate_false) { "https://example.com/foo", output / "schemas" / "foo" / "%" / "bundle.metapack"); - EXPECT_ACTION(plan, 4, 0, 3, DirectoryList, + EXPECT_ACTION(plan, 4, 0, 2, DirectoryList, output / "explorer" / "%" / "directory.metapack", "", output / "explorer" / "foo" / "%" / "schema.metapack"); - EXPECT_ACTION(plan, 4, 1, 3, SearchIndex, - output / "explorer" / "%" / "search.metapack", "", - output / "explorer" / "foo" / "%" / "schema.metapack"); - EXPECT_ACTION(plan, 4, 2, 3, WebSchema, + EXPECT_ACTION(plan, 4, 1, 2, WebSchema, output / "explorer" / "foo" / "%" / "schema-html.metapack", "https://example.com/foo", output / "explorer" / "foo" / "%" / "schema.metapack", output / "schemas" / "foo" / "%" / "health.metapack"); - EXPECT_ACTION(plan, 5, 0, 1, WebIndex, + EXPECT_ACTION(plan, 5, 0, 2, WebIndex, output / "explorer" / "%" / "directory-html.metapack", "", output / "explorer" / "%" / "directory.metapack"); + EXPECT_ACTION(plan, 5, 1, 2, SearchIndex, + output / "explorer" / "%" / "search.metapack", "", + output / "explorer" / "%" / "directory.metapack"); EXPECT_ACTION(plan, 6, 0, 1, Routes, output / "routes.bin", "Full", output / "configuration.json"); @@ -1670,20 +1676,20 @@ TEST(Build_delta, incremental_missing_blaze_exhaustive) { EXPECT_CONSISTENT_PLAN(plan, entries, output, Full, 2, 4); - EXPECT_ACTION(plan, 0, 0, 3, DirectoryList, + EXPECT_ACTION(plan, 0, 0, 2, DirectoryList, output / "explorer" / "%" / "directory.metapack", "", output / "explorer" / "foo" / "%" / "schema.metapack"); - EXPECT_ACTION(plan, 0, 1, 3, SearchIndex, - output / "explorer" / "%" / "search.metapack", "", - output / "explorer" / "foo" / "%" / "schema.metapack"); - EXPECT_ACTION(plan, 0, 2, 3, BlazeExhaustive, + EXPECT_ACTION(plan, 0, 1, 2, BlazeExhaustive, output / "schemas" / "foo" / "%" / "blaze-exhaustive.metapack", "https://example.com/foo", output / "schemas" / "foo" / "%" / "bundle.metapack"); - EXPECT_ACTION(plan, 1, 0, 1, WebIndex, + EXPECT_ACTION(plan, 1, 0, 2, WebIndex, output / "explorer" / "%" / "directory-html.metapack", "", output / "explorer" / "%" / "directory.metapack"); + EXPECT_ACTION(plan, 1, 1, 2, SearchIndex, + output / "explorer" / "%" / "search.metapack", "", + output / "explorer" / "%" / "directory.metapack"); EXPECT_TOTAL_FILES( plan, entries, output / "version.json", output / "configuration.json", @@ -1740,30 +1746,30 @@ TEST(Build_delta, incremental_missing_bundle) { EXPECT_CONSISTENT_PLAN(plan, entries, output, Full, 2, 7); - EXPECT_ACTION(plan, 0, 0, 3, DirectoryList, + EXPECT_ACTION(plan, 0, 0, 2, DirectoryList, output / "explorer" / "%" / "directory.metapack", "", output / "explorer" / "foo" / "%" / "schema.metapack"); - EXPECT_ACTION(plan, 0, 1, 3, SearchIndex, - output / "explorer" / "%" / "search.metapack", "", - output / "explorer" / "foo" / "%" / "schema.metapack"); - EXPECT_ACTION(plan, 0, 2, 3, Bundle, + EXPECT_ACTION(plan, 0, 1, 2, Bundle, output / "schemas" / "foo" / "%" / "bundle.metapack", "https://example.com/foo", output / "schemas" / "foo" / "%" / "schema.metapack", output / "schemas" / "foo" / "%" / "dependencies.metapack"); - EXPECT_ACTION(plan, 1, 0, 4, WebIndex, + EXPECT_ACTION(plan, 1, 0, 5, WebIndex, output / "explorer" / "%" / "directory-html.metapack", "", output / "explorer" / "%" / "directory.metapack"); - EXPECT_ACTION(plan, 1, 1, 4, BlazeExhaustive, + EXPECT_ACTION(plan, 1, 1, 5, SearchIndex, + output / "explorer" / "%" / "search.metapack", "", + output / "explorer" / "%" / "directory.metapack"); + EXPECT_ACTION(plan, 1, 2, 5, BlazeExhaustive, output / "schemas" / "foo" / "%" / "blaze-exhaustive.metapack", "https://example.com/foo", output / "schemas" / "foo" / "%" / "bundle.metapack"); - EXPECT_ACTION(plan, 1, 2, 4, BlazeFast, + EXPECT_ACTION(plan, 1, 3, 5, BlazeFast, output / "schemas" / "foo" / "%" / "blaze-fast.metapack", "https://example.com/foo", output / "schemas" / "foo" / "%" / "bundle.metapack"); - EXPECT_ACTION(plan, 1, 3, 4, Editor, + EXPECT_ACTION(plan, 1, 4, 5, Editor, output / "schemas" / "foo" / "%" / "editor.metapack", "https://example.com/foo", output / "schemas" / "foo" / "%" / "bundle.metapack"); @@ -1823,21 +1829,21 @@ TEST(Build_delta, incremental_missing_web_schema) { EXPECT_CONSISTENT_PLAN(plan, entries, output, Full, 2, 4); - EXPECT_ACTION(plan, 0, 0, 3, DirectoryList, + EXPECT_ACTION(plan, 0, 0, 2, DirectoryList, output / "explorer" / "%" / "directory.metapack", "", output / "explorer" / "foo" / "%" / "schema.metapack"); - EXPECT_ACTION(plan, 0, 1, 3, SearchIndex, - output / "explorer" / "%" / "search.metapack", "", - output / "explorer" / "foo" / "%" / "schema.metapack"); - EXPECT_ACTION(plan, 0, 2, 3, WebSchema, + EXPECT_ACTION(plan, 0, 1, 2, WebSchema, output / "explorer" / "foo" / "%" / "schema-html.metapack", "https://example.com/foo", output / "explorer" / "foo" / "%" / "schema.metapack", output / "schemas" / "foo" / "%" / "health.metapack"); - EXPECT_ACTION(plan, 1, 0, 1, WebIndex, + EXPECT_ACTION(plan, 1, 0, 2, WebIndex, output / "explorer" / "%" / "directory-html.metapack", "", output / "explorer" / "%" / "directory.metapack"); + EXPECT_ACTION(plan, 1, 1, 2, SearchIndex, + output / "explorer" / "%" / "search.metapack", "", + output / "explorer" / "%" / "directory.metapack"); EXPECT_TOTAL_FILES( plan, entries, output / "version.json", output / "configuration.json", @@ -2044,24 +2050,23 @@ TEST(Build_delta, mtime_source_newer) { "https://example.com/foo", output / "schemas" / "foo" / "%" / "bundle.metapack"); - EXPECT_ACTION_UNORDERED(plan, 4, 0, 3, DirectoryList, + EXPECT_ACTION_UNORDERED(plan, 4, 0, 2, DirectoryList, output / "explorer" / "%" / "directory.metapack", "", output / "explorer" / "foo" / "%" / "schema.metapack", output / "explorer" / "bar" / "%" / "schema.metapack"); - EXPECT_ACTION_UNORDERED( - plan, 4, 1, 3, SearchIndex, output / "explorer" / "%" / "search.metapack", - "", output / "explorer" / "foo" / "%" / "schema.metapack", - output / "explorer" / "bar" / "%" / "schema.metapack"); - EXPECT_ACTION(plan, 4, 2, 3, WebSchema, + EXPECT_ACTION(plan, 4, 1, 2, WebSchema, output / "explorer" / "foo" / "%" / "schema-html.metapack", "https://example.com/foo", output / "explorer" / "foo" / "%" / "schema.metapack", output / "schemas" / "foo" / "%" / "health.metapack"); - EXPECT_ACTION(plan, 5, 0, 1, WebIndex, + EXPECT_ACTION(plan, 5, 0, 2, WebIndex, output / "explorer" / "%" / "directory-html.metapack", "", output / "explorer" / "%" / "directory.metapack"); + EXPECT_ACTION(plan, 5, 1, 2, SearchIndex, + output / "explorer" / "%" / "search.metapack", "", + output / "explorer" / "%" / "directory.metapack"); EXPECT_TOTAL_FILES( plan, entries, output / "version.json", output / "configuration.json", @@ -2181,24 +2186,23 @@ TEST(Build_delta, mtime_no_entry) { "https://example.com/foo", output / "schemas" / "foo" / "%" / "bundle.metapack"); - EXPECT_ACTION_UNORDERED(plan, 4, 0, 3, DirectoryList, + EXPECT_ACTION_UNORDERED(plan, 4, 0, 2, DirectoryList, output / "explorer" / "%" / "directory.metapack", "", output / "explorer" / "foo" / "%" / "schema.metapack", output / "explorer" / "bar" / "%" / "schema.metapack"); - EXPECT_ACTION_UNORDERED( - plan, 4, 1, 3, SearchIndex, output / "explorer" / "%" / "search.metapack", - "", output / "explorer" / "foo" / "%" / "schema.metapack", - output / "explorer" / "bar" / "%" / "schema.metapack"); - EXPECT_ACTION(plan, 4, 2, 3, WebSchema, + EXPECT_ACTION(plan, 4, 1, 2, WebSchema, output / "explorer" / "foo" / "%" / "schema-html.metapack", "https://example.com/foo", output / "explorer" / "foo" / "%" / "schema.metapack", output / "schemas" / "foo" / "%" / "health.metapack"); - EXPECT_ACTION(plan, 5, 0, 1, WebIndex, + EXPECT_ACTION(plan, 5, 0, 2, WebIndex, output / "explorer" / "%" / "directory-html.metapack", "", output / "explorer" / "%" / "directory.metapack"); + EXPECT_ACTION(plan, 5, 1, 2, SearchIndex, + output / "explorer" / "%" / "search.metapack", "", + output / "explorer" / "%" / "directory.metapack"); EXPECT_TOTAL_FILES( plan, entries, output / "version.json", output / "configuration.json", @@ -2319,21 +2323,21 @@ TEST(Build_delta, mtime_no_file_mark) { "https://example.com/foo", output / "schemas" / "foo" / "%" / "bundle.metapack"); - EXPECT_ACTION(plan, 4, 0, 3, DirectoryList, + EXPECT_ACTION(plan, 4, 0, 2, DirectoryList, output / "explorer" / "%" / "directory.metapack", "", output / "explorer" / "foo" / "%" / "schema.metapack"); - EXPECT_ACTION(plan, 4, 1, 3, SearchIndex, - output / "explorer" / "%" / "search.metapack", "", - output / "explorer" / "foo" / "%" / "schema.metapack"); - EXPECT_ACTION(plan, 4, 2, 3, WebSchema, + EXPECT_ACTION(plan, 4, 1, 2, WebSchema, output / "explorer" / "foo" / "%" / "schema-html.metapack", "https://example.com/foo", output / "explorer" / "foo" / "%" / "schema.metapack", output / "schemas" / "foo" / "%" / "health.metapack"); - EXPECT_ACTION(plan, 5, 0, 1, WebIndex, + EXPECT_ACTION(plan, 5, 0, 2, WebIndex, output / "explorer" / "%" / "directory-html.metapack", "", output / "explorer" / "%" / "directory.metapack"); + EXPECT_ACTION(plan, 5, 1, 2, SearchIndex, + output / "explorer" / "%" / "search.metapack", "", + output / "explorer" / "%" / "directory.metapack"); EXPECT_TOTAL_FILES( plan, entries, output / "version.json", output / "configuration.json", @@ -2486,28 +2490,27 @@ TEST(Build_delta, incremental_reverse_dep_direct) { "https://example.com/b", output / "schemas" / "b" / "%" / "bundle.metapack"); - EXPECT_ACTION_UNORDERED(plan, 4, 0, 4, DirectoryList, + EXPECT_ACTION_UNORDERED(plan, 4, 0, 3, DirectoryList, output / "explorer" / "%" / "directory.metapack", "", output / "explorer" / "a" / "%" / "schema.metapack", output / "explorer" / "b" / "%" / "schema.metapack"); - EXPECT_ACTION_UNORDERED(plan, 4, 1, 4, SearchIndex, - output / "explorer" / "%" / "search.metapack", "", - output / "explorer" / "a" / "%" / "schema.metapack", - output / "explorer" / "b" / "%" / "schema.metapack"); - EXPECT_ACTION(plan, 4, 2, 4, WebSchema, + EXPECT_ACTION(plan, 4, 1, 3, WebSchema, output / "explorer" / "a" / "%" / "schema-html.metapack", "https://example.com/a", output / "explorer" / "a" / "%" / "schema.metapack", output / "schemas" / "a" / "%" / "health.metapack"); - EXPECT_ACTION(plan, 4, 3, 4, WebSchema, + EXPECT_ACTION(plan, 4, 2, 3, WebSchema, output / "explorer" / "b" / "%" / "schema-html.metapack", "https://example.com/b", output / "explorer" / "b" / "%" / "schema.metapack", output / "schemas" / "b" / "%" / "health.metapack"); - EXPECT_ACTION(plan, 5, 0, 1, WebIndex, + EXPECT_ACTION(plan, 5, 0, 2, WebIndex, output / "explorer" / "%" / "directory-html.metapack", "", output / "explorer" / "%" / "directory.metapack"); + EXPECT_ACTION(plan, 5, 1, 2, SearchIndex, + output / "explorer" / "%" / "search.metapack", "", + output / "explorer" / "%" / "directory.metapack"); EXPECT_ACTION(plan, 6, 0, 1, Routes, output / "routes.bin", "Full", output / "configuration.json"); @@ -2730,35 +2733,33 @@ TEST(Build_delta, incremental_reverse_dep_transitive) { "https://example.com/c", output / "schemas" / "c" / "%" / "bundle.metapack"); - EXPECT_ACTION_UNORDERED(plan, 4, 0, 5, DirectoryList, + EXPECT_ACTION_UNORDERED(plan, 4, 0, 4, DirectoryList, output / "explorer" / "%" / "directory.metapack", "", output / "explorer" / "a" / "%" / "schema.metapack", output / "explorer" / "b" / "%" / "schema.metapack", output / "explorer" / "c" / "%" / "schema.metapack"); - EXPECT_ACTION_UNORDERED(plan, 4, 1, 5, SearchIndex, - output / "explorer" / "%" / "search.metapack", "", - output / "explorer" / "a" / "%" / "schema.metapack", - output / "explorer" / "b" / "%" / "schema.metapack", - output / "explorer" / "c" / "%" / "schema.metapack"); - EXPECT_ACTION(plan, 4, 2, 5, WebSchema, + EXPECT_ACTION(plan, 4, 1, 4, WebSchema, output / "explorer" / "a" / "%" / "schema-html.metapack", "https://example.com/a", output / "explorer" / "a" / "%" / "schema.metapack", output / "schemas" / "a" / "%" / "health.metapack"); - EXPECT_ACTION(plan, 4, 3, 5, WebSchema, + EXPECT_ACTION(plan, 4, 2, 4, WebSchema, output / "explorer" / "b" / "%" / "schema-html.metapack", "https://example.com/b", output / "explorer" / "b" / "%" / "schema.metapack", output / "schemas" / "b" / "%" / "health.metapack"); - EXPECT_ACTION(plan, 4, 4, 5, WebSchema, + EXPECT_ACTION(plan, 4, 3, 4, WebSchema, output / "explorer" / "c" / "%" / "schema-html.metapack", "https://example.com/c", output / "explorer" / "c" / "%" / "schema.metapack", output / "schemas" / "c" / "%" / "health.metapack"); - EXPECT_ACTION(plan, 5, 0, 1, WebIndex, + EXPECT_ACTION(plan, 5, 0, 2, WebIndex, output / "explorer" / "%" / "directory-html.metapack", "", output / "explorer" / "%" / "directory.metapack"); + EXPECT_ACTION(plan, 5, 1, 2, SearchIndex, + output / "explorer" / "%" / "search.metapack", "", + output / "explorer" / "%" / "directory.metapack"); EXPECT_ACTION(plan, 6, 0, 1, Routes, output / "routes.bin", "Full", output / "configuration.json"); @@ -2941,23 +2942,22 @@ TEST(Build_delta, mtime_reverse_dep) { "https://example.com/a", output / "schemas" / "a" / "%" / "bundle.metapack"); - EXPECT_ACTION_UNORDERED(plan, 4, 0, 3, DirectoryList, + EXPECT_ACTION_UNORDERED(plan, 4, 0, 2, DirectoryList, output / "explorer" / "%" / "directory.metapack", "", output / "explorer" / "a" / "%" / "schema.metapack", output / "explorer" / "b" / "%" / "schema.metapack"); - EXPECT_ACTION_UNORDERED(plan, 4, 1, 3, SearchIndex, - output / "explorer" / "%" / "search.metapack", "", - output / "explorer" / "a" / "%" / "schema.metapack", - output / "explorer" / "b" / "%" / "schema.metapack"); - EXPECT_ACTION(plan, 4, 2, 3, WebSchema, + EXPECT_ACTION(plan, 4, 1, 2, WebSchema, output / "explorer" / "a" / "%" / "schema-html.metapack", "https://example.com/a", output / "explorer" / "a" / "%" / "schema.metapack", output / "schemas" / "a" / "%" / "health.metapack"); - EXPECT_ACTION(plan, 5, 0, 1, WebIndex, + EXPECT_ACTION(plan, 5, 0, 2, WebIndex, output / "explorer" / "%" / "directory-html.metapack", "", output / "explorer" / "%" / "directory.metapack"); + EXPECT_ACTION(plan, 5, 1, 2, SearchIndex, + output / "explorer" / "%" / "search.metapack", "", + output / "explorer" / "%" / "directory.metapack"); EXPECT_ACTION(plan, 6, 0, 1, Routes, output / "routes.bin", "Full", output / "configuration.json"); @@ -3062,21 +3062,21 @@ TEST(Build_delta, incremental_evaluate_false_removes_existing_blaze) { "https://example.com/foo", output / "schemas" / "foo" / "%" / "bundle.metapack"); - EXPECT_ACTION(plan, 4, 0, 3, DirectoryList, + EXPECT_ACTION(plan, 4, 0, 2, DirectoryList, output / "explorer" / "%" / "directory.metapack", "", output / "explorer" / "foo" / "%" / "schema.metapack"); - EXPECT_ACTION(plan, 4, 1, 3, SearchIndex, - output / "explorer" / "%" / "search.metapack", "", - output / "explorer" / "foo" / "%" / "schema.metapack"); - EXPECT_ACTION(plan, 4, 2, 3, WebSchema, + EXPECT_ACTION(plan, 4, 1, 2, WebSchema, output / "explorer" / "foo" / "%" / "schema-html.metapack", "https://example.com/foo", output / "explorer" / "foo" / "%" / "schema.metapack", output / "schemas" / "foo" / "%" / "health.metapack"); - EXPECT_ACTION(plan, 5, 0, 1, WebIndex, + EXPECT_ACTION(plan, 5, 0, 2, WebIndex, output / "explorer" / "%" / "directory-html.metapack", "", output / "explorer" / "%" / "directory.metapack"); + EXPECT_ACTION(plan, 5, 1, 2, SearchIndex, + output / "explorer" / "%" / "search.metapack", "", + output / "explorer" / "%" / "directory.metapack"); EXPECT_ACTION(plan, 6, 0, 1, Routes, output / "routes.bin", "Full", output / "configuration.json"); @@ -3116,18 +3116,20 @@ TEST(Build_delta, headless_full_empty_registry) { sourcemeta::one::BuildPlan::Type::Headless, entries, output, schemas, "1.0.0", false, "", changed, removed)}; - EXPECT_CONSISTENT_PLAN(plan, entries, output, Headless, 3, 5); + EXPECT_CONSISTENT_PLAN(plan, entries, output, Headless, 4, 5); EXPECT_ACTION(plan, 0, 0, 2, Configuration, output / "configuration.json", ""); EXPECT_ACTION(plan, 0, 1, 2, Version, output / "version.json", "1.0.0"); - EXPECT_ACTION(plan, 1, 0, 2, DirectoryList, + EXPECT_ACTION(plan, 1, 0, 1, DirectoryList, output / "explorer" / "%" / "directory.metapack", ""); - EXPECT_ACTION(plan, 1, 1, 2, SearchIndex, - output / "explorer" / "%" / "search.metapack", ""); - EXPECT_ACTION(plan, 2, 0, 1, Routes, output / "routes.bin", "Headless", + EXPECT_ACTION(plan, 2, 0, 1, SearchIndex, + output / "explorer" / "%" / "search.metapack", "", + output / "explorer" / "%" / "directory.metapack"); + + EXPECT_ACTION(plan, 3, 0, 1, Routes, output / "routes.bin", "Headless", output / "configuration.json"); EXPECT_TOTAL_FILES( @@ -3148,7 +3150,7 @@ TEST(Build_delta, headless_full_single_schema) { sourcemeta::one::BuildPlan::Type::Headless, entries, output, schemas, "1.0.0", false, "", changed, removed)}; - EXPECT_CONSISTENT_PLAN(plan, entries, output, Headless, 7, 16); + EXPECT_CONSISTENT_PLAN(plan, entries, output, Headless, 8, 16); EXPECT_ACTION(plan, 0, 0, 2, Configuration, output / "configuration.json", ""); @@ -3207,14 +3209,15 @@ TEST(Build_delta, headless_full_single_schema) { "https://example.com/foo", output / "schemas" / "foo" / "%" / "bundle.metapack"); - EXPECT_ACTION(plan, 5, 0, 2, DirectoryList, + EXPECT_ACTION(plan, 5, 0, 1, DirectoryList, output / "explorer" / "%" / "directory.metapack", "", output / "explorer" / "foo" / "%" / "schema.metapack"); - EXPECT_ACTION(plan, 5, 1, 2, SearchIndex, + + EXPECT_ACTION(plan, 6, 0, 1, SearchIndex, output / "explorer" / "%" / "search.metapack", "", - output / "explorer" / "foo" / "%" / "schema.metapack"); + output / "explorer" / "%" / "directory.metapack"); - EXPECT_ACTION(plan, 6, 0, 1, Routes, output / "routes.bin", "Headless", + EXPECT_ACTION(plan, 7, 0, 1, Routes, output / "routes.bin", "Headless", output / "configuration.json"); EXPECT_TOTAL_FILES( @@ -3250,7 +3253,7 @@ TEST(Build_delta, headless_incremental) { sourcemeta::one::BuildPlan::Type::Headless, entries, output, schemas, "1.0.0", true, "", changed, removed)}; - EXPECT_CONSISTENT_PLAN(plan, entries, output, Headless, 5, 13); + EXPECT_CONSISTENT_PLAN(plan, entries, output, Headless, 6, 13); EXPECT_ACTION(plan, 0, 0, 1, Materialise, output / "schemas" / "foo" / "%" / "schema.metapack", @@ -3305,12 +3308,13 @@ TEST(Build_delta, headless_incremental) { "https://example.com/foo", output / "schemas" / "foo" / "%" / "bundle.metapack"); - EXPECT_ACTION(plan, 4, 0, 2, DirectoryList, + EXPECT_ACTION(plan, 4, 0, 1, DirectoryList, output / "explorer" / "%" / "directory.metapack", "", output / "explorer" / "foo" / "%" / "schema.metapack"); - EXPECT_ACTION(plan, 4, 1, 2, SearchIndex, + + EXPECT_ACTION(plan, 5, 0, 1, SearchIndex, output / "explorer" / "%" / "search.metapack", "", - output / "explorer" / "foo" / "%" / "schema.metapack"); + output / "explorer" / "%" / "directory.metapack"); EXPECT_TOTAL_FILES( plan, entries, output / "version.json", output / "configuration.json", @@ -3357,7 +3361,7 @@ TEST(Build_delta, full_to_headless_removes_web) { sourcemeta::one::BuildPlan::Type::Headless, entries, output, schemas, "1.0.0", true, "", changed, removed)}; - EXPECT_CONSISTENT_PLAN(plan, entries, output, Headless, 7, 18); + EXPECT_CONSISTENT_PLAN(plan, entries, output, Headless, 8, 18); EXPECT_ACTION(plan, 0, 0, 1, Materialise, output / "schemas" / "foo" / "%" / "schema.metapack", @@ -3412,24 +3416,25 @@ TEST(Build_delta, full_to_headless_removes_web) { "https://example.com/foo", output / "schemas" / "foo" / "%" / "bundle.metapack"); - EXPECT_ACTION(plan, 4, 0, 2, DirectoryList, + EXPECT_ACTION(plan, 4, 0, 1, DirectoryList, output / "explorer" / "%" / "directory.metapack", "", output / "explorer" / "foo" / "%" / "schema.metapack"); - EXPECT_ACTION(plan, 4, 1, 2, SearchIndex, + + EXPECT_ACTION(plan, 5, 0, 1, SearchIndex, output / "explorer" / "%" / "search.metapack", "", - output / "explorer" / "foo" / "%" / "schema.metapack"); + output / "explorer" / "%" / "directory.metapack"); - EXPECT_ACTION(plan, 5, 0, 1, Routes, output / "routes.bin", "Headless", + EXPECT_ACTION(plan, 6, 0, 1, Routes, output / "routes.bin", "Headless", output / "configuration.json"); - EXPECT_ACTION(plan, 6, 0, 4, Remove, + EXPECT_ACTION(plan, 7, 0, 4, Remove, output / "explorer" / "%" / "404.metapack", ""); - EXPECT_ACTION(plan, 6, 1, 4, Remove, + EXPECT_ACTION(plan, 7, 1, 4, Remove, output / "explorer" / "%" / "directory-html.metapack", ""); - EXPECT_ACTION(plan, 6, 2, 4, Remove, + EXPECT_ACTION(plan, 7, 2, 4, Remove, output / "explorer" / "foo" / "%" / "directory-html.metapack", ""); - EXPECT_ACTION(plan, 6, 3, 4, Remove, + EXPECT_ACTION(plan, 7, 3, 4, Remove, output / "explorer" / "foo" / "%" / "schema-html.metapack", ""); EXPECT_TOTAL_FILES( @@ -3582,21 +3587,21 @@ TEST(Build_delta, headless_to_full_incremental) { "https://example.com/foo", output / "schemas" / "foo" / "%" / "bundle.metapack"); - EXPECT_ACTION(plan, 4, 0, 3, DirectoryList, + EXPECT_ACTION(plan, 4, 0, 2, DirectoryList, output / "explorer" / "%" / "directory.metapack", "", output / "explorer" / "foo" / "%" / "schema.metapack"); - EXPECT_ACTION(plan, 4, 1, 3, SearchIndex, - output / "explorer" / "%" / "search.metapack", "", - output / "explorer" / "foo" / "%" / "schema.metapack"); - EXPECT_ACTION(plan, 4, 2, 3, WebSchema, + EXPECT_ACTION(plan, 4, 1, 2, WebSchema, output / "explorer" / "foo" / "%" / "schema-html.metapack", "https://example.com/foo", output / "explorer" / "foo" / "%" / "schema.metapack", output / "schemas" / "foo" / "%" / "health.metapack"); - EXPECT_ACTION(plan, 5, 0, 1, WebIndex, + EXPECT_ACTION(plan, 5, 0, 2, WebIndex, output / "explorer" / "%" / "directory-html.metapack", "", output / "explorer" / "%" / "directory.metapack"); + EXPECT_ACTION(plan, 5, 1, 2, SearchIndex, + output / "explorer" / "%" / "search.metapack", "", + output / "explorer" / "%" / "directory.metapack"); EXPECT_ACTION(plan, 6, 0, 1, Routes, output / "routes.bin", "Full", output / "configuration.json"); @@ -3723,21 +3728,21 @@ TEST(Build_delta, headless_to_full_full_rebuild) { "https://example.com/foo", output / "schemas" / "foo" / "%" / "bundle.metapack"); - EXPECT_ACTION(plan, 4, 0, 3, DirectoryList, + EXPECT_ACTION(plan, 4, 0, 2, DirectoryList, output / "explorer" / "%" / "directory.metapack", "", output / "explorer" / "foo" / "%" / "schema.metapack"); - EXPECT_ACTION(plan, 4, 1, 3, SearchIndex, - output / "explorer" / "%" / "search.metapack", "", - output / "explorer" / "foo" / "%" / "schema.metapack"); - EXPECT_ACTION(plan, 4, 2, 3, WebSchema, + EXPECT_ACTION(plan, 4, 1, 2, WebSchema, output / "explorer" / "foo" / "%" / "schema-html.metapack", "https://example.com/foo", output / "explorer" / "foo" / "%" / "schema.metapack", output / "schemas" / "foo" / "%" / "health.metapack"); - EXPECT_ACTION(plan, 5, 0, 1, WebIndex, + EXPECT_ACTION(plan, 5, 0, 2, WebIndex, output / "explorer" / "%" / "directory-html.metapack", "", output / "explorer" / "%" / "directory.metapack"); + EXPECT_ACTION(plan, 5, 1, 2, SearchIndex, + output / "explorer" / "%" / "search.metapack", "", + output / "explorer" / "%" / "directory.metapack"); EXPECT_ACTION(plan, 6, 0, 1, Routes, output / "routes.bin", "Full", output / "configuration.json"); @@ -3785,7 +3790,7 @@ TEST(Build_delta, full_to_headless_full_rebuild) { sourcemeta::one::BuildPlan::Type::Headless, entries, output, schemas, "2.0.0", false, "", changed, removed)}; - EXPECT_CONSISTENT_PLAN(plan, entries, output, Headless, 8, 19); + EXPECT_CONSISTENT_PLAN(plan, entries, output, Headless, 9, 19); EXPECT_ACTION(plan, 0, 0, 2, Configuration, output / "configuration.json", ""); @@ -3844,21 +3849,22 @@ TEST(Build_delta, full_to_headless_full_rebuild) { "https://example.com/foo", output / "schemas" / "foo" / "%" / "bundle.metapack"); - EXPECT_ACTION(plan, 5, 0, 2, DirectoryList, + EXPECT_ACTION(plan, 5, 0, 1, DirectoryList, output / "explorer" / "%" / "directory.metapack", "", output / "explorer" / "foo" / "%" / "schema.metapack"); - EXPECT_ACTION(plan, 5, 1, 2, SearchIndex, + + EXPECT_ACTION(plan, 6, 0, 1, SearchIndex, output / "explorer" / "%" / "search.metapack", "", - output / "explorer" / "foo" / "%" / "schema.metapack"); + output / "explorer" / "%" / "directory.metapack"); - EXPECT_ACTION(plan, 6, 0, 1, Routes, output / "routes.bin", "Headless", + EXPECT_ACTION(plan, 7, 0, 1, Routes, output / "routes.bin", "Headless", output / "configuration.json"); - EXPECT_ACTION(plan, 7, 0, 3, Remove, + EXPECT_ACTION(plan, 8, 0, 3, Remove, output / "explorer" / "%" / "404.metapack", ""); - EXPECT_ACTION(plan, 7, 1, 3, Remove, + EXPECT_ACTION(plan, 8, 1, 3, Remove, output / "explorer" / "%" / "directory-html.metapack", ""); - EXPECT_ACTION(plan, 7, 2, 3, Remove, + EXPECT_ACTION(plan, 8, 2, 3, Remove, output / "explorer" / "foo" / "%" / "schema-html.metapack", ""); EXPECT_TOTAL_FILES( @@ -3891,7 +3897,7 @@ TEST(Build_delta, full_single_schema_nested_path_headless) { sourcemeta::one::BuildPlan::Type::Headless, entries, output, schemas, "1.0.0", false, "", changed, removed)}; - EXPECT_CONSISTENT_PLAN(plan, entries, output, Headless, 8, 17); + EXPECT_CONSISTENT_PLAN(plan, entries, output, Headless, 9, 17); EXPECT_ACTION(plan, 0, 0, 2, Configuration, output / "configuration.json", ""); @@ -3963,10 +3969,7 @@ TEST(Build_delta, full_single_schema_nested_path_headless) { output / "schemas" / "example" / "test" / "%" / "bundle.metapack"); EXPECT_ACTION( - plan, 5, 0, 2, SearchIndex, output / "explorer" / "%" / "search.metapack", - "", output / "explorer" / "example" / "test" / "%" / "schema.metapack"); - EXPECT_ACTION( - plan, 5, 1, 2, DirectoryList, + plan, 5, 0, 1, DirectoryList, output / "explorer" / "example" / "%" / "directory.metapack", "", output / "explorer" / "example" / "test" / "%" / "schema.metapack"); @@ -3974,7 +3977,12 @@ TEST(Build_delta, full_single_schema_nested_path_headless) { output / "explorer" / "%" / "directory.metapack", "", output / "explorer" / "example" / "%" / "directory.metapack"); - EXPECT_ACTION(plan, 7, 0, 1, Routes, output / "routes.bin", "Headless", + EXPECT_ACTION(plan, 7, 0, 1, SearchIndex, + output / "explorer" / "%" / "search.metapack", "", + output / "explorer" / "example" / "%" / "directory.metapack", + output / "explorer" / "%" / "directory.metapack"); + + EXPECT_ACTION(plan, 8, 0, 1, Routes, output / "routes.bin", "Headless", output / "configuration.json"); EXPECT_TOTAL_FILES( @@ -4126,15 +4134,7 @@ TEST(Build_delta, incremental_add_schema_preserves_intermediate_dirs) { output / "schemas" / "example" / "schemas" / "c" / "%" / "bundle.metapack"); - EXPECT_ACTION(plan, 4, 0, 3, SearchIndex, - output / "explorer" / "%" / "search.metapack", "", - output / "explorer" / "example" / "schemas" / "c" / "%" / - "schema.metapack", - output / "explorer" / "example" / "schemas" / "b" / "%" / - "schema.metapack", - output / "explorer" / "example" / "schemas" / "a" / "%" / - "schema.metapack"); - EXPECT_ACTION_UNORDERED(plan, 4, 1, 3, DirectoryList, + EXPECT_ACTION_UNORDERED(plan, 4, 0, 2, DirectoryList, output / "explorer" / "example" / "schemas" / "%" / "directory.metapack", "", @@ -4144,7 +4144,7 @@ TEST(Build_delta, incremental_add_schema_preserves_intermediate_dirs) { "%" / "schema.metapack", output / "explorer" / "example" / "schemas" / "c" / "%" / "schema.metapack"); - EXPECT_ACTION(plan, 4, 2, 3, WebSchema, + EXPECT_ACTION(plan, 4, 1, 2, WebSchema, output / "explorer" / "example" / "schemas" / "c" / "%" / "schema-html.metapack", "https://example.com/c", @@ -4172,9 +4172,15 @@ TEST(Build_delta, incremental_add_schema_preserves_intermediate_dirs) { output / "explorer" / "example" / "%" / "directory-html.metapack", "", output / "explorer" / "example" / "%" / "directory.metapack"); - EXPECT_ACTION(plan, 7, 0, 1, WebIndex, + EXPECT_ACTION(plan, 7, 0, 2, WebIndex, output / "explorer" / "%" / "directory-html.metapack", "", output / "explorer" / "%" / "directory.metapack"); + EXPECT_ACTION(plan, 7, 1, 2, SearchIndex, + output / "explorer" / "%" / "search.metapack", "", + output / "explorer" / "example" / "schemas" / "%" / + "directory.metapack", + output / "explorer" / "example" / "%" / "directory.metapack", + output / "explorer" / "%" / "directory.metapack"); EXPECT_TOTAL_FILES( plan, entries, output / "version.json", output / "configuration.json", @@ -4349,24 +4355,23 @@ TEST(Build_delta, incremental_directory_listing_includes_unchanged_siblings) { output / "schemas" / "foo" / "%" / "bundle.metapack"); // The directory list must depend on BOTH foo AND bar - EXPECT_ACTION_UNORDERED(plan, 4, 0, 3, DirectoryList, + EXPECT_ACTION_UNORDERED(plan, 4, 0, 2, DirectoryList, output / "explorer" / "%" / "directory.metapack", "", output / "explorer" / "foo" / "%" / "schema.metapack", output / "explorer" / "bar" / "%" / "schema.metapack"); - EXPECT_ACTION_UNORDERED( - plan, 4, 1, 3, SearchIndex, output / "explorer" / "%" / "search.metapack", - "", output / "explorer" / "foo" / "%" / "schema.metapack", - output / "explorer" / "bar" / "%" / "schema.metapack"); - EXPECT_ACTION(plan, 4, 2, 3, WebSchema, + EXPECT_ACTION(plan, 4, 1, 2, WebSchema, output / "explorer" / "foo" / "%" / "schema-html.metapack", "https://example.com/foo", output / "explorer" / "foo" / "%" / "schema.metapack", output / "schemas" / "foo" / "%" / "health.metapack"); - EXPECT_ACTION(plan, 5, 0, 1, WebIndex, + EXPECT_ACTION(plan, 5, 0, 2, WebIndex, output / "explorer" / "%" / "directory-html.metapack", "", output / "explorer" / "%" / "directory.metapack"); + EXPECT_ACTION(plan, 5, 1, 2, SearchIndex, + output / "explorer" / "%" / "search.metapack", "", + output / "explorer" / "%" / "directory.metapack"); EXPECT_TOTAL_FILES( plan, entries, output / "version.json", output / "configuration.json", @@ -4490,25 +4495,23 @@ TEST(Build_delta, incremental_add_schema_rebuilds_all_dependents) { "https://example.com/c", output / "schemas" / "c" / "%" / "bundle.metapack"); - EXPECT_ACTION_UNORDERED(plan, 4, 0, 3, DirectoryList, + EXPECT_ACTION_UNORDERED(plan, 4, 0, 2, DirectoryList, output / "explorer" / "%" / "directory.metapack", "", output / "explorer" / "a" / "%" / "schema.metapack", output / "explorer" / "b" / "%" / "schema.metapack", output / "explorer" / "c" / "%" / "schema.metapack"); - EXPECT_ACTION_UNORDERED(plan, 4, 1, 3, SearchIndex, - output / "explorer" / "%" / "search.metapack", "", - output / "explorer" / "a" / "%" / "schema.metapack", - output / "explorer" / "b" / "%" / "schema.metapack", - output / "explorer" / "c" / "%" / "schema.metapack"); - EXPECT_ACTION(plan, 4, 2, 3, WebSchema, + EXPECT_ACTION(plan, 4, 1, 2, WebSchema, output / "explorer" / "c" / "%" / "schema-html.metapack", "https://example.com/c", output / "explorer" / "c" / "%" / "schema.metapack", output / "schemas" / "c" / "%" / "health.metapack"); - EXPECT_ACTION(plan, 5, 0, 1, WebIndex, + EXPECT_ACTION(plan, 5, 0, 2, WebIndex, output / "explorer" / "%" / "directory-html.metapack", "", output / "explorer" / "%" / "directory.metapack"); + EXPECT_ACTION(plan, 5, 1, 2, SearchIndex, + output / "explorer" / "%" / "search.metapack", "", + output / "explorer" / "%" / "directory.metapack"); EXPECT_TOTAL_FILES( plan, entries, output / "version.json", output / "configuration.json",