feat: add built_against field for ABI-sensitive dependencies

- Introduced a new field `built_against` in the InstalledPackageRecord struct to track concrete package names for ABI-sensitive dependencies.
- Updated database schema to include `built_against` column in the packages table.
- Modified package registration and listing functions to handle the new `built_against` field.
- Implemented helper functions to format and parse the `built_against` data.
- Enhanced tests to verify the correct handling of the `built_against` metadata during package registration and retrieval.
- Updated resolver logic to utilize `built_against` for dependency resolution.
This commit is contained in:
2026-06-16 06:35:08 -05:00
parent ffe6e4868f
commit 65e48ed280
28 changed files with 568 additions and 40 deletions
+13
View File
@@ -603,6 +603,19 @@ fn parse_dependency_list(metadata: &toml::Value, kind: &str) -> Vec<String> {
.unwrap_or_default()
}
fn parse_metadata_string_list(metadata: &toml::Value, key: &str) -> Vec<String> {
metadata
.get(key)
.and_then(|v| v.as_array())
.map(|arr| {
arr.iter()
.filter_map(|v| v.as_str())
.map(String::from)
.collect()
})
.unwrap_or_default()
}
fn parse_keep_list(metadata: &toml::Value) -> Vec<String> {
if let Some(s) = metadata.get("keep").and_then(|v| v.as_str()) {
return vec![s.to_string()];