From 620777cacff6689a2c994594c9c15aa6dab238ff Mon Sep 17 00:00:00 2001 From: daimond113 <72147841+daimond113@users.noreply.github.com> Date: Sun, 3 Nov 2024 13:06:59 +0100 Subject: [PATCH] fix: remove default.project.json from git pesde dependencies --- CHANGELOG.md | 1 + src/source/git/mod.rs | 10 ++++++++++ 2 files changed, 11 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index e8f2efc..5e4b385 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] ### Fixed - Use a different algorithm for finding a CAS directory to avoid issues with mounted drives by @daimond113 +- Remove default.project.json from Git pesde dependencies by @daimond113 ### Changed - Switched to fs-err for better errors with file system operations by @daimond113 diff --git a/src/source/git/mod.rs b/src/source/git/mod.rs index c1fb812..5c4d1d0 100644 --- a/src/source/git/mod.rs +++ b/src/source/git/mod.rs @@ -14,6 +14,7 @@ use crate::{ git::{pkg_ref::GitPackageRef, specifier::GitDependencySpecifier}, git_index::GitBasedSource, specifiers::DependencySpecifiers, + traits::PackageRef, PackageSource, ResolveResult, VersionId, IGNORED_DIRS, IGNORED_FILES, }, util::hash, @@ -445,6 +446,15 @@ impl PackageSource for GitPackageSource { continue; } + if pkg_ref.use_new_structure() && path == "default.project.json" { + log::debug!( + "removing default.project.json from {}#{} - using new structure", + pkg_ref.repo, + pkg_ref.tree_id + ); + continue; + } + let data = object.into_blob().data.clone(); let hash = store_in_cas(project.cas_dir(), &data)?.0;