fix: remove default.project.json from git pesde dependencies

This commit is contained in:
daimond113 2024-11-03 13:06:59 +01:00
parent 09820e322c
commit 620777cacf
No known key found for this signature in database
GPG key ID: 3A8ECE51328B513C
2 changed files with 11 additions and 0 deletions

View file

@ -8,6 +8,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased] ## [Unreleased]
### Fixed ### Fixed
- Use a different algorithm for finding a CAS directory to avoid issues with mounted drives by @daimond113 - 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 ### Changed
- Switched to fs-err for better errors with file system operations by @daimond113 - Switched to fs-err for better errors with file system operations by @daimond113

View file

@ -14,6 +14,7 @@ use crate::{
git::{pkg_ref::GitPackageRef, specifier::GitDependencySpecifier}, git::{pkg_ref::GitPackageRef, specifier::GitDependencySpecifier},
git_index::GitBasedSource, git_index::GitBasedSource,
specifiers::DependencySpecifiers, specifiers::DependencySpecifiers,
traits::PackageRef,
PackageSource, ResolveResult, VersionId, IGNORED_DIRS, IGNORED_FILES, PackageSource, ResolveResult, VersionId, IGNORED_DIRS, IGNORED_FILES,
}, },
util::hash, util::hash,
@ -445,6 +446,15 @@ impl PackageSource for GitPackageSource {
continue; 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 data = object.into_blob().data.clone();
let hash = store_in_cas(project.cas_dir(), &data)?.0; let hash = store_in_cas(project.cas_dir(), &data)?.0;