Skip to content

Clear documentation on the arguments for resolveEnvironment #20220

@DonJayamanne

Description

@DonJayamanne

Currently the the argument string is not very clearly defined in the docs of the code

        /**
         * Returns details for the given environment, or `undefined` if the env is invalid.
         * @param environment : Full path to environment folder or python executable for the environment. Can also pass
         * the environment itself.
         */
        resolveEnvironment(
            environment: Environment | EnvironmentPath | string,
        ): Promise<ResolvedEnvironment | undefined>;

We have 3 types of arguments, the one that is confusing is the string.
From what I can tell the string value can be either one of the following:

  • Fully qualified path to the python executable
  • Fully qualified path to the python environment.

Please could you confirm the above.

I don't want to assume that Full path to environment folder or python executable for the environment means this refers to the string argument, as this could apply to the EnvironmentPath as well.

We have run into a few issues due to misunderstanding the above argument and would like this clarified.
Also, we're using the return value of the command python.createEnvironment to resolve an environment (using the path or the return value as an argument to resolveEnvironment).

Metadata

Metadata

Assignees

Labels

area-environmentsFeatures relating to handling interpreter environmentsfeature-requestRequest for new features or functionalityneeds PRReady to be worked onverification-neededVerification of issue is requestedverifiedVerification succeeded

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions