Closed pinkwah closed 3 years ago
I think making Komodo environments auto-detected off of transient releases is a very legitimate use case for developers and power users. It should be hard to do however, so as to aid non-power users in not making the mistake of targeting a release that is to be deleted and impossible to track.
You could maybe compare this with virtualenv
's own --no-download
? There are use cases for it but not for the regular user.
I suggest --no-update
and a warning about possible deletion, and a failure if the switch isn't turned on.
Point is, you don't have to spell out the release name (information the tool already should have) and you also clarify intent. Ie. I want it to not update, or it was my intention to be silly or whatever.
Yes. I was thinking of something like:
(2019.01.10)$ komodoenv kenv
Error: Your current komodo release (2019.01.10) is a transient release and will not be able to update. If you intended to create a non-updatable komodoenv, use:
$ komodoenv --release=2019.01.10 kenv
Part of my point was that you wouldn't have to specifically enter the release name, just a generic option.
Or are you saying you want the specific release name to be entered?
I can do either really. I think there are nice arguments for both versions of the solution (which is to not allow by default, but give a message with a work-around).
In your example, maybe we can have --no-track
and --track=testing
, with the added benefit of being able to go around the (currently broken) heuristic.
Added --no-update
option. Hopefully it has a sufficiently informative message. Closing.
komodoenv
will not work if you are in a non-symlinked komodo release. That is, if you've sourcedstable-py36
, then simply doingkomodoenv kenv
will create it based on whatever specific versionstable-py36
is, and mark the environment as targettingstable-py36
.However, suppose you source
2020.10.b8-py36
and none ofstable
,testing
,unstable
orbleeding
point to it. I considered this to be dangerous, so I decided not to do anything in this case, and havekomodoenv
fail unless you specify a release with--release=
.1: Is this a good idea? 2: If it is, provide a message that will tell the user of the dangers and suggest running
komodoenv
, but with--release
specified.https://github.com/equinor/komodoenv/blob/2ebcd9d3992e3059168a49bf94b2b03475aab122/komodoenv/__main__.py#L60-L62