From fae1bc9727008b581ec7c12f98b11befdc98eb27 Mon Sep 17 00:00:00 2001 From: Ken Matsui <26405363+ken-matsui@users.noreply.github.com> Date: Wed, 26 Nov 2025 02:06:29 -0500 Subject: [PATCH 1/2] test: add test for missing cabin.toml in path deps --- tests/deps_path.cc | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/tests/deps_path.cc b/tests/deps_path.cc index 751f7d5f5..cb57c16b7 100644 --- a/tests/deps_path.cc +++ b/tests/deps_path.cc @@ -303,4 +303,39 @@ int main() { const auto err = tests::sanitizeOutput(result.err); expect(err.contains("dependency `fmt` conflicts across manifests")); }; + + "path dependency without manifest fails"_test = [] { + const tests::TempDir tmp; + + const fs::path depRoot = tmp.path / "dep"; + fs::create_directories(depRoot); + tests::writeFile(depRoot / "dep.hpp", + R"(#pragma once + +inline int dep_value() { return 1; } +)"); + + const fs::path appRoot = tmp.path / "app"; + fs::create_directories(appRoot / "src"); + tests::writeFile( + appRoot / "cabin.toml", + R"([package] +name = "app" +version = "0.1.0" +edition = "23" + +[dependencies] +dep = {path = "../dep"} +)"); + tests::writeFile(appRoot / "src" / "main.cc", + R"(#include "dep.hpp" + +int main() { return dep_value(); } +)"); + + const auto result = tests::runCabin({ "build" }, appRoot).unwrap(); + expect(!result.status.success()); + const auto err = tests::sanitizeOutput(result.err); + expect(err.contains("missing `cabin.toml` in path dependency")); + }; } From 5a4bf19d1cffebceed608c2607a63a425de613d9 Mon Sep 17 00:00:00 2001 From: Ken Matsui <26405363+ken-matsui@users.noreply.github.com> Date: Wed, 26 Nov 2025 02:22:40 -0500 Subject: [PATCH 2/2] fix: format --- tests/deps_path.cc | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tests/deps_path.cc b/tests/deps_path.cc index cb57c16b7..c0befb589 100644 --- a/tests/deps_path.cc +++ b/tests/deps_path.cc @@ -317,9 +317,8 @@ inline int dep_value() { return 1; } const fs::path appRoot = tmp.path / "app"; fs::create_directories(appRoot / "src"); - tests::writeFile( - appRoot / "cabin.toml", - R"([package] + tests::writeFile(appRoot / "cabin.toml", + R"([package] name = "app" version = "0.1.0" edition = "23"