Skip to content

feat: allow prefixes to be created outside of rattler-build #1771

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed

Conversation

baszalmstra
Copy link
Contributor

Summary

This PR adds finalized_host_prefix and finalized_build_prefix fields to the Output struct, enabling external management of prefix creation outside of rattler-build. This allows external tooling to control when and how build environments are created.

Technical Details

Key changes across 13 files:

  • Added finalized_host_prefix and finalized_build_prefix as Option<Prefix> fields to Output
  • Refactored install_environments method to consume self and return Output with finalized prefixes
  • Updated prefix() method to return Option<&Prefix> instead of &Path
  • Modified environment variable handling to use finalized prefixes when available

Breaking Changes

  • install_environments method signature changed from &self to self, returns Output
  • prefix() method now returns Option<&Prefix> instead of &Path

Use Cases

This enables external build systems to:

  • Control prefix creation timing and location
  • Implement custom caching strategies
  • Better manage resource cleanup
  • Inject prefixes for testing

The finalized prefixes provide clear separation between configuration (where prefixes should be) and reality (where they actually are).

@baszalmstra baszalmstra requested a review from wolfv July 7, 2025 14:38
@baszalmstra baszalmstra force-pushed the feat/finalized_prefixes branch from c7bbb29 to 4b5489e Compare July 8, 2025 07:49
@baszalmstra
Copy link
Contributor Author

@wolfv @zelosleone I dont see how my code could have made the tests fail, can you take a look?

@zelosleone zelosleone force-pushed the feat/finalized_prefixes branch from 75a0139 to 04f1056 Compare July 22, 2025 10:51
@zelosleone
Copy link
Collaborator

zelosleone commented Jul 22, 2025

This pr needs two things now:

After these two things, it should be good to merge!

@baszalmstra
Copy link
Contributor Author

Superseded by #1790

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