flox
flox copied to clipboard
flox activate should prompt to add a missing system like flox pull does
Describe the feature:
This is a small UX rough edge, when I try to flox activate
in an environment where the manifest doesn't include my current system, it returns an error instead of prompting me to add my system and continuing to activate the environment.
I would like flox to handle this in a way that would be less confusing for end users, ideally it would automatically add the new system to the manifest. It would be fine if flox emitted a message telling the user how to add their system as well.
Describe a use case of this feature:
Users may not be aware of how to handle this and even though the fix is straightforward it would be nice to hide this rough edge from users as much as possible.
Acceptance criteria:
below AC initially written by @ghudgins in an edit to the original issue
Given an environment exists in a repo somewhere that has aarch64-darwin
as the only supported environment
And I am on a aarch64-linux
machine
When I clone a repo containing the above environment
And I flox activate
it
Then I see interactive prompt (like flox pull's):
The environment you are trying to activate is not yet compatible with your system (aarch64-linux).
Don't activate this environment.
> Add 'aarch64-linux' to supported systems and activate this environment.
1. Success building And When I activate anyway And the environment builds on my current system Then I see an active environment And the manifest is updated with the aarch64-linux system (in addition to darwin)
2. Failure building And When I activate anyway And the environment fails to build on my current system (contains darwin-only packages) Then I see the build error (we have one that suggests editing the manifest to resolve)
I think we could do this for activate -d
but it probably wouldn't make sense for activate -r
added some UX AC. based on the discussion. @jennymahmoudi take a look when you can! (and anyone else for that matter). hope you don't mind I edited your original comment but marked clearly where I started writing @cullenmcdermott
Looks great, no changes! 👍
in June we launched Flox 1.1 and this has multi-system locking by default. I think this alleviates the need for this issue as all environments are cross platform.
still a valid issue but wanted to post the progress since I think you'll encounter it less!