From 57320a260a25a818d99b145232d4a5ab1b53a13e Mon Sep 17 00:00:00 2001 From: Juan Cruz Viotti Date: Wed, 4 Mar 2026 10:04:03 -0400 Subject: [PATCH] [WIP] Experiment with a single `deps.json` file Signed-off-by: Juan Cruz Viotti --- src/build/adapter_filesystem.cc | 203 ++++++++++++------ .../sourcemeta/one/build_adapter_filesystem.h | 10 +- src/index/index.cc | 40 ++-- src/index/output.h | 5 +- test/cli/index/common/camelcase-filename.sh | 18 +- .../index/common/collection-path-is-file.sh | 5 +- test/cli/index/common/deps-contents.sh | 111 ++++------ test/cli/index/common/encoded-percentage.sh | 19 +- .../index/common/file-and-directory-clash.sh | 31 +-- test/cli/index/common/index-html-filename.sh | 18 +- test/cli/index/common/manifest-default.sh | 22 +- test/cli/index/common/manifest-empty.sh | 7 +- test/cli/index/common/manifest-headless.sh | 18 +- test/cli/index/common/no-base-uri.sh | 24 +-- test/cli/index/common/no-evaluate.sh | 16 +- test/cli/index/common/no-id.sh | 18 +- .../non-existent-collection-directory.sh | 5 +- test/cli/index/common/period-filename.sh | 18 +- test/cli/index/common/rebuild-cache.sh | 24 ++- test/cli/index/common/rebuild-deleted-deps.sh | 48 +---- test/cli/index/common/rebuild-one-to-zero.sh | 29 +-- test/cli/index/common/rebuild-to-empty.sh | 7 +- test/cli/index/common/rebuild-two-to-three.sh | 50 +---- test/cli/index/common/rebuild-zero-to-one.sh | 29 +-- test/cli/index/common/schema-extension.sh | 30 +-- .../index/common/string-directory-overlap.sh | 31 +-- test/cli/index/common/version-filename.sh | 18 +- test/cli/index/common/version-path.sh | 18 +- test/cli/index/common/yaml-schemas.sh | 30 +-- .../build/build_adapter_filesystem_test.cc | 33 +-- test/unit/build/deps_stub_1.json.deps | 2 - 31 files changed, 274 insertions(+), 663 deletions(-) delete mode 100644 test/unit/build/deps_stub_1.json.deps diff --git a/src/build/adapter_filesystem.cc b/src/build/adapter_filesystem.cc index f019100b8..3d72e1983 100644 --- a/src/build/adapter_filesystem.cc +++ b/src/build/adapter_filesystem.cc @@ -3,79 +3,118 @@ #include #include // assert +#include // std::chrono::nanoseconds, std::chrono::duration_cast +#include // std::int64_t #include // std::ofstream, std::ifstream #include // std::unique_lock #include // std::string #include // std::string_view -namespace sourcemeta::one { +static constexpr std::string_view DEPENDENCIES_FILE{"deps.txt"}; -constexpr std::string_view DEPENDENCIES_EXTENSION{".deps"}; +namespace sourcemeta::one { BuildAdapterFilesystem::BuildAdapterFilesystem( const std::filesystem::path &output_root) - : root{std::filesystem::canonical(output_root)} {} - -auto BuildAdapterFilesystem::dependencies_path(const node_type &path) const - -> node_type { - assert(path.is_absolute()); - return path.string() + std::string{DEPENDENCIES_EXTENSION}; -} - -auto BuildAdapterFilesystem::read_dependencies(const node_type &path) const - -> std::optional> { - assert(path.is_absolute()); - const auto dependencies_path{this->dependencies_path(path)}; - - std::ifstream stream{dependencies_path}; - if (!stream.is_open()) { - return std::nullopt; + : root{std::filesystem::canonical(output_root)} { + const auto deps_path{this->root / DEPENDENCIES_FILE}; + if (!std::filesystem::exists(deps_path)) { + return; } - std::string contents{std::istreambuf_iterator(stream), - std::istreambuf_iterator()}; - - BuildDependencies result; - std::size_t position{0}; - while (position < contents.size()) { - auto newline{contents.find('\n', position)}; - if (newline == std::string::npos) { - newline = contents.size(); + try { + std::ifstream stream{deps_path}; + if (!stream.is_open()) { + return; } - auto end{newline}; - // Prevent CRLF on Windows - if (end > position && contents[end - 1] == '\r') { - end -= 1; - } + std::string contents{std::istreambuf_iterator(stream), + std::istreambuf_iterator()}; - if (end > position) { - auto kind{BuildDependencyKind::Static}; - std::filesystem::path dependency; - const auto length{end - position}; - if (length >= 2 && contents[position + 1] == ' ' && - (contents[position] == 's' || contents[position] == 'd')) { - kind = (contents[position] == 'd') ? BuildDependencyKind::Dynamic - : BuildDependencyKind::Static; - dependency = contents.substr(position + 2, end - position - 2); - } else { - dependency = contents.substr(position, length); + std::string current_key; + BuildDependencies current_deps; + std::size_t position{0}; + + while (position < contents.size()) { + auto newline{contents.find('\n', position)}; + if (newline == std::string::npos) { + newline = contents.size(); + } + + if (newline <= position + 2 || contents[position + 1] != ' ') { + position = newline + 1; + continue; } - if (!dependency.is_absolute()) { - dependency = (this->root / dependency).lexically_normal(); + + const char tag{contents[position]}; + const std::string_view value{contents.data() + position + 2, + newline - position - 2}; + + switch (tag) { + case 't': + if (!current_key.empty()) { + this->dependencies_map.insert_or_assign(current_key, + std::move(current_deps)); + current_deps = {}; + } + + current_key = value; + break; + case 's': + current_deps.emplace_back( + BuildDependencyKind::Static, + (this->root / std::string{value}).lexically_normal()); + break; + case 'd': + current_deps.emplace_back( + BuildDependencyKind::Dynamic, + (this->root / std::string{value}).lexically_normal()); + break; + case 'm': { + const auto space{value.find(' ')}; + if (space != std::string_view::npos) { + const auto path_part{value.substr(0, space)}; + const auto ns_part{value.substr(space + 1)}; + const std::chrono::nanoseconds nanoseconds{ + std::stoll(std::string{ns_part})}; + const auto mark_value{mark_type{ + std::chrono::duration_cast(nanoseconds)}}; + this->marks.insert_or_assign( + (this->root / std::string{path_part}).lexically_normal(), + mark_value); + } + + break; + } + default: + break; } - result.emplace_back(kind, std::move(dependency)); + position = newline + 1; } - position = newline + 1; + if (!current_key.empty()) { + this->dependencies_map.insert_or_assign(current_key, + std::move(current_deps)); + } + this->has_previous_run = true; + } catch (...) { + this->dependencies_map.clear(); + this->marks.clear(); } +} - if (result.empty()) { +auto BuildAdapterFilesystem::read_dependencies(const node_type &path) const + -> std::optional> { + assert(path.is_absolute()); + const auto key{path.lexically_relative(this->root).string()}; + std::shared_lock lock{this->dependencies_mutex}; + const auto match{this->dependencies_map.find(key)}; + if (match == this->dependencies_map.end() || match->second.empty()) { return std::nullopt; - } else { - return result; } + + return match->second; } auto BuildAdapterFilesystem::write_dependencies( @@ -83,27 +122,51 @@ auto BuildAdapterFilesystem::write_dependencies( -> void { assert(path.is_absolute()); assert(std::filesystem::exists(path)); - // Try to make sure as much as we can that any write operation made to disk sourcemeta::core::flush(path); this->refresh(path); - const auto dependencies_path{this->dependencies_path(path)}; - std::filesystem::create_directories(dependencies_path.parent_path()); - std::ofstream dependencies_stream{dependencies_path}; - assert(!dependencies_stream.fail()); - for (const auto &dependency : dependencies) { - const auto prefix{dependency.first == BuildDependencyKind::Dynamic ? "d " - : "s "}; - const auto relative{dependency.second.lexically_relative(this->root)}; + const auto key{path.lexically_relative(this->root).string()}; + std::unique_lock lock{this->dependencies_mutex}; + this->dependencies_map.insert_or_assign(key, dependencies); +} + +auto BuildAdapterFilesystem::flush_dependencies( + const std::function &filter) -> void { + const auto deps_path{this->root / DEPENDENCIES_FILE}; + std::ofstream stream{deps_path}; + assert(!stream.fail()); + + for (const auto &entry : this->dependencies_map) { + if (!filter(this->root / entry.first)) { + continue; + } + + stream << "t " << entry.first << '\n'; + for (const auto &dependency : entry.second) { + const char kind_char{ + dependency.first == BuildDependencyKind::Dynamic ? 'd' : 's'}; + const auto relative{dependency.second.lexically_relative(this->root)}; + if (!relative.empty() && *relative.begin() != "..") { + stream << kind_char << ' ' << relative.string() << '\n'; + } else { + stream << kind_char << ' ' << dependency.second.string() << '\n'; + } + } + } + + for (const auto &entry : this->marks) { + const auto relative{entry.first.lexically_relative(this->root)}; if (!relative.empty() && *relative.begin() != "..") { - dependencies_stream << prefix << relative.string() << "\n"; - } else { - dependencies_stream << prefix << dependency.second.string() << "\n"; + const auto nanoseconds{ + std::chrono::duration_cast( + entry.second.time_since_epoch()) + .count()}; + stream << "m " << relative.string() << ' ' + << static_cast(nanoseconds) << '\n'; } } - dependencies_stream.flush(); - dependencies_stream.close(); - sourcemeta::core::flush(dependencies_path); + stream.flush(); + stream.close(); } auto BuildAdapterFilesystem::refresh(const node_type &path) -> void { @@ -129,11 +192,15 @@ auto BuildAdapterFilesystem::mark(const node_type &path) } } + // Output files should always have their marks cached + // Only input files or new output files are not + assert(!this->has_previous_run || + !path.string().starts_with(this->root.string()) || + !std::filesystem::exists(path)); + try { const auto value{std::filesystem::last_write_time(path)}; - // Within a single run, if we didn't build this file, its mtime won't - // change. If we did build it, refreshing already set a synthetic timestamp - // that the cache lookup above would have returned instead + // Cache for the rest of this run since input files don't change std::unique_lock lock{this->mutex}; this->marks.emplace(path, value); return value; diff --git a/src/build/include/sourcemeta/one/build_adapter_filesystem.h b/src/build/include/sourcemeta/one/build_adapter_filesystem.h index 51709cda9..04db54cda 100644 --- a/src/build/include/sourcemeta/one/build_adapter_filesystem.h +++ b/src/build/include/sourcemeta/one/build_adapter_filesystem.h @@ -10,8 +10,10 @@ // NOLINTEND(misc-include-cleaner) #include // std::filesystem +#include // std::function #include // std::optional #include // std::shared_mutex +#include // std::string #include // std::unordered_map namespace sourcemeta::one { @@ -23,13 +25,13 @@ class SOURCEMETA_ONE_BUILD_EXPORT BuildAdapterFilesystem { BuildAdapterFilesystem(const std::filesystem::path &output_root); - [[nodiscard]] auto dependencies_path(const node_type &path) const - -> node_type; [[nodiscard]] auto read_dependencies(const node_type &path) const -> std::optional>; auto write_dependencies(const node_type &path, const BuildDependencies &dependencies) -> void; + auto flush_dependencies(const std::function &filter) + -> void; auto refresh(const node_type &path) -> void; [[nodiscard]] auto mark(const node_type &path) -> std::optional; [[nodiscard]] auto is_newer_than(const mark_type left, @@ -39,6 +41,10 @@ class SOURCEMETA_ONE_BUILD_EXPORT BuildAdapterFilesystem { std::filesystem::path root; std::unordered_map marks; std::shared_mutex mutex; + std::unordered_map> + dependencies_map; + mutable std::shared_mutex dependencies_mutex; + bool has_previous_run{false}; }; } // namespace sourcemeta::one diff --git a/src/index/index.cc b/src/index/index.cc index 6dbef25e9..c6c2bdb32 100644 --- a/src/index/index.cc +++ b/src/index/index.cc @@ -94,7 +94,6 @@ DISPATCH(const std::filesystem::path &destination, // We need to mark files regardless of whether they were generated or not output.track(destination); - output.track(destination.string() + ".deps"); return was_built; } @@ -193,12 +192,17 @@ static auto index_main(const std::string_view &program, // (6) Store a mark of the One version for target dependencies ///////////////////////////////////////////////////////////////////////////// + sourcemeta::one::BuildAdapterFilesystem adapter{output.path()}; + // We do this so that targets can be re-built if the One version changes const auto mark_version_path{output.path() / "version.json"}; // Note we only write back if the content changed in order to not accidentally // bump up the file modified time - output.write_json_if_different( - mark_version_path, sourcemeta::core::JSON{sourcemeta::one::version()}); + if (output.write_json_if_different( + mark_version_path, + sourcemeta::core::JSON{sourcemeta::one::version()})) { + adapter.refresh(mark_version_path); + }; ///////////////////////////////////////////////////////////////////////////// // (7) Store the full configuration file for target dependencies @@ -209,17 +213,21 @@ static auto index_main(const std::string_view &program, const auto mark_configuration_path{output.path() / "configuration.json"}; // Note we only write back if the content changed in order to not accidentally // bump up the file modified time - output.write_json_if_different(mark_configuration_path, raw_configuration); + if (output.write_json_if_different(mark_configuration_path, + raw_configuration)) { + adapter.refresh(mark_configuration_path); + } ///////////////////////////////////////////////////////////////////////////// // (8) Store the optional comment for informational purposes ///////////////////////////////////////////////////////////////////////////// - if (app.contains("comment")) { - const auto comment_path{output.path() / "comment.json"}; - output.write_json_if_different( - comment_path, - sourcemeta::core::JSON{std::string{app.at("comment").at(0)}}); + const auto comment_path{output.path() / "comment.json"}; + if (app.contains("comment") && + output.write_json_if_different( + comment_path, + sourcemeta::core::JSON{std::string{app.at("comment").at(0)}})) { + adapter.refresh(comment_path); } PROFILE_END(profiling, "Startup"); @@ -309,7 +317,6 @@ static auto index_main(const std::string_view &program, const auto schemas_path{output.path() / "schemas"}; const auto display_schemas_path{ std::filesystem::relative(schemas_path, output.path())}; - sourcemeta::one::BuildAdapterFilesystem adapter{output.path()}; sourcemeta::core::parallel_for_each( resolver.begin(), resolver.end(), [&output, &schemas_path, &resolver, &mutex, &adapter, @@ -322,8 +329,6 @@ static auto index_main(const std::string_view &program, DISPATCH( destination, {sourcemeta::one::make_dependency(schema.second.path), - // This target depends on the configuration file given things like - // resolve maps and base URIs sourcemeta::one::make_dependency(mark_configuration_path), sourcemeta::one::make_dependency(mark_version_path)}, {schema.first, resolver}, mutex, "Ingesting", schema.first, @@ -573,15 +578,14 @@ static auto index_main(const std::string_view &program, for (const auto &schema : resolver) { auto dependents_path{schemas_path / schema.second.relative_path / SENTINEL / "dependents.metapack"}; - const auto dependents_deps_path{dependents_path.string() + ".deps"}; if (affected_dependents.contains(schema.first) || !std::filesystem::exists(dependents_path) || - !std::filesystem::exists(dependents_deps_path)) { + // TODO: This is potentially pretty slow? + !adapter.read_dependencies(dependents_path).has_value()) { rework_entries.push_back( {std::cref(schema.first), std::move(dependents_path)}); } else { output.track(dependents_path); - output.track(dependents_path.string() + ".deps"); } } @@ -792,6 +796,12 @@ static auto index_main(const std::string_view &program, // TODO: Print the size of the output directory here + // TODO: This level of coupling means that the output and the adapter should + // be one + adapter.flush_dependencies([&output](const auto &target) { + return !output.is_untracked_file(target); + }); + output.track(output.path() / "deps.txt"); output.remove_unknown_files(); PROFILE_END(profiling, "Cleanup"); diff --git a/src/index/output.h b/src/index/output.h index 62e97874c..635c04d9f 100644 --- a/src/index/output.h +++ b/src/index/output.h @@ -41,16 +41,19 @@ class Output { auto path() const -> const std::filesystem::path & { return this->path_; } auto write_json_if_different(const std::filesystem::path &path, - const sourcemeta::core::JSON &document) -> void { + const sourcemeta::core::JSON &document) -> bool { if (std::filesystem::exists(path)) { const auto current{sourcemeta::core::read_json(path)}; if (current != document) { this->write_json(path, document); + return true; } else { this->track(path); + return false; } } else { this->write_json(path, document); + return true; } } diff --git a/test/cli/index/common/camelcase-filename.sh b/test/cli/index/common/camelcase-filename.sh index a05eb69c9..b32bfe825 100755 --- a/test/cli/index/common/camelcase-filename.sh +++ b/test/cli/index/common/camelcase-filename.sh @@ -38,49 +38,33 @@ cd - > /dev/null cat << 'EOF' > "$TMP/expected.txt" ./configuration.json ./dependency-tree.metapack -./dependency-tree.metapack.deps +./deps.txt ./explorer ./explorer/% ./explorer/%/directory.metapack -./explorer/%/directory.metapack.deps ./explorer/%/search.metapack -./explorer/%/search.metapack.deps ./explorer/example ./explorer/example/% ./explorer/example/%/directory.metapack -./explorer/example/%/directory.metapack.deps ./explorer/example/camelcase ./explorer/example/camelcase/% ./explorer/example/camelcase/%/schema.metapack -./explorer/example/camelcase/%/schema.metapack.deps ./routes.bin -./routes.bin.deps ./schemas ./schemas/example ./schemas/example/camelcase ./schemas/example/camelcase/% ./schemas/example/camelcase/%/blaze-exhaustive.metapack -./schemas/example/camelcase/%/blaze-exhaustive.metapack.deps ./schemas/example/camelcase/%/blaze-fast.metapack -./schemas/example/camelcase/%/blaze-fast.metapack.deps ./schemas/example/camelcase/%/bundle.metapack -./schemas/example/camelcase/%/bundle.metapack.deps ./schemas/example/camelcase/%/dependencies.metapack -./schemas/example/camelcase/%/dependencies.metapack.deps ./schemas/example/camelcase/%/dependents.metapack -./schemas/example/camelcase/%/dependents.metapack.deps ./schemas/example/camelcase/%/editor.metapack -./schemas/example/camelcase/%/editor.metapack.deps ./schemas/example/camelcase/%/health.metapack -./schemas/example/camelcase/%/health.metapack.deps ./schemas/example/camelcase/%/locations.metapack -./schemas/example/camelcase/%/locations.metapack.deps ./schemas/example/camelcase/%/positions.metapack -./schemas/example/camelcase/%/positions.metapack.deps ./schemas/example/camelcase/%/schema.metapack -./schemas/example/camelcase/%/schema.metapack.deps ./schemas/example/camelcase/%/stats.metapack -./schemas/example/camelcase/%/stats.metapack.deps ./version.json EOF diff --git a/test/cli/index/common/collection-path-is-file.sh b/test/cli/index/common/collection-path-is-file.sh index 7da335b50..ea59a810c 100755 --- a/test/cli/index/common/collection-path-is-file.sh +++ b/test/cli/index/common/collection-path-is-file.sh @@ -31,15 +31,12 @@ cd - > /dev/null cat << 'EOF' > "$TMP/expected.txt" ./configuration.json ./dependency-tree.metapack -./dependency-tree.metapack.deps +./deps.txt ./explorer ./explorer/% ./explorer/%/directory.metapack -./explorer/%/directory.metapack.deps ./explorer/%/search.metapack -./explorer/%/search.metapack.deps ./routes.bin -./routes.bin.deps ./version.json EOF diff --git a/test/cli/index/common/deps-contents.sh b/test/cli/index/common/deps-contents.sh index df389c573..d3960a5fd 100755 --- a/test/cli/index/common/deps-contents.sh +++ b/test/cli/index/common/deps-contents.sh @@ -31,73 +31,52 @@ EOF "$1" "$TMP/one.json" "$TMP/output" > /dev/null 2>&1 -REAL="$(realpath "$TMP")" +test -f "$TMP/output/deps.txt" +awk '/^t /{target=substr($0,3)} /^[sd] /{print target "|" $0}' \ + "$TMP/output/deps.txt" | sed "s|$(realpath "$TMP")|REAL|g" \ + | LC_ALL=C sort > "$TMP/deps.txt" -cd "$TMP/output" -find . -name "*.deps" -type f | LC_ALL=C sort | while read -r deps_file; do - echo "--- $deps_file" - LC_ALL=C sort "$deps_file" -done > "$TMP/deps.txt" -cd - > /dev/null - -cat << EOF > "$TMP/expected.txt" ---- ./dependency-tree.metapack.deps -s schemas/example/test/%/dependencies.metapack ---- ./explorer/%/directory.metapack.deps -d explorer/example/%/directory.metapack -s configuration.json -s explorer/example/%/directory.metapack -s version.json ---- ./explorer/%/search.metapack.deps -s explorer/example/test/%/schema.metapack ---- ./explorer/example/%/directory.metapack.deps -s configuration.json -s explorer/example/test/%/schema.metapack -s version.json ---- ./explorer/example/test/%/schema.metapack.deps -s configuration.json -s schemas/example/test/%/dependencies.metapack -s schemas/example/test/%/health.metapack -s schemas/example/test/%/schema.metapack -s version.json ---- ./routes.bin.deps -s configuration.json -s version.json ---- ./schemas/example/test/%/blaze-exhaustive.metapack.deps -s schemas/example/test/%/bundle.metapack -s version.json ---- ./schemas/example/test/%/blaze-fast.metapack.deps -s schemas/example/test/%/bundle.metapack -s version.json ---- ./schemas/example/test/%/bundle.metapack.deps -s schemas/example/test/%/dependencies.metapack -s schemas/example/test/%/schema.metapack -s version.json ---- ./schemas/example/test/%/dependencies.metapack.deps -s schemas/example/test/%/schema.metapack -s version.json ---- ./schemas/example/test/%/dependents.metapack.deps -s dependency-tree.metapack ---- ./schemas/example/test/%/editor.metapack.deps -s schemas/example/test/%/bundle.metapack -s version.json ---- ./schemas/example/test/%/health.metapack.deps -s schemas/example/test/%/dependencies.metapack -s schemas/example/test/%/schema.metapack -s version.json ---- ./schemas/example/test/%/locations.metapack.deps -s schemas/example/test/%/schema.metapack -s version.json ---- ./schemas/example/test/%/positions.metapack.deps -s schemas/example/test/%/schema.metapack -s version.json ---- ./schemas/example/test/%/schema.metapack.deps -s $REAL/schemas/test.json -s configuration.json -s version.json ---- ./schemas/example/test/%/stats.metapack.deps -s schemas/example/test/%/schema.metapack -s version.json +cat << 'EOF' > "$TMP/expected.txt" +dependency-tree.metapack|s schemas/example/test/%/dependencies.metapack +explorer/%/directory.metapack|d explorer/example/%/directory.metapack +explorer/%/directory.metapack|s configuration.json +explorer/%/directory.metapack|s explorer/example/%/directory.metapack +explorer/%/directory.metapack|s version.json +explorer/%/search.metapack|s explorer/example/test/%/schema.metapack +explorer/example/%/directory.metapack|s configuration.json +explorer/example/%/directory.metapack|s explorer/example/test/%/schema.metapack +explorer/example/%/directory.metapack|s version.json +explorer/example/test/%/schema.metapack|s configuration.json +explorer/example/test/%/schema.metapack|s schemas/example/test/%/dependencies.metapack +explorer/example/test/%/schema.metapack|s schemas/example/test/%/health.metapack +explorer/example/test/%/schema.metapack|s schemas/example/test/%/schema.metapack +explorer/example/test/%/schema.metapack|s version.json +routes.bin|s configuration.json +routes.bin|s version.json +schemas/example/test/%/blaze-exhaustive.metapack|s schemas/example/test/%/bundle.metapack +schemas/example/test/%/blaze-exhaustive.metapack|s version.json +schemas/example/test/%/blaze-fast.metapack|s schemas/example/test/%/bundle.metapack +schemas/example/test/%/blaze-fast.metapack|s version.json +schemas/example/test/%/bundle.metapack|s schemas/example/test/%/dependencies.metapack +schemas/example/test/%/bundle.metapack|s schemas/example/test/%/schema.metapack +schemas/example/test/%/bundle.metapack|s version.json +schemas/example/test/%/dependencies.metapack|s schemas/example/test/%/schema.metapack +schemas/example/test/%/dependencies.metapack|s version.json +schemas/example/test/%/dependents.metapack|s dependency-tree.metapack +schemas/example/test/%/editor.metapack|s schemas/example/test/%/bundle.metapack +schemas/example/test/%/editor.metapack|s version.json +schemas/example/test/%/health.metapack|s schemas/example/test/%/dependencies.metapack +schemas/example/test/%/health.metapack|s schemas/example/test/%/schema.metapack +schemas/example/test/%/health.metapack|s version.json +schemas/example/test/%/locations.metapack|s schemas/example/test/%/schema.metapack +schemas/example/test/%/locations.metapack|s version.json +schemas/example/test/%/positions.metapack|s schemas/example/test/%/schema.metapack +schemas/example/test/%/positions.metapack|s version.json +schemas/example/test/%/schema.metapack|s REAL/schemas/test.json +schemas/example/test/%/schema.metapack|s configuration.json +schemas/example/test/%/schema.metapack|s version.json +schemas/example/test/%/stats.metapack|s schemas/example/test/%/schema.metapack +schemas/example/test/%/stats.metapack|s version.json EOF diff "$TMP/deps.txt" "$TMP/expected.txt" diff --git a/test/cli/index/common/encoded-percentage.sh b/test/cli/index/common/encoded-percentage.sh index 69cb87c42..a68386249 100755 --- a/test/cli/index/common/encoded-percentage.sh +++ b/test/cli/index/common/encoded-percentage.sh @@ -38,54 +38,37 @@ cd - > /dev/null cat << 'EOF' > "$TMP/expected.txt" ./configuration.json ./dependency-tree.metapack -./dependency-tree.metapack.deps +./deps.txt ./explorer ./explorer/% ./explorer/%/directory.metapack -./explorer/%/directory.metapack.deps ./explorer/%/search.metapack -./explorer/%/search.metapack.deps ./explorer/example ./explorer/example/% ./explorer/example/%/directory.metapack -./explorer/example/%/directory.metapack.deps ./explorer/example/%25 ./explorer/example/%25/% ./explorer/example/%25/%/directory.metapack -./explorer/example/%25/%/directory.metapack.deps ./explorer/example/%25/test ./explorer/example/%25/test/% ./explorer/example/%25/test/%/schema.metapack -./explorer/example/%25/test/%/schema.metapack.deps ./routes.bin -./routes.bin.deps ./schemas ./schemas/example ./schemas/example/%25 ./schemas/example/%25/test ./schemas/example/%25/test/% ./schemas/example/%25/test/%/blaze-exhaustive.metapack -./schemas/example/%25/test/%/blaze-exhaustive.metapack.deps ./schemas/example/%25/test/%/blaze-fast.metapack -./schemas/example/%25/test/%/blaze-fast.metapack.deps ./schemas/example/%25/test/%/bundle.metapack -./schemas/example/%25/test/%/bundle.metapack.deps ./schemas/example/%25/test/%/dependencies.metapack -./schemas/example/%25/test/%/dependencies.metapack.deps ./schemas/example/%25/test/%/dependents.metapack -./schemas/example/%25/test/%/dependents.metapack.deps ./schemas/example/%25/test/%/editor.metapack -./schemas/example/%25/test/%/editor.metapack.deps ./schemas/example/%25/test/%/health.metapack -./schemas/example/%25/test/%/health.metapack.deps ./schemas/example/%25/test/%/locations.metapack -./schemas/example/%25/test/%/locations.metapack.deps ./schemas/example/%25/test/%/positions.metapack -./schemas/example/%25/test/%/positions.metapack.deps ./schemas/example/%25/test/%/schema.metapack -./schemas/example/%25/test/%/schema.metapack.deps ./schemas/example/%25/test/%/stats.metapack -./schemas/example/%25/test/%/stats.metapack.deps ./version.json EOF diff --git a/test/cli/index/common/file-and-directory-clash.sh b/test/cli/index/common/file-and-directory-clash.sh index 76d64c762..a6592506d 100755 --- a/test/cli/index/common/file-and-directory-clash.sh +++ b/test/cli/index/common/file-and-directory-clash.sh @@ -45,79 +45,50 @@ cd - > /dev/null cat << 'EOF' > "$TMP/expected.txt" ./configuration.json ./dependency-tree.metapack -./dependency-tree.metapack.deps +./deps.txt ./explorer ./explorer/% ./explorer/%/directory.metapack -./explorer/%/directory.metapack.deps ./explorer/%/search.metapack -./explorer/%/search.metapack.deps ./explorer/example ./explorer/example/% ./explorer/example/%/directory.metapack -./explorer/example/%/directory.metapack.deps ./explorer/example/foo ./explorer/example/foo/% ./explorer/example/foo/%/directory.metapack -./explorer/example/foo/%/directory.metapack.deps ./explorer/example/foo/%/schema.metapack -./explorer/example/foo/%/schema.metapack.deps ./explorer/example/foo/bar ./explorer/example/foo/bar/% ./explorer/example/foo/bar/%/schema.metapack -./explorer/example/foo/bar/%/schema.metapack.deps ./routes.bin -./routes.bin.deps ./schemas ./schemas/example ./schemas/example/foo ./schemas/example/foo/% ./schemas/example/foo/%/blaze-exhaustive.metapack -./schemas/example/foo/%/blaze-exhaustive.metapack.deps ./schemas/example/foo/%/blaze-fast.metapack -./schemas/example/foo/%/blaze-fast.metapack.deps ./schemas/example/foo/%/bundle.metapack -./schemas/example/foo/%/bundle.metapack.deps ./schemas/example/foo/%/dependencies.metapack -./schemas/example/foo/%/dependencies.metapack.deps ./schemas/example/foo/%/dependents.metapack -./schemas/example/foo/%/dependents.metapack.deps ./schemas/example/foo/%/editor.metapack -./schemas/example/foo/%/editor.metapack.deps ./schemas/example/foo/%/health.metapack -./schemas/example/foo/%/health.metapack.deps ./schemas/example/foo/%/locations.metapack -./schemas/example/foo/%/locations.metapack.deps ./schemas/example/foo/%/positions.metapack -./schemas/example/foo/%/positions.metapack.deps ./schemas/example/foo/%/schema.metapack -./schemas/example/foo/%/schema.metapack.deps ./schemas/example/foo/%/stats.metapack -./schemas/example/foo/%/stats.metapack.deps ./schemas/example/foo/bar ./schemas/example/foo/bar/% ./schemas/example/foo/bar/%/blaze-exhaustive.metapack -./schemas/example/foo/bar/%/blaze-exhaustive.metapack.deps ./schemas/example/foo/bar/%/blaze-fast.metapack -./schemas/example/foo/bar/%/blaze-fast.metapack.deps ./schemas/example/foo/bar/%/bundle.metapack -./schemas/example/foo/bar/%/bundle.metapack.deps ./schemas/example/foo/bar/%/dependencies.metapack -./schemas/example/foo/bar/%/dependencies.metapack.deps ./schemas/example/foo/bar/%/dependents.metapack -./schemas/example/foo/bar/%/dependents.metapack.deps ./schemas/example/foo/bar/%/editor.metapack -./schemas/example/foo/bar/%/editor.metapack.deps ./schemas/example/foo/bar/%/health.metapack -./schemas/example/foo/bar/%/health.metapack.deps ./schemas/example/foo/bar/%/locations.metapack -./schemas/example/foo/bar/%/locations.metapack.deps ./schemas/example/foo/bar/%/positions.metapack -./schemas/example/foo/bar/%/positions.metapack.deps ./schemas/example/foo/bar/%/schema.metapack -./schemas/example/foo/bar/%/schema.metapack.deps ./schemas/example/foo/bar/%/stats.metapack -./schemas/example/foo/bar/%/stats.metapack.deps ./version.json EOF diff --git a/test/cli/index/common/index-html-filename.sh b/test/cli/index/common/index-html-filename.sh index 768eb350b..d7f036651 100755 --- a/test/cli/index/common/index-html-filename.sh +++ b/test/cli/index/common/index-html-filename.sh @@ -38,49 +38,33 @@ cd - > /dev/null cat << 'EOF' > "$TMP/expected.txt" ./configuration.json ./dependency-tree.metapack -./dependency-tree.metapack.deps +./deps.txt ./explorer ./explorer/% ./explorer/%/directory.metapack -./explorer/%/directory.metapack.deps ./explorer/%/search.metapack -./explorer/%/search.metapack.deps ./explorer/example ./explorer/example/% ./explorer/example/%/directory.metapack -./explorer/example/%/directory.metapack.deps ./explorer/example/index.html ./explorer/example/index.html/% ./explorer/example/index.html/%/schema.metapack -./explorer/example/index.html/%/schema.metapack.deps ./routes.bin -./routes.bin.deps ./schemas ./schemas/example ./schemas/example/index.html ./schemas/example/index.html/% ./schemas/example/index.html/%/blaze-exhaustive.metapack -./schemas/example/index.html/%/blaze-exhaustive.metapack.deps ./schemas/example/index.html/%/blaze-fast.metapack -./schemas/example/index.html/%/blaze-fast.metapack.deps ./schemas/example/index.html/%/bundle.metapack -./schemas/example/index.html/%/bundle.metapack.deps ./schemas/example/index.html/%/dependencies.metapack -./schemas/example/index.html/%/dependencies.metapack.deps ./schemas/example/index.html/%/dependents.metapack -./schemas/example/index.html/%/dependents.metapack.deps ./schemas/example/index.html/%/editor.metapack -./schemas/example/index.html/%/editor.metapack.deps ./schemas/example/index.html/%/health.metapack -./schemas/example/index.html/%/health.metapack.deps ./schemas/example/index.html/%/locations.metapack -./schemas/example/index.html/%/locations.metapack.deps ./schemas/example/index.html/%/positions.metapack -./schemas/example/index.html/%/positions.metapack.deps ./schemas/example/index.html/%/schema.metapack -./schemas/example/index.html/%/schema.metapack.deps ./schemas/example/index.html/%/stats.metapack -./schemas/example/index.html/%/stats.metapack.deps ./version.json EOF diff --git a/test/cli/index/common/manifest-default.sh b/test/cli/index/common/manifest-default.sh index 6e9b2a8de..7fa9c30ed 100755 --- a/test/cli/index/common/manifest-default.sh +++ b/test/cli/index/common/manifest-default.sh @@ -37,57 +37,37 @@ cd - > /dev/null cat << 'EOF' > "$TMP/expected.txt" ./configuration.json ./dependency-tree.metapack -./dependency-tree.metapack.deps +./deps.txt ./explorer ./explorer/% ./explorer/%/404.metapack -./explorer/%/404.metapack.deps ./explorer/%/directory-html.metapack -./explorer/%/directory-html.metapack.deps ./explorer/%/directory.metapack -./explorer/%/directory.metapack.deps ./explorer/%/search.metapack -./explorer/%/search.metapack.deps ./explorer/example ./explorer/example/% ./explorer/example/%/directory-html.metapack -./explorer/example/%/directory-html.metapack.deps ./explorer/example/%/directory.metapack -./explorer/example/%/directory.metapack.deps ./explorer/example/test ./explorer/example/test/% ./explorer/example/test/%/schema-html.metapack -./explorer/example/test/%/schema-html.metapack.deps ./explorer/example/test/%/schema.metapack -./explorer/example/test/%/schema.metapack.deps ./routes.bin -./routes.bin.deps ./schemas ./schemas/example ./schemas/example/test ./schemas/example/test/% ./schemas/example/test/%/blaze-exhaustive.metapack -./schemas/example/test/%/blaze-exhaustive.metapack.deps ./schemas/example/test/%/blaze-fast.metapack -./schemas/example/test/%/blaze-fast.metapack.deps ./schemas/example/test/%/bundle.metapack -./schemas/example/test/%/bundle.metapack.deps ./schemas/example/test/%/dependencies.metapack -./schemas/example/test/%/dependencies.metapack.deps ./schemas/example/test/%/dependents.metapack -./schemas/example/test/%/dependents.metapack.deps ./schemas/example/test/%/editor.metapack -./schemas/example/test/%/editor.metapack.deps ./schemas/example/test/%/health.metapack -./schemas/example/test/%/health.metapack.deps ./schemas/example/test/%/locations.metapack -./schemas/example/test/%/locations.metapack.deps ./schemas/example/test/%/positions.metapack -./schemas/example/test/%/positions.metapack.deps ./schemas/example/test/%/schema.metapack -./schemas/example/test/%/schema.metapack.deps ./schemas/example/test/%/stats.metapack -./schemas/example/test/%/stats.metapack.deps ./version.json EOF diff --git a/test/cli/index/common/manifest-empty.sh b/test/cli/index/common/manifest-empty.sh index 130639cda..fc5ae93f5 100755 --- a/test/cli/index/common/manifest-empty.sh +++ b/test/cli/index/common/manifest-empty.sh @@ -22,19 +22,14 @@ cd - > /dev/null cat << 'EOF' > "$TMP/expected.txt" ./configuration.json ./dependency-tree.metapack -./dependency-tree.metapack.deps +./deps.txt ./explorer ./explorer/% ./explorer/%/404.metapack -./explorer/%/404.metapack.deps ./explorer/%/directory-html.metapack -./explorer/%/directory-html.metapack.deps ./explorer/%/directory.metapack -./explorer/%/directory.metapack.deps ./explorer/%/search.metapack -./explorer/%/search.metapack.deps ./routes.bin -./routes.bin.deps ./version.json EOF diff --git a/test/cli/index/common/manifest-headless.sh b/test/cli/index/common/manifest-headless.sh index 8bd392b4b..f40a2f71a 100755 --- a/test/cli/index/common/manifest-headless.sh +++ b/test/cli/index/common/manifest-headless.sh @@ -38,49 +38,33 @@ cd - > /dev/null cat << 'EOF' > "$TMP/expected.txt" ./configuration.json ./dependency-tree.metapack -./dependency-tree.metapack.deps +./deps.txt ./explorer ./explorer/% ./explorer/%/directory.metapack -./explorer/%/directory.metapack.deps ./explorer/%/search.metapack -./explorer/%/search.metapack.deps ./explorer/example ./explorer/example/% ./explorer/example/%/directory.metapack -./explorer/example/%/directory.metapack.deps ./explorer/example/test ./explorer/example/test/% ./explorer/example/test/%/schema.metapack -./explorer/example/test/%/schema.metapack.deps ./routes.bin -./routes.bin.deps ./schemas ./schemas/example ./schemas/example/test ./schemas/example/test/% ./schemas/example/test/%/blaze-exhaustive.metapack -./schemas/example/test/%/blaze-exhaustive.metapack.deps ./schemas/example/test/%/blaze-fast.metapack -./schemas/example/test/%/blaze-fast.metapack.deps ./schemas/example/test/%/bundle.metapack -./schemas/example/test/%/bundle.metapack.deps ./schemas/example/test/%/dependencies.metapack -./schemas/example/test/%/dependencies.metapack.deps ./schemas/example/test/%/dependents.metapack -./schemas/example/test/%/dependents.metapack.deps ./schemas/example/test/%/editor.metapack -./schemas/example/test/%/editor.metapack.deps ./schemas/example/test/%/health.metapack -./schemas/example/test/%/health.metapack.deps ./schemas/example/test/%/locations.metapack -./schemas/example/test/%/locations.metapack.deps ./schemas/example/test/%/positions.metapack -./schemas/example/test/%/positions.metapack.deps ./schemas/example/test/%/schema.metapack -./schemas/example/test/%/schema.metapack.deps ./schemas/example/test/%/stats.metapack -./schemas/example/test/%/stats.metapack.deps ./version.json EOF diff --git a/test/cli/index/common/no-base-uri.sh b/test/cli/index/common/no-base-uri.sh index 6d7ce74e2..ce22479ec 100755 --- a/test/cli/index/common/no-base-uri.sh +++ b/test/cli/index/common/no-base-uri.sh @@ -42,64 +42,42 @@ cd - > /dev/null cat << 'EOF' > "$TMP/expected.txt" ./configuration.json ./dependency-tree.metapack -./dependency-tree.metapack.deps +./deps.txt ./explorer ./explorer/% ./explorer/%/404.metapack -./explorer/%/404.metapack.deps ./explorer/%/directory-html.metapack -./explorer/%/directory-html.metapack.deps ./explorer/%/directory.metapack -./explorer/%/directory.metapack.deps ./explorer/%/search.metapack -./explorer/%/search.metapack.deps ./explorer/test ./explorer/test/% ./explorer/test/%/directory-html.metapack -./explorer/test/%/directory-html.metapack.deps ./explorer/test/%/directory.metapack -./explorer/test/%/directory.metapack.deps ./explorer/test/schemas ./explorer/test/schemas/% ./explorer/test/schemas/%/directory-html.metapack -./explorer/test/schemas/%/directory-html.metapack.deps ./explorer/test/schemas/%/directory.metapack -./explorer/test/schemas/%/directory.metapack.deps ./explorer/test/schemas/test-1 ./explorer/test/schemas/test-1/% ./explorer/test/schemas/test-1/%/schema-html.metapack -./explorer/test/schemas/test-1/%/schema-html.metapack.deps ./explorer/test/schemas/test-1/%/schema.metapack -./explorer/test/schemas/test-1/%/schema.metapack.deps ./routes.bin -./routes.bin.deps ./schemas ./schemas/test ./schemas/test/schemas ./schemas/test/schemas/test-1 ./schemas/test/schemas/test-1/% ./schemas/test/schemas/test-1/%/blaze-exhaustive.metapack -./schemas/test/schemas/test-1/%/blaze-exhaustive.metapack.deps ./schemas/test/schemas/test-1/%/blaze-fast.metapack -./schemas/test/schemas/test-1/%/blaze-fast.metapack.deps ./schemas/test/schemas/test-1/%/bundle.metapack -./schemas/test/schemas/test-1/%/bundle.metapack.deps ./schemas/test/schemas/test-1/%/dependencies.metapack -./schemas/test/schemas/test-1/%/dependencies.metapack.deps ./schemas/test/schemas/test-1/%/dependents.metapack -./schemas/test/schemas/test-1/%/dependents.metapack.deps ./schemas/test/schemas/test-1/%/editor.metapack -./schemas/test/schemas/test-1/%/editor.metapack.deps ./schemas/test/schemas/test-1/%/health.metapack -./schemas/test/schemas/test-1/%/health.metapack.deps ./schemas/test/schemas/test-1/%/locations.metapack -./schemas/test/schemas/test-1/%/locations.metapack.deps ./schemas/test/schemas/test-1/%/positions.metapack -./schemas/test/schemas/test-1/%/positions.metapack.deps ./schemas/test/schemas/test-1/%/schema.metapack -./schemas/test/schemas/test-1/%/schema.metapack.deps ./schemas/test/schemas/test-1/%/stats.metapack -./schemas/test/schemas/test-1/%/stats.metapack.deps ./version.json EOF diff --git a/test/cli/index/common/no-evaluate.sh b/test/cli/index/common/no-evaluate.sh index 6877ced3a..3654d5715 100755 --- a/test/cli/index/common/no-evaluate.sh +++ b/test/cli/index/common/no-evaluate.sh @@ -39,45 +39,31 @@ cd - > /dev/null cat << 'EOF' > "$TMP/expected.txt" ./configuration.json ./dependency-tree.metapack -./dependency-tree.metapack.deps +./deps.txt ./explorer ./explorer/% ./explorer/%/directory.metapack -./explorer/%/directory.metapack.deps ./explorer/%/search.metapack -./explorer/%/search.metapack.deps ./explorer/example ./explorer/example/% ./explorer/example/%/directory.metapack -./explorer/example/%/directory.metapack.deps ./explorer/example/test ./explorer/example/test/% ./explorer/example/test/%/schema.metapack -./explorer/example/test/%/schema.metapack.deps ./routes.bin -./routes.bin.deps ./schemas ./schemas/example ./schemas/example/test ./schemas/example/test/% ./schemas/example/test/%/bundle.metapack -./schemas/example/test/%/bundle.metapack.deps ./schemas/example/test/%/dependencies.metapack -./schemas/example/test/%/dependencies.metapack.deps ./schemas/example/test/%/dependents.metapack -./schemas/example/test/%/dependents.metapack.deps ./schemas/example/test/%/editor.metapack -./schemas/example/test/%/editor.metapack.deps ./schemas/example/test/%/health.metapack -./schemas/example/test/%/health.metapack.deps ./schemas/example/test/%/locations.metapack -./schemas/example/test/%/locations.metapack.deps ./schemas/example/test/%/positions.metapack -./schemas/example/test/%/positions.metapack.deps ./schemas/example/test/%/schema.metapack -./schemas/example/test/%/schema.metapack.deps ./schemas/example/test/%/stats.metapack -./schemas/example/test/%/stats.metapack.deps ./version.json EOF diff --git a/test/cli/index/common/no-id.sh b/test/cli/index/common/no-id.sh index 765ee0e53..4c900f169 100755 --- a/test/cli/index/common/no-id.sh +++ b/test/cli/index/common/no-id.sh @@ -38,49 +38,33 @@ cd - > /dev/null cat << 'EOF' > "$TMP/expected.txt" ./configuration.json ./dependency-tree.metapack -./dependency-tree.metapack.deps +./deps.txt ./explorer ./explorer/% ./explorer/%/directory.metapack -./explorer/%/directory.metapack.deps ./explorer/%/search.metapack -./explorer/%/search.metapack.deps ./explorer/example ./explorer/example/% ./explorer/example/%/directory.metapack -./explorer/example/%/directory.metapack.deps ./explorer/example/test ./explorer/example/test/% ./explorer/example/test/%/schema.metapack -./explorer/example/test/%/schema.metapack.deps ./routes.bin -./routes.bin.deps ./schemas ./schemas/example ./schemas/example/test ./schemas/example/test/% ./schemas/example/test/%/blaze-exhaustive.metapack -./schemas/example/test/%/blaze-exhaustive.metapack.deps ./schemas/example/test/%/blaze-fast.metapack -./schemas/example/test/%/blaze-fast.metapack.deps ./schemas/example/test/%/bundle.metapack -./schemas/example/test/%/bundle.metapack.deps ./schemas/example/test/%/dependencies.metapack -./schemas/example/test/%/dependencies.metapack.deps ./schemas/example/test/%/dependents.metapack -./schemas/example/test/%/dependents.metapack.deps ./schemas/example/test/%/editor.metapack -./schemas/example/test/%/editor.metapack.deps ./schemas/example/test/%/health.metapack -./schemas/example/test/%/health.metapack.deps ./schemas/example/test/%/locations.metapack -./schemas/example/test/%/locations.metapack.deps ./schemas/example/test/%/positions.metapack -./schemas/example/test/%/positions.metapack.deps ./schemas/example/test/%/schema.metapack -./schemas/example/test/%/schema.metapack.deps ./schemas/example/test/%/stats.metapack -./schemas/example/test/%/stats.metapack.deps ./version.json EOF diff --git a/test/cli/index/common/non-existent-collection-directory.sh b/test/cli/index/common/non-existent-collection-directory.sh index df3a4c822..2e81a37c3 100755 --- a/test/cli/index/common/non-existent-collection-directory.sh +++ b/test/cli/index/common/non-existent-collection-directory.sh @@ -29,15 +29,12 @@ cd - > /dev/null cat << 'EOF' > "$TMP/expected.txt" ./configuration.json ./dependency-tree.metapack -./dependency-tree.metapack.deps +./deps.txt ./explorer ./explorer/% ./explorer/%/directory.metapack -./explorer/%/directory.metapack.deps ./explorer/%/search.metapack -./explorer/%/search.metapack.deps ./routes.bin -./routes.bin.deps ./version.json EOF diff --git a/test/cli/index/common/period-filename.sh b/test/cli/index/common/period-filename.sh index 7f50ad669..d71ec96c0 100755 --- a/test/cli/index/common/period-filename.sh +++ b/test/cli/index/common/period-filename.sh @@ -38,49 +38,33 @@ cd - > /dev/null cat << 'EOF' > "$TMP/expected.txt" ./configuration.json ./dependency-tree.metapack -./dependency-tree.metapack.deps +./deps.txt ./explorer ./explorer/% ./explorer/%/directory.metapack -./explorer/%/directory.metapack.deps ./explorer/%/search.metapack -./explorer/%/search.metapack.deps ./explorer/example ./explorer/example/% ./explorer/example/%/directory.metapack -./explorer/example/%/directory.metapack.deps ./explorer/example/.period ./explorer/example/.period/% ./explorer/example/.period/%/schema.metapack -./explorer/example/.period/%/schema.metapack.deps ./routes.bin -./routes.bin.deps ./schemas ./schemas/example ./schemas/example/.period ./schemas/example/.period/% ./schemas/example/.period/%/blaze-exhaustive.metapack -./schemas/example/.period/%/blaze-exhaustive.metapack.deps ./schemas/example/.period/%/blaze-fast.metapack -./schemas/example/.period/%/blaze-fast.metapack.deps ./schemas/example/.period/%/bundle.metapack -./schemas/example/.period/%/bundle.metapack.deps ./schemas/example/.period/%/dependencies.metapack -./schemas/example/.period/%/dependencies.metapack.deps ./schemas/example/.period/%/dependents.metapack -./schemas/example/.period/%/dependents.metapack.deps ./schemas/example/.period/%/editor.metapack -./schemas/example/.period/%/editor.metapack.deps ./schemas/example/.period/%/health.metapack -./schemas/example/.period/%/health.metapack.deps ./schemas/example/.period/%/locations.metapack -./schemas/example/.period/%/locations.metapack.deps ./schemas/example/.period/%/positions.metapack -./schemas/example/.period/%/positions.metapack.deps ./schemas/example/.period/%/schema.metapack -./schemas/example/.period/%/schema.metapack.deps ./schemas/example/.period/%/stats.metapack -./schemas/example/.period/%/stats.metapack.deps ./version.json EOF diff --git a/test/cli/index/common/rebuild-cache.sh b/test/cli/index/common/rebuild-cache.sh index 1deb87ca6..a09b36ea5 100755 --- a/test/cli/index/common/rebuild-cache.sh +++ b/test/cli/index/common/rebuild-cache.sh @@ -145,7 +145,7 @@ Detecting: $(realpath "$TMP")/schemas/foo.json (#1) EOF diff "$TMP/output.txt" "$TMP/expected.txt" -# Update the configuration summary +# Touch an output file (the indexer trusts its own marks, so this is a no-op) touch "$TMP/output/configuration.json" "$1" --skip-banner "$TMP/one.json" "$TMP/output" --concurrency 1 2> "$TMP/output.txt" remove_threads_information "$TMP/output.txt" @@ -155,17 +155,39 @@ Using configuration: $(realpath "$TMP")/one.json Detecting: $(realpath "$TMP")/schemas/foo.json (#1) (100%) Resolving: foo.json (100%) Ingesting: https://sourcemeta.com/example/schemas/foo +(skip) Ingesting: https://sourcemeta.com/example/schemas/foo [materialise] (100%) Analysing: https://sourcemeta.com/example/schemas/foo +(skip) Analysing: https://sourcemeta.com/example/schemas/foo [positions] +(skip) Analysing: https://sourcemeta.com/example/schemas/foo [locations] +(skip) Analysing: https://sourcemeta.com/example/schemas/foo [dependencies] +(skip) Analysing: https://sourcemeta.com/example/schemas/foo [stats] +(skip) Analysing: https://sourcemeta.com/example/schemas/foo [health] +(skip) Analysing: https://sourcemeta.com/example/schemas/foo [bundle] +(skip) Analysing: https://sourcemeta.com/example/schemas/foo [editor] +(skip) Analysing: https://sourcemeta.com/example/schemas/foo [blaze-exhaustive] +(skip) Analysing: https://sourcemeta.com/example/schemas/foo [blaze-fast] +(skip) Analysing: https://sourcemeta.com/example/schemas/foo [metadata] ( 33%) Reviewing: schemas ( 66%) Reviewing: schemas +(skip) Reviewing: schemas [dependencies] (100%) Reviewing: schemas ( 0%) Producing: explorer +(skip) Producing: explorer [search] ( 33%) Producing: example/schemas +(skip) Producing: example/schemas [directory] ( 66%) Producing: example +(skip) Producing: example [directory] (100%) Producing: . +(skip) Producing: . [directory] ( 25%) Rendering: example/schemas +(skip) Rendering: example/schemas [directory] ( 50%) Rendering: example +(skip) Rendering: example [directory] ( 75%) Rendering: . +(skip) Rendering: . [index] +(skip) Rendering: . [not-found] (100%) Rendering: example/schemas/foo +(skip) Rendering: example/schemas/foo [schema] +(skip) Producing: routes.bin [routes] 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 63b7069f6..b07318808 100755 --- a/test/cli/index/common/rebuild-deleted-deps.sh +++ b/test/cli/index/common/rebuild-deleted-deps.sh @@ -32,52 +32,12 @@ cat << 'EOF' > "$TMP/schemas/a.json" } EOF -# Run 1: index one schema from scratch "$1" --skip-banner "$TMP/one.json" "$TMP/output" --concurrency 1 > /dev/null 2>&1 -# Assert the full list of .deps files -cd "$TMP/output" -find . -name "*.deps" | LC_ALL=C sort > "$TMP/deps_actual.txt" -cd - > /dev/null +test -f "$TMP/output/deps.txt" +rm "$TMP/output/deps.txt" +test ! -f "$TMP/output/deps.txt" -cat << 'EOF' > "$TMP/deps_expected.txt" -./dependency-tree.metapack.deps -./explorer/%/404.metapack.deps -./explorer/%/directory-html.metapack.deps -./explorer/%/directory.metapack.deps -./explorer/%/search.metapack.deps -./explorer/example/%/directory-html.metapack.deps -./explorer/example/%/directory.metapack.deps -./explorer/example/schemas/%/directory-html.metapack.deps -./explorer/example/schemas/%/directory.metapack.deps -./explorer/example/schemas/a/%/schema-html.metapack.deps -./explorer/example/schemas/a/%/schema.metapack.deps -./routes.bin.deps -./schemas/example/schemas/a/%/blaze-exhaustive.metapack.deps -./schemas/example/schemas/a/%/blaze-fast.metapack.deps -./schemas/example/schemas/a/%/bundle.metapack.deps -./schemas/example/schemas/a/%/dependencies.metapack.deps -./schemas/example/schemas/a/%/dependents.metapack.deps -./schemas/example/schemas/a/%/editor.metapack.deps -./schemas/example/schemas/a/%/health.metapack.deps -./schemas/example/schemas/a/%/locations.metapack.deps -./schemas/example/schemas/a/%/positions.metapack.deps -./schemas/example/schemas/a/%/schema.metapack.deps -./schemas/example/schemas/a/%/stats.metapack.deps -EOF - -diff "$TMP/deps_actual.txt" "$TMP/deps_expected.txt" - -while IFS= read -r deps_file -do - rm "$TMP/output/${deps_file#./}" -done < "$TMP/deps_expected.txt" - -# Run 2: re-index. All .deps files should be restored. "$1" --skip-banner "$TMP/one.json" "$TMP/output" --concurrency 1 > /dev/null 2>&1 -cd "$TMP/output" -find . -name "*.deps" | LC_ALL=C sort > "$TMP/deps_after.txt" -cd - > /dev/null - -diff "$TMP/deps_after.txt" "$TMP/deps_expected.txt" +test -f "$TMP/output/deps.txt" diff --git a/test/cli/index/common/rebuild-one-to-zero.sh b/test/cli/index/common/rebuild-one-to-zero.sh index 73def857c..607ebcbb6 100755 --- a/test/cli/index/common/rebuild-one-to-zero.sh +++ b/test/cli/index/common/rebuild-one-to-zero.sh @@ -68,57 +68,37 @@ cd - > /dev/null cat << 'EOF' > "$TMP/expected_manifest.txt" ./configuration.json ./dependency-tree.metapack -./dependency-tree.metapack.deps +./deps.txt ./explorer ./explorer/% ./explorer/%/404.metapack -./explorer/%/404.metapack.deps ./explorer/%/directory-html.metapack -./explorer/%/directory-html.metapack.deps ./explorer/%/directory.metapack -./explorer/%/directory.metapack.deps ./explorer/%/search.metapack -./explorer/%/search.metapack.deps ./explorer/schemas ./explorer/schemas/% ./explorer/schemas/%/directory-html.metapack -./explorer/schemas/%/directory-html.metapack.deps ./explorer/schemas/%/directory.metapack -./explorer/schemas/%/directory.metapack.deps ./explorer/schemas/test ./explorer/schemas/test/% ./explorer/schemas/test/%/schema-html.metapack -./explorer/schemas/test/%/schema-html.metapack.deps ./explorer/schemas/test/%/schema.metapack -./explorer/schemas/test/%/schema.metapack.deps ./routes.bin -./routes.bin.deps ./schemas ./schemas/schemas ./schemas/schemas/test ./schemas/schemas/test/% ./schemas/schemas/test/%/blaze-exhaustive.metapack -./schemas/schemas/test/%/blaze-exhaustive.metapack.deps ./schemas/schemas/test/%/blaze-fast.metapack -./schemas/schemas/test/%/blaze-fast.metapack.deps ./schemas/schemas/test/%/bundle.metapack -./schemas/schemas/test/%/bundle.metapack.deps ./schemas/schemas/test/%/dependencies.metapack -./schemas/schemas/test/%/dependencies.metapack.deps ./schemas/schemas/test/%/dependents.metapack -./schemas/schemas/test/%/dependents.metapack.deps ./schemas/schemas/test/%/editor.metapack -./schemas/schemas/test/%/editor.metapack.deps ./schemas/schemas/test/%/health.metapack -./schemas/schemas/test/%/health.metapack.deps ./schemas/schemas/test/%/locations.metapack -./schemas/schemas/test/%/locations.metapack.deps ./schemas/schemas/test/%/positions.metapack -./schemas/schemas/test/%/positions.metapack.deps ./schemas/schemas/test/%/schema.metapack -./schemas/schemas/test/%/schema.metapack.deps ./schemas/schemas/test/%/stats.metapack -./schemas/schemas/test/%/stats.metapack.deps ./version.json EOF diff "$TMP/manifest.txt" "$TMP/expected_manifest.txt" @@ -150,19 +130,14 @@ cd - > /dev/null cat << 'EOF' > "$TMP/expected_manifest.txt" ./configuration.json ./dependency-tree.metapack -./dependency-tree.metapack.deps +./deps.txt ./explorer ./explorer/% ./explorer/%/404.metapack -./explorer/%/404.metapack.deps ./explorer/%/directory-html.metapack -./explorer/%/directory-html.metapack.deps ./explorer/%/directory.metapack -./explorer/%/directory.metapack.deps ./explorer/%/search.metapack -./explorer/%/search.metapack.deps ./routes.bin -./routes.bin.deps ./version.json EOF diff "$TMP/manifest.txt" "$TMP/expected_manifest.txt" diff --git a/test/cli/index/common/rebuild-to-empty.sh b/test/cli/index/common/rebuild-to-empty.sh index 57c721567..089be52bd 100755 --- a/test/cli/index/common/rebuild-to-empty.sh +++ b/test/cli/index/common/rebuild-to-empty.sh @@ -49,19 +49,14 @@ cd - > /dev/null cat << 'EOF' > "$TMP/new-expected.txt" ./configuration.json ./dependency-tree.metapack -./dependency-tree.metapack.deps +./deps.txt ./explorer ./explorer/% ./explorer/%/404.metapack -./explorer/%/404.metapack.deps ./explorer/%/directory-html.metapack -./explorer/%/directory-html.metapack.deps ./explorer/%/directory.metapack -./explorer/%/directory.metapack.deps ./explorer/%/search.metapack -./explorer/%/search.metapack.deps ./routes.bin -./routes.bin.deps ./version.json EOF diff --git a/test/cli/index/common/rebuild-two-to-three.sh b/test/cli/index/common/rebuild-two-to-three.sh index 7ba609e64..42d7e2796 100755 --- a/test/cli/index/common/rebuild-two-to-three.sh +++ b/test/cli/index/common/rebuild-two-to-three.sh @@ -115,124 +115,76 @@ cd - > /dev/null cat << 'EOF' > "$TMP/expected_manifest.txt" ./configuration.json ./dependency-tree.metapack -./dependency-tree.metapack.deps +./deps.txt ./explorer ./explorer/% ./explorer/%/404.metapack -./explorer/%/404.metapack.deps ./explorer/%/directory-html.metapack -./explorer/%/directory-html.metapack.deps ./explorer/%/directory.metapack -./explorer/%/directory.metapack.deps ./explorer/%/search.metapack -./explorer/%/search.metapack.deps ./explorer/example ./explorer/example/% ./explorer/example/%/directory-html.metapack -./explorer/example/%/directory-html.metapack.deps ./explorer/example/%/directory.metapack -./explorer/example/%/directory.metapack.deps ./explorer/example/schemas ./explorer/example/schemas/% ./explorer/example/schemas/%/directory-html.metapack -./explorer/example/schemas/%/directory-html.metapack.deps ./explorer/example/schemas/%/directory.metapack -./explorer/example/schemas/%/directory.metapack.deps ./explorer/example/schemas/a ./explorer/example/schemas/a/% ./explorer/example/schemas/a/%/schema-html.metapack -./explorer/example/schemas/a/%/schema-html.metapack.deps ./explorer/example/schemas/a/%/schema.metapack -./explorer/example/schemas/a/%/schema.metapack.deps ./explorer/example/schemas/b ./explorer/example/schemas/b/% ./explorer/example/schemas/b/%/schema-html.metapack -./explorer/example/schemas/b/%/schema-html.metapack.deps ./explorer/example/schemas/b/%/schema.metapack -./explorer/example/schemas/b/%/schema.metapack.deps ./explorer/example/schemas/c ./explorer/example/schemas/c/% ./explorer/example/schemas/c/%/schema-html.metapack -./explorer/example/schemas/c/%/schema-html.metapack.deps ./explorer/example/schemas/c/%/schema.metapack -./explorer/example/schemas/c/%/schema.metapack.deps ./routes.bin -./routes.bin.deps ./schemas ./schemas/example ./schemas/example/schemas ./schemas/example/schemas/a ./schemas/example/schemas/a/% ./schemas/example/schemas/a/%/blaze-exhaustive.metapack -./schemas/example/schemas/a/%/blaze-exhaustive.metapack.deps ./schemas/example/schemas/a/%/blaze-fast.metapack -./schemas/example/schemas/a/%/blaze-fast.metapack.deps ./schemas/example/schemas/a/%/bundle.metapack -./schemas/example/schemas/a/%/bundle.metapack.deps ./schemas/example/schemas/a/%/dependencies.metapack -./schemas/example/schemas/a/%/dependencies.metapack.deps ./schemas/example/schemas/a/%/dependents.metapack -./schemas/example/schemas/a/%/dependents.metapack.deps ./schemas/example/schemas/a/%/editor.metapack -./schemas/example/schemas/a/%/editor.metapack.deps ./schemas/example/schemas/a/%/health.metapack -./schemas/example/schemas/a/%/health.metapack.deps ./schemas/example/schemas/a/%/locations.metapack -./schemas/example/schemas/a/%/locations.metapack.deps ./schemas/example/schemas/a/%/positions.metapack -./schemas/example/schemas/a/%/positions.metapack.deps ./schemas/example/schemas/a/%/schema.metapack -./schemas/example/schemas/a/%/schema.metapack.deps ./schemas/example/schemas/a/%/stats.metapack -./schemas/example/schemas/a/%/stats.metapack.deps ./schemas/example/schemas/b ./schemas/example/schemas/b/% ./schemas/example/schemas/b/%/blaze-exhaustive.metapack -./schemas/example/schemas/b/%/blaze-exhaustive.metapack.deps ./schemas/example/schemas/b/%/blaze-fast.metapack -./schemas/example/schemas/b/%/blaze-fast.metapack.deps ./schemas/example/schemas/b/%/bundle.metapack -./schemas/example/schemas/b/%/bundle.metapack.deps ./schemas/example/schemas/b/%/dependencies.metapack -./schemas/example/schemas/b/%/dependencies.metapack.deps ./schemas/example/schemas/b/%/dependents.metapack -./schemas/example/schemas/b/%/dependents.metapack.deps ./schemas/example/schemas/b/%/editor.metapack -./schemas/example/schemas/b/%/editor.metapack.deps ./schemas/example/schemas/b/%/health.metapack -./schemas/example/schemas/b/%/health.metapack.deps ./schemas/example/schemas/b/%/locations.metapack -./schemas/example/schemas/b/%/locations.metapack.deps ./schemas/example/schemas/b/%/positions.metapack -./schemas/example/schemas/b/%/positions.metapack.deps ./schemas/example/schemas/b/%/schema.metapack -./schemas/example/schemas/b/%/schema.metapack.deps ./schemas/example/schemas/b/%/stats.metapack -./schemas/example/schemas/b/%/stats.metapack.deps ./schemas/example/schemas/c ./schemas/example/schemas/c/% ./schemas/example/schemas/c/%/blaze-exhaustive.metapack -./schemas/example/schemas/c/%/blaze-exhaustive.metapack.deps ./schemas/example/schemas/c/%/blaze-fast.metapack -./schemas/example/schemas/c/%/blaze-fast.metapack.deps ./schemas/example/schemas/c/%/bundle.metapack -./schemas/example/schemas/c/%/bundle.metapack.deps ./schemas/example/schemas/c/%/dependencies.metapack -./schemas/example/schemas/c/%/dependencies.metapack.deps ./schemas/example/schemas/c/%/dependents.metapack -./schemas/example/schemas/c/%/dependents.metapack.deps ./schemas/example/schemas/c/%/editor.metapack -./schemas/example/schemas/c/%/editor.metapack.deps ./schemas/example/schemas/c/%/health.metapack -./schemas/example/schemas/c/%/health.metapack.deps ./schemas/example/schemas/c/%/locations.metapack -./schemas/example/schemas/c/%/locations.metapack.deps ./schemas/example/schemas/c/%/positions.metapack -./schemas/example/schemas/c/%/positions.metapack.deps ./schemas/example/schemas/c/%/schema.metapack -./schemas/example/schemas/c/%/schema.metapack.deps ./schemas/example/schemas/c/%/stats.metapack -./schemas/example/schemas/c/%/stats.metapack.deps ./version.json EOF diff --git a/test/cli/index/common/rebuild-zero-to-one.sh b/test/cli/index/common/rebuild-zero-to-one.sh index af7a22ec8..71071529e 100755 --- a/test/cli/index/common/rebuild-zero-to-one.sh +++ b/test/cli/index/common/rebuild-zero-to-one.sh @@ -52,19 +52,14 @@ cd - > /dev/null cat << 'EOF' > "$TMP/expected_manifest.txt" ./configuration.json ./dependency-tree.metapack -./dependency-tree.metapack.deps +./deps.txt ./explorer ./explorer/% ./explorer/%/404.metapack -./explorer/%/404.metapack.deps ./explorer/%/directory-html.metapack -./explorer/%/directory-html.metapack.deps ./explorer/%/directory.metapack -./explorer/%/directory.metapack.deps ./explorer/%/search.metapack -./explorer/%/search.metapack.deps ./routes.bin -./routes.bin.deps ./version.json EOF diff "$TMP/manifest.txt" "$TMP/expected_manifest.txt" @@ -111,57 +106,37 @@ cd - > /dev/null cat << 'EOF' > "$TMP/expected_manifest.txt" ./configuration.json ./dependency-tree.metapack -./dependency-tree.metapack.deps +./deps.txt ./explorer ./explorer/% ./explorer/%/404.metapack -./explorer/%/404.metapack.deps ./explorer/%/directory-html.metapack -./explorer/%/directory-html.metapack.deps ./explorer/%/directory.metapack -./explorer/%/directory.metapack.deps ./explorer/%/search.metapack -./explorer/%/search.metapack.deps ./explorer/schemas ./explorer/schemas/% ./explorer/schemas/%/directory-html.metapack -./explorer/schemas/%/directory-html.metapack.deps ./explorer/schemas/%/directory.metapack -./explorer/schemas/%/directory.metapack.deps ./explorer/schemas/test ./explorer/schemas/test/% ./explorer/schemas/test/%/schema-html.metapack -./explorer/schemas/test/%/schema-html.metapack.deps ./explorer/schemas/test/%/schema.metapack -./explorer/schemas/test/%/schema.metapack.deps ./routes.bin -./routes.bin.deps ./schemas ./schemas/schemas ./schemas/schemas/test ./schemas/schemas/test/% ./schemas/schemas/test/%/blaze-exhaustive.metapack -./schemas/schemas/test/%/blaze-exhaustive.metapack.deps ./schemas/schemas/test/%/blaze-fast.metapack -./schemas/schemas/test/%/blaze-fast.metapack.deps ./schemas/schemas/test/%/bundle.metapack -./schemas/schemas/test/%/bundle.metapack.deps ./schemas/schemas/test/%/dependencies.metapack -./schemas/schemas/test/%/dependencies.metapack.deps ./schemas/schemas/test/%/dependents.metapack -./schemas/schemas/test/%/dependents.metapack.deps ./schemas/schemas/test/%/editor.metapack -./schemas/schemas/test/%/editor.metapack.deps ./schemas/schemas/test/%/health.metapack -./schemas/schemas/test/%/health.metapack.deps ./schemas/schemas/test/%/locations.metapack -./schemas/schemas/test/%/locations.metapack.deps ./schemas/schemas/test/%/positions.metapack -./schemas/schemas/test/%/positions.metapack.deps ./schemas/schemas/test/%/schema.metapack -./schemas/schemas/test/%/schema.metapack.deps ./schemas/schemas/test/%/stats.metapack -./schemas/schemas/test/%/stats.metapack.deps ./version.json EOF diff "$TMP/manifest.txt" "$TMP/expected_manifest.txt" diff --git a/test/cli/index/common/schema-extension.sh b/test/cli/index/common/schema-extension.sh index e67e9afb1..2a04c7046 100755 --- a/test/cli/index/common/schema-extension.sh +++ b/test/cli/index/common/schema-extension.sh @@ -45,77 +45,49 @@ cd - > /dev/null cat << 'EOF' > "$TMP/expected.txt" ./configuration.json ./dependency-tree.metapack -./dependency-tree.metapack.deps +./deps.txt ./explorer ./explorer/% ./explorer/%/directory.metapack -./explorer/%/directory.metapack.deps ./explorer/%/search.metapack -./explorer/%/search.metapack.deps ./explorer/example ./explorer/example/% ./explorer/example/%/directory.metapack -./explorer/example/%/directory.metapack.deps ./explorer/example/with ./explorer/example/with/% ./explorer/example/with/%/schema.metapack -./explorer/example/with/%/schema.metapack.deps ./explorer/example/without ./explorer/example/without/% ./explorer/example/without/%/schema.metapack -./explorer/example/without/%/schema.metapack.deps ./routes.bin -./routes.bin.deps ./schemas ./schemas/example ./schemas/example/with ./schemas/example/with/% ./schemas/example/with/%/blaze-exhaustive.metapack -./schemas/example/with/%/blaze-exhaustive.metapack.deps ./schemas/example/with/%/blaze-fast.metapack -./schemas/example/with/%/blaze-fast.metapack.deps ./schemas/example/with/%/bundle.metapack -./schemas/example/with/%/bundle.metapack.deps ./schemas/example/with/%/dependencies.metapack -./schemas/example/with/%/dependencies.metapack.deps ./schemas/example/with/%/dependents.metapack -./schemas/example/with/%/dependents.metapack.deps ./schemas/example/with/%/editor.metapack -./schemas/example/with/%/editor.metapack.deps ./schemas/example/with/%/health.metapack -./schemas/example/with/%/health.metapack.deps ./schemas/example/with/%/locations.metapack -./schemas/example/with/%/locations.metapack.deps ./schemas/example/with/%/positions.metapack -./schemas/example/with/%/positions.metapack.deps ./schemas/example/with/%/schema.metapack -./schemas/example/with/%/schema.metapack.deps ./schemas/example/with/%/stats.metapack -./schemas/example/with/%/stats.metapack.deps ./schemas/example/without ./schemas/example/without/% ./schemas/example/without/%/blaze-exhaustive.metapack -./schemas/example/without/%/blaze-exhaustive.metapack.deps ./schemas/example/without/%/blaze-fast.metapack -./schemas/example/without/%/blaze-fast.metapack.deps ./schemas/example/without/%/bundle.metapack -./schemas/example/without/%/bundle.metapack.deps ./schemas/example/without/%/dependencies.metapack -./schemas/example/without/%/dependencies.metapack.deps ./schemas/example/without/%/dependents.metapack -./schemas/example/without/%/dependents.metapack.deps ./schemas/example/without/%/editor.metapack -./schemas/example/without/%/editor.metapack.deps ./schemas/example/without/%/health.metapack -./schemas/example/without/%/health.metapack.deps ./schemas/example/without/%/locations.metapack -./schemas/example/without/%/locations.metapack.deps ./schemas/example/without/%/positions.metapack -./schemas/example/without/%/positions.metapack.deps ./schemas/example/without/%/schema.metapack -./schemas/example/without/%/schema.metapack.deps ./schemas/example/without/%/stats.metapack -./schemas/example/without/%/stats.metapack.deps ./version.json EOF diff --git a/test/cli/index/common/string-directory-overlap.sh b/test/cli/index/common/string-directory-overlap.sh index d68c3fec9..a165cdd27 100755 --- a/test/cli/index/common/string-directory-overlap.sh +++ b/test/cli/index/common/string-directory-overlap.sh @@ -45,79 +45,50 @@ cd - > /dev/null cat << 'EOF' > "$TMP/expected.txt" ./configuration.json ./dependency-tree.metapack -./dependency-tree.metapack.deps +./deps.txt ./explorer ./explorer/% ./explorer/%/directory.metapack -./explorer/%/directory.metapack.deps ./explorer/%/search.metapack -./explorer/%/search.metapack.deps ./explorer/example ./explorer/example/% ./explorer/example/%/directory.metapack -./explorer/example/%/directory.metapack.deps ./explorer/example/string ./explorer/example/string/% ./explorer/example/string/%/directory.metapack -./explorer/example/string/%/directory.metapack.deps ./explorer/example/string/%/schema.metapack -./explorer/example/string/%/schema.metapack.deps ./explorer/example/string/overlap ./explorer/example/string/overlap/% ./explorer/example/string/overlap/%/schema.metapack -./explorer/example/string/overlap/%/schema.metapack.deps ./routes.bin -./routes.bin.deps ./schemas ./schemas/example ./schemas/example/string ./schemas/example/string/% ./schemas/example/string/%/blaze-exhaustive.metapack -./schemas/example/string/%/blaze-exhaustive.metapack.deps ./schemas/example/string/%/blaze-fast.metapack -./schemas/example/string/%/blaze-fast.metapack.deps ./schemas/example/string/%/bundle.metapack -./schemas/example/string/%/bundle.metapack.deps ./schemas/example/string/%/dependencies.metapack -./schemas/example/string/%/dependencies.metapack.deps ./schemas/example/string/%/dependents.metapack -./schemas/example/string/%/dependents.metapack.deps ./schemas/example/string/%/editor.metapack -./schemas/example/string/%/editor.metapack.deps ./schemas/example/string/%/health.metapack -./schemas/example/string/%/health.metapack.deps ./schemas/example/string/%/locations.metapack -./schemas/example/string/%/locations.metapack.deps ./schemas/example/string/%/positions.metapack -./schemas/example/string/%/positions.metapack.deps ./schemas/example/string/%/schema.metapack -./schemas/example/string/%/schema.metapack.deps ./schemas/example/string/%/stats.metapack -./schemas/example/string/%/stats.metapack.deps ./schemas/example/string/overlap ./schemas/example/string/overlap/% ./schemas/example/string/overlap/%/blaze-exhaustive.metapack -./schemas/example/string/overlap/%/blaze-exhaustive.metapack.deps ./schemas/example/string/overlap/%/blaze-fast.metapack -./schemas/example/string/overlap/%/blaze-fast.metapack.deps ./schemas/example/string/overlap/%/bundle.metapack -./schemas/example/string/overlap/%/bundle.metapack.deps ./schemas/example/string/overlap/%/dependencies.metapack -./schemas/example/string/overlap/%/dependencies.metapack.deps ./schemas/example/string/overlap/%/dependents.metapack -./schemas/example/string/overlap/%/dependents.metapack.deps ./schemas/example/string/overlap/%/editor.metapack -./schemas/example/string/overlap/%/editor.metapack.deps ./schemas/example/string/overlap/%/health.metapack -./schemas/example/string/overlap/%/health.metapack.deps ./schemas/example/string/overlap/%/locations.metapack -./schemas/example/string/overlap/%/locations.metapack.deps ./schemas/example/string/overlap/%/positions.metapack -./schemas/example/string/overlap/%/positions.metapack.deps ./schemas/example/string/overlap/%/schema.metapack -./schemas/example/string/overlap/%/schema.metapack.deps ./schemas/example/string/overlap/%/stats.metapack -./schemas/example/string/overlap/%/stats.metapack.deps ./version.json EOF diff --git a/test/cli/index/common/version-filename.sh b/test/cli/index/common/version-filename.sh index 4fdbd0bba..2ed29d765 100755 --- a/test/cli/index/common/version-filename.sh +++ b/test/cli/index/common/version-filename.sh @@ -38,49 +38,33 @@ cd - > /dev/null cat << 'EOF' > "$TMP/expected.txt" ./configuration.json ./dependency-tree.metapack -./dependency-tree.metapack.deps +./deps.txt ./explorer ./explorer/% ./explorer/%/directory.metapack -./explorer/%/directory.metapack.deps ./explorer/%/search.metapack -./explorer/%/search.metapack.deps ./explorer/example ./explorer/example/% ./explorer/example/%/directory.metapack -./explorer/example/%/directory.metapack.deps ./explorer/example/v1.2.3 ./explorer/example/v1.2.3/% ./explorer/example/v1.2.3/%/schema.metapack -./explorer/example/v1.2.3/%/schema.metapack.deps ./routes.bin -./routes.bin.deps ./schemas ./schemas/example ./schemas/example/v1.2.3 ./schemas/example/v1.2.3/% ./schemas/example/v1.2.3/%/blaze-exhaustive.metapack -./schemas/example/v1.2.3/%/blaze-exhaustive.metapack.deps ./schemas/example/v1.2.3/%/blaze-fast.metapack -./schemas/example/v1.2.3/%/blaze-fast.metapack.deps ./schemas/example/v1.2.3/%/bundle.metapack -./schemas/example/v1.2.3/%/bundle.metapack.deps ./schemas/example/v1.2.3/%/dependencies.metapack -./schemas/example/v1.2.3/%/dependencies.metapack.deps ./schemas/example/v1.2.3/%/dependents.metapack -./schemas/example/v1.2.3/%/dependents.metapack.deps ./schemas/example/v1.2.3/%/editor.metapack -./schemas/example/v1.2.3/%/editor.metapack.deps ./schemas/example/v1.2.3/%/health.metapack -./schemas/example/v1.2.3/%/health.metapack.deps ./schemas/example/v1.2.3/%/locations.metapack -./schemas/example/v1.2.3/%/locations.metapack.deps ./schemas/example/v1.2.3/%/positions.metapack -./schemas/example/v1.2.3/%/positions.metapack.deps ./schemas/example/v1.2.3/%/schema.metapack -./schemas/example/v1.2.3/%/schema.metapack.deps ./schemas/example/v1.2.3/%/stats.metapack -./schemas/example/v1.2.3/%/stats.metapack.deps ./version.json EOF diff --git a/test/cli/index/common/version-path.sh b/test/cli/index/common/version-path.sh index b17e3db73..d296653be 100755 --- a/test/cli/index/common/version-path.sh +++ b/test/cli/index/common/version-path.sh @@ -38,49 +38,33 @@ cd - > /dev/null cat << 'EOF' > "$TMP/expected.txt" ./configuration.json ./dependency-tree.metapack -./dependency-tree.metapack.deps +./deps.txt ./explorer ./explorer/% ./explorer/%/directory.metapack -./explorer/%/directory.metapack.deps ./explorer/%/search.metapack -./explorer/%/search.metapack.deps ./explorer/v2.0 ./explorer/v2.0/% ./explorer/v2.0/%/directory.metapack -./explorer/v2.0/%/directory.metapack.deps ./explorer/v2.0/test ./explorer/v2.0/test/% ./explorer/v2.0/test/%/schema.metapack -./explorer/v2.0/test/%/schema.metapack.deps ./routes.bin -./routes.bin.deps ./schemas ./schemas/v2.0 ./schemas/v2.0/test ./schemas/v2.0/test/% ./schemas/v2.0/test/%/blaze-exhaustive.metapack -./schemas/v2.0/test/%/blaze-exhaustive.metapack.deps ./schemas/v2.0/test/%/blaze-fast.metapack -./schemas/v2.0/test/%/blaze-fast.metapack.deps ./schemas/v2.0/test/%/bundle.metapack -./schemas/v2.0/test/%/bundle.metapack.deps ./schemas/v2.0/test/%/dependencies.metapack -./schemas/v2.0/test/%/dependencies.metapack.deps ./schemas/v2.0/test/%/dependents.metapack -./schemas/v2.0/test/%/dependents.metapack.deps ./schemas/v2.0/test/%/editor.metapack -./schemas/v2.0/test/%/editor.metapack.deps ./schemas/v2.0/test/%/health.metapack -./schemas/v2.0/test/%/health.metapack.deps ./schemas/v2.0/test/%/locations.metapack -./schemas/v2.0/test/%/locations.metapack.deps ./schemas/v2.0/test/%/positions.metapack -./schemas/v2.0/test/%/positions.metapack.deps ./schemas/v2.0/test/%/schema.metapack -./schemas/v2.0/test/%/schema.metapack.deps ./schemas/v2.0/test/%/stats.metapack -./schemas/v2.0/test/%/stats.metapack.deps ./version.json EOF diff --git a/test/cli/index/common/yaml-schemas.sh b/test/cli/index/common/yaml-schemas.sh index 1aa1ff245..c0c64108a 100755 --- a/test/cli/index/common/yaml-schemas.sh +++ b/test/cli/index/common/yaml-schemas.sh @@ -43,77 +43,49 @@ cd - > /dev/null cat << 'EOF' > "$TMP/expected.txt" ./configuration.json ./dependency-tree.metapack -./dependency-tree.metapack.deps +./deps.txt ./explorer ./explorer/% ./explorer/%/directory.metapack -./explorer/%/directory.metapack.deps ./explorer/%/search.metapack -./explorer/%/search.metapack.deps ./explorer/example ./explorer/example/% ./explorer/example/%/directory.metapack -./explorer/example/%/directory.metapack.deps ./explorer/example/yaml ./explorer/example/yaml/% ./explorer/example/yaml/%/schema.metapack -./explorer/example/yaml/%/schema.metapack.deps ./explorer/example/yml ./explorer/example/yml/% ./explorer/example/yml/%/schema.metapack -./explorer/example/yml/%/schema.metapack.deps ./routes.bin -./routes.bin.deps ./schemas ./schemas/example ./schemas/example/yaml ./schemas/example/yaml/% ./schemas/example/yaml/%/blaze-exhaustive.metapack -./schemas/example/yaml/%/blaze-exhaustive.metapack.deps ./schemas/example/yaml/%/blaze-fast.metapack -./schemas/example/yaml/%/blaze-fast.metapack.deps ./schemas/example/yaml/%/bundle.metapack -./schemas/example/yaml/%/bundle.metapack.deps ./schemas/example/yaml/%/dependencies.metapack -./schemas/example/yaml/%/dependencies.metapack.deps ./schemas/example/yaml/%/dependents.metapack -./schemas/example/yaml/%/dependents.metapack.deps ./schemas/example/yaml/%/editor.metapack -./schemas/example/yaml/%/editor.metapack.deps ./schemas/example/yaml/%/health.metapack -./schemas/example/yaml/%/health.metapack.deps ./schemas/example/yaml/%/locations.metapack -./schemas/example/yaml/%/locations.metapack.deps ./schemas/example/yaml/%/positions.metapack -./schemas/example/yaml/%/positions.metapack.deps ./schemas/example/yaml/%/schema.metapack -./schemas/example/yaml/%/schema.metapack.deps ./schemas/example/yaml/%/stats.metapack -./schemas/example/yaml/%/stats.metapack.deps ./schemas/example/yml ./schemas/example/yml/% ./schemas/example/yml/%/blaze-exhaustive.metapack -./schemas/example/yml/%/blaze-exhaustive.metapack.deps ./schemas/example/yml/%/blaze-fast.metapack -./schemas/example/yml/%/blaze-fast.metapack.deps ./schemas/example/yml/%/bundle.metapack -./schemas/example/yml/%/bundle.metapack.deps ./schemas/example/yml/%/dependencies.metapack -./schemas/example/yml/%/dependencies.metapack.deps ./schemas/example/yml/%/dependents.metapack -./schemas/example/yml/%/dependents.metapack.deps ./schemas/example/yml/%/editor.metapack -./schemas/example/yml/%/editor.metapack.deps ./schemas/example/yml/%/health.metapack -./schemas/example/yml/%/health.metapack.deps ./schemas/example/yml/%/locations.metapack -./schemas/example/yml/%/locations.metapack.deps ./schemas/example/yml/%/positions.metapack -./schemas/example/yml/%/positions.metapack.deps ./schemas/example/yml/%/schema.metapack -./schemas/example/yml/%/schema.metapack.deps ./schemas/example/yml/%/stats.metapack -./schemas/example/yml/%/stats.metapack.deps ./version.json EOF diff --git a/test/unit/build/build_adapter_filesystem_test.cc b/test/unit/build/build_adapter_filesystem_test.cc index 63953aa10..2d98d6223 100644 --- a/test/unit/build/build_adapter_filesystem_test.cc +++ b/test/unit/build/build_adapter_filesystem_test.cc @@ -4,27 +4,6 @@ #include "build_test_utils.h" -TEST(Build_Adapter_Filesystem, dependencies_path) { - sourcemeta::one::BuildAdapterFilesystem adapter{BINARY_DIRECTORY}; - const auto result{adapter.dependencies_path("/foo/bar.baz")}; - EXPECT_EQ(result, "/foo/bar.baz.deps"); -} - -TEST(Build_Adapter_Filesystem, read_dependencies_stub_1) { - const std::filesystem::path stub{std::filesystem::path{TEST_DIRECTORY} / - "deps_stub_1.json"}; - sourcemeta::one::BuildAdapterFilesystem adapter{BINARY_DIRECTORY}; - const auto dependencies{adapter.read_dependencies(stub)}; - EXPECT_TRUE(dependencies.has_value()); - EXPECT_EQ(dependencies.value().size(), 2); - auto iterator{dependencies.value().cbegin()}; - EXPECT_EQ(iterator->first, sourcemeta::one::BuildDependencyKind::Static); - EXPECT_EQ(iterator->second.string(), "/foo/bar"); - std::advance(iterator, 1); - EXPECT_EQ(iterator->first, sourcemeta::one::BuildDependencyKind::Static); - EXPECT_EQ(iterator->second.string(), "/test"); -} - TEST(Build_Adapter_Filesystem, read_dependencies_not_exists) { const std::filesystem::path stub{std::filesystem::path{TEST_DIRECTORY} / "unknown"}; @@ -33,19 +12,19 @@ TEST(Build_Adapter_Filesystem, read_dependencies_not_exists) { EXPECT_FALSE(dependencies.has_value()); } -TEST(Build_Adapter_Filesystem, write_dependencies_1) { +TEST(Build_Adapter_Filesystem, write_then_read_dependencies) { sourcemeta::one::BuildDependencies< sourcemeta::one::BuildAdapterFilesystem::node_type> dependencies; dependencies.emplace_back(sourcemeta::one::BuildDependencyKind::Static, "/foo/bar"); - dependencies.emplace_back(sourcemeta::one::BuildDependencyKind::Static, + dependencies.emplace_back(sourcemeta::one::BuildDependencyKind::Dynamic, "/baz"); dependencies.emplace_back(sourcemeta::one::BuildDependencyKind::Static, "/test"); const auto node{std::filesystem::path{BINARY_DIRECTORY} / - "write_dependencies_1"}; + "write_then_read_dependencies"}; WRITE_FILE(node, "test"); @@ -59,16 +38,16 @@ TEST(Build_Adapter_Filesystem, write_dependencies_1) { EXPECT_EQ(iterator->first, sourcemeta::one::BuildDependencyKind::Static); EXPECT_EQ(iterator->second.string(), "/foo/bar"); std::advance(iterator, 1); - EXPECT_EQ(iterator->first, sourcemeta::one::BuildDependencyKind::Static); + EXPECT_EQ(iterator->first, sourcemeta::one::BuildDependencyKind::Dynamic); EXPECT_EQ(iterator->second.string(), "/baz"); std::advance(iterator, 1); EXPECT_EQ(iterator->first, sourcemeta::one::BuildDependencyKind::Static); EXPECT_EQ(iterator->second.string(), "/test"); } -TEST(Build_Adapter_Filesystem, mark_stub_1) { +TEST(Build_Adapter_Filesystem, mark_existing_file) { const std::filesystem::path stub{std::filesystem::path{TEST_DIRECTORY} / - "deps_stub_1.json.deps"}; + "build_test_utils.h"}; sourcemeta::one::BuildAdapterFilesystem adapter{BINARY_DIRECTORY}; const auto mark{adapter.mark(stub)}; EXPECT_TRUE(mark.has_value()); diff --git a/test/unit/build/deps_stub_1.json.deps b/test/unit/build/deps_stub_1.json.deps deleted file mode 100644 index 25d55a273..000000000 --- a/test/unit/build/deps_stub_1.json.deps +++ /dev/null @@ -1,2 +0,0 @@ -s /foo/bar -s /test