feat: Add conda as a managed tool with conda-spawn activation#116
Closed
mattkram wants to merge 23 commits into
Closed
feat: Add conda as a managed tool with conda-spawn activation#116mattkram wants to merge 23 commits into
mattkram wants to merge 23 commits into
Conversation
3291ac6 to
430cd55
Compare
bb3b66f to
5c2e03b
Compare
f6c804d to
6120112
Compare
feat: Add additional conda plugins, based on miniconda
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Update ana_binary fixture to look for ana.exe on Windows - Update conda_wrapper fixture to use conda.exe on Windows - Skip conda wrapper tests when ana_binary is not found Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The create_wrapper_symlink function was not using paths::binary_name() to add the .exe extension on Windows, causing the conda wrapper symlink to be created without the extension. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Update conda_wrapper to use specs module after rename - Remove useless .into() conversion in cli.rs - Allow dead_code for make_download_client (future use) - Replace 3.14 with 1.5 in tests to avoid approx_constant lint - Use is_some_and instead of map_or in spool.rs
- Mark conda tool as experimental in specs - Show styled warning on install with highlighted commands - Update design doc with experimental status section
Switch from exec() to spawn+wait on Unix so we can intercept exit codes. When conda exits non-zero, show a hint to report issues via ana self feedback.
The constraint was likely added to avoid a deprecation warning but is no longer necessary.
bcb02d8 to
ad3b63c
Compare
Instead of having ana detect when it's invoked as "conda" via symlink, we now compile a standalone wrapper binary (src/wrappers/conda.rs) that gets embedded into ana and written to ~/.ana/bin/conda on install. Benefits: - Cleaner separation of concerns - Same approach on all platforms - Wrapper is self-contained and independently testable - No need for ana to detect invocation context The wrapper binary is ~500KB and includes all the conda-spawn UX: - Intercepts activate/deactivate/init with helpful messages - Aliases shell -> spawn - Filters create output to show spawn instructions - Shows feedback hint on errors
- Remove incorrect CEP 22 reference for conda-spawn (no CEP exists for it) - Fix CEP 22 URL to use correct zero-padded format (cep-0022.md) - CEP 22 is about frozen environments, not conda-spawn
Document what we would need from conda-express to use it as a foundation: - Customizable installation paths - Custom .condarc support - Custom lockfile support - Wrapper customization Also clarify wrapper differences and current implementation gaps.
Remove outdated docs/conda.md (had stale info about symlink approach). Add troubleshooting section and references to the design doc.
Collaborator
Author
|
Closing to minimize CI churn, as the technical approach is further evaluated. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Note
This is a work in progress, reflecting technical evaluation of an experimental upcoming feature.
Summary
This PR adds conda as a managed tool in ana, providing a lightweight alternative to traditional Miniconda/Anaconda installations. The implementation shares design philosophy with conda-express (cx) by Jannis Leidel.
Key Features
ana tool install condaconda shell myenv) instead of traditionalconda activateshellalias:conda shellworks as an alias forconda spawn(matching cx's UX)activate,deactivate, andinitwith guidanceComparison with conda-express
shellcommand aliasDifferences: ana is a multi-tool manager (conda, pixi, anaconda-cli) while cx is conda-only. ana defaults to Anaconda's main channel; cx defaults to conda-forge.
Changes
activate/deactivate/initwith helpful messagesshell→spawnfor cx-compatible UXcreateoutput to show conda-spawn instructions.condarcwith Anaconda channel defaultsUsage
Test Plan
ana tool install condainstalls conda successfullyconda --versionworks via wrapperconda activateshows helpful error pointing toconda shellconda shell myenvspawns a subshell (alias forconda spawn)conda initshows helpful messageconda createoutput is filtered to show spawn instructionsDocumentation
Added
docs/conda.mdexplaining the conda integration and comparing it with conda-express.