Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
6769b76
Stub out ComponentAdapter.
ericsnowcurrently Sep 3, 2020
192c4b0
Implement ComponentAdapter.isMacDefaultPythonPath().
ericsnowcurrently Sep 8, 2020
0009f46
Implement ComponentAdapter.isWindowsStoreInterpreter().
ericsnowcurrently Sep 8, 2020
8034272
Implement ComponentAdapter.isCondaEnvironment().
ericsnowcurrently Sep 8, 2020
26e3736
Implement ComponentAdapter.hasInterpreters().
ericsnowcurrently Sep 8, 2020
2889a20
Add a convertEnvInfo() helper.
ericsnowcurrently Sep 8, 2020
2394160
Implement ComponentAdapter.getInterpreterInformation().
ericsnowcurrently Sep 8, 2020
200595d
Implement ComponentAdapter.getInterpreterDetails().
ericsnowcurrently Sep 8, 2020
4837898
Implement ComponentAdapter.getCondaEnvironment().
ericsnowcurrently Sep 9, 2020
cfd1796
Implement ComponentAdapter.getInterpreters().
ericsnowcurrently Sep 9, 2020
424aa09
Drop a dead line of code.
ericsnowcurrently Sep 9, 2020
63b5e83
Move IComponentAdapter to interpreter/contracts.ts.
ericsnowcurrently Sep 10, 2020
e9589d2
Drop the ComponentAdapter constructor placeholder code.
ericsnowcurrently Sep 10, 2020
6972c7c
Start out with the adapter disabled.
ericsnowcurrently Sep 10, 2020
941f8c0
lint
ericsnowcurrently Sep 15, 2020
3f79e87
Avoid an import cycle.
ericsnowcurrently Sep 15, 2020
7769f09
Use object destructuring for convertEnvInfo().
ericsnowcurrently Sep 15, 2020
99add1f
Use the "resource" arg in getInterpreterDetails().
ericsnowcurrently Sep 16, 2020
ed94edf
Drop "options" from the adapter getInterpreters().
ericsnowcurrently Sep 16, 2020
5e380ff
Fix a typo.
ericsnowcurrently Sep 16, 2020
6667d60
Clarify about when `undefined` is returned from the adapter methods.
ericsnowcurrently Sep 16, 2020
4271fd4
Use a map for converting the env kinds.
ericsnowcurrently Sep 16, 2020
c04c6f5
Handle iterator.onUpdated in ComponentAdapter.getInterpreters().
ericsnowcurrently Sep 16, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Avoid an import cycle.
  • Loading branch information
ericsnowcurrently committed Sep 16, 2020
commit 3f79e87f4b6a650ccc531f2c44ff482530a2bd3c
10 changes: 5 additions & 5 deletions src/client/pythonEnvironments/legacyIOC.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import {
import { IPipEnvServiceHelper, IPythonInPathCommandProvider } from '../interpreter/locators/types';
import { IServiceContainer, IServiceManager } from '../ioc/types';
import { PythonEnvInfo, PythonEnvKind, PythonReleaseLevel } from './base/info';
import { PythonLocatorQuery } from './base/locator';
import { ILocator, PythonLocatorQuery } from './base/locator';
import { initializeExternalDependencies } from './common/externalDependencies';
import { PythonInterpreterLocatorService } from './discovery/locators';
import { InterpreterLocatorHelper } from './discovery/locators/helpers';
Expand Down Expand Up @@ -58,8 +58,6 @@ import { GetInterpreterLocatorOptions } from './discovery/locators/types';
import { EnvironmentType, PythonEnvironment } from './info';
import { EnvironmentInfoService, IEnvironmentInfoService } from './info/environmentInfoService';

import { PythonEnvironments } from '.';

function convertEnvInfo(info: PythonEnvInfo): PythonEnvironment {
Comment thread
ericsnowcurrently marked this conversation as resolved.
const env: PythonEnvironment = {
envType: EnvironmentType.Unknown,
Expand Down Expand Up @@ -112,11 +110,13 @@ function convertEnvInfo(info: PythonEnvInfo): PythonEnvironment {
return env;
}

interface IPythonEnvironments extends ILocator {}

@injectable()
class ComponentAdapter implements IComponentAdapter {
constructor(
// The adapter only wraps one thing: the component API.
private readonly api: PythonEnvironments,
private readonly api: IPythonEnvironments,
// For now we effecitvely disable the component.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// For now we effecitvely disable the component.
// For now we effectively disable the component.

private readonly enabled = false,
) {}
Expand Down Expand Up @@ -251,7 +251,7 @@ class ComponentAdapter implements IComponentAdapter {
export function registerForIOC(
serviceManager: IServiceManager,
serviceContainer: IServiceContainer,
api: PythonEnvironments,
api: IPythonEnvironments,
): void {
const adapter = new ComponentAdapter(api);
serviceManager.addSingletonInstance<IComponentAdapter>(IComponentAdapter, adapter);
Expand Down