Skip to content

Conversation

@tdejager
Copy link
Contributor

@tdejager tdejager commented Oct 20, 2025

This fixes some of the misc backend issues:

  • debug-dir and debug_dir were mixed up, debug-dir is used by this backend and debug_dir is used by pixi. I want to change pixi to allow for both as well.
  • It will always rebuild because the build folder was being deleted. This changes the script and makes the whole thing so much more useful for rebuilds.

@tdejager tdejager requested a review from ruben-arts October 20, 2025 09:07
Copy link
Contributor Author

Ended up setting license-file to none until we get something like this in: prefix-dev/rattler-build#1947 we won't really be able to handle this correct for out-of-tree builds. We should think of a solution though :)

- Modified license_file() method to return None with TODO comment
- Updated test assertions to expect None instead of filename
- Removed broken license_file tests
- Updated snapshots to reflect missing license_file field
Copy link
Contributor

@ruben-arts ruben-arts left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only a question about the validation alias for debug-dir. Rest looks good.

tdejager and others added 3 commits October 20, 2025 15:54
The RustBackendConfig struct uses #[serde(rename_all = "kebab-case")], which means
it already only accepts debug-dir (with hyphen), not debug_dir (with underscore).
This test documents and verifies this behavior.
All backend configurations now accept both kebab-case (debug-dir) and
snake_case (debug_dir) for the debug_dir field using serde's alias attribute.

This provides better flexibility for users who may be familiar with either
naming convention.

Changes:
- Added #[serde(alias = "debug_dir")] to debug_dir fields in:
  - RustBackendConfig
  - PythonBackendConfig
  - CMakeBackendConfig
  - MojoBackendConfig
  - RattlerBuildBackendConfig
  - TestBackendConfig
- Updated PyBackendConfig custom deserializer to check for both formats
- Updated test to verify both formats are accepted
@tdejager
Copy link
Contributor Author

@ruben-arts we should allow both now :)

@ruben-arts ruben-arts enabled auto-merge (squash) October 20, 2025 14:51
@ruben-arts ruben-arts merged commit 4b866a6 into prefix-dev:main Oct 20, 2025
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants