Explorar el Código

Fix: Don't break paths to dependencies when the repo-dir is a relative path

default_compile_flags
vector-of-bool hace 4 años
padre
commit
66c2712ee4
Se han modificado 2 ficheros con 6 adiciones y 5 borrados
  1. +4
    -3
      src/dds/library/root.cpp
  2. +2
    -2
      tests/dds.py

+ 4
- 3
src/dds/library/root.cpp Ver fichero

@@ -52,6 +52,7 @@ auto collect_pf_sources(path_ref path) {
} // namespace

library_root library_root::from_directory(path_ref lib_dir) {
assert(lib_dir.is_absolute());
auto sources = collect_pf_sources(lib_dir);

library_manifest man;
@@ -99,7 +100,7 @@ auto has_library_dirs
std::vector<library_root> dds::collect_libraries(path_ref root) {
std::vector<library_root> ret;
if (has_library_dirs(root)) {
ret.emplace_back(library_root::from_directory(root));
ret.emplace_back(library_root::from_directory(fs::canonical(root)));
}

auto pf_libs_dir = root / "libs";
@@ -109,7 +110,7 @@ std::vector<library_root> dds::collect_libraries(path_ref root) {
fs::directory_iterator(pf_libs_dir) //
| ranges::views::filter(has_library_dirs) //
| ranges::views::transform(
[&](auto p) { return library_root::from_directory(p); }));
[&](auto p) { return library_root::from_directory(fs::canonical(p)); }));
}
return ret;
}
}

+ 2
- 2
tests/dds.py Ver fichero

@@ -93,8 +93,8 @@ class DDS:
'build',
f'--out={self.build_dir}',
f'--toolchain={toolchain or self.default_builtin_toolchain}',
f'--catalog={self.catalog_path}',
f'--repo-dir={self.repo_dir}',
f'--catalog={self.catalog_path.relative_to(self.source_root)}',
f'--repo-dir={self.repo_dir.relative_to(self.source_root)}',
['--no-tests'] if not tests else [],
['--no-apps'] if not apps else [],
['--no-warnings'] if not warnings else [],

Cargando…
Cancelar
Guardar