You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* fix: properly handle target-specific dependencies in backends
The backends were incorrectly trying to evaluate rattler-build selector
expressions (like `host_platform == 'linux-64'`) using simple string
comparison against platform strings (like `"linux-64"`), which always
failed. This meant target-specific dependencies were never properly
resolved.
Changes:
- Use ProjectModel::dependencies() with platform parameter to get
properly filtered dependencies instead of manually resolving selectors
- Add Contains trait and implementations for checking package names in
dependency maps
- Add Dependencies::build_and_host_names() helper method for getting
package names from build and host dependencies
- Update all backends (python, rust, cmake, mojo) to use the new
approach
- Remove unused ConditionalRequirements::resolve() calls
- Clean up unused imports
This fixes the issue reported in prefix-dev/pixi#4802 where
target-specific dependencies were not being injected into the generated
recipes.
* refactor: simplify compiler requirements function to accept Dependencies directly
- Replace generic add_compilers_to_requirements_by_name with add_compilers_to_requirements_with_dependencies
- Pass Dependencies struct directly instead of using Contains trait
- Fix Python check in cmake backend to only check host dependencies
- Add unit tests for target-specific dependency handling
- Tests verify that ProjectModel.dependencies() correctly filters deps by platform
* test: improve target-specific dependency tests to verify actual conditions
- Check that conditional items contain the correct package name (openssl/gcc)
- Verify the condition matches the expected platform selector
- Tests now properly validate that linux-64 conditions include linux-64 deps
- Tests now properly validate that unix conditions include unix deps
* refactor: remove unused Contains trait and simplify dependency checks
- Remove unused add_compilers_to_requirements and add_compilers_and_stdlib_to_requirements
- Remove Contains trait and all implementations
- Remove Contains imports from all backend files
- Use contains_key with SourcePackageName for dependency checks
- Fix has_openssl to only check host dependencies
- Fix conditional tests to match exact condition strings
- Remove unused boltons dependencies from test fixtures
* fix: use host_platform for all target-specific dependency conditionals
- Change build, host, and run dependencies to all use host_platform
- Update tests to expect host_platform in conditions
- This ensures that target selectors match the actual target platform
* refactor: rename add_compilers_to_requirements_with_dependencies to add_compilers_to_requirements
Since we removed the old add_compilers_to_requirements function, we can now use the simpler name for the Dependencies-based version.
* fixes
* fix formatting and clippy
* Small improvements
---------
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Julian Hofer <julianhofer@gnome.org>
0 commit comments