Skip to content

Commit 8e13f1d

Browse files
committed
updates
1 parent b670e8e commit 8e13f1d

File tree

10 files changed

+169
-1754
lines changed

10 files changed

+169
-1754
lines changed

docs/overlapping-projects-test-ownership.md

Lines changed: 0 additions & 312 deletions
This file was deleted.

docs/project-based-testing-design.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -751,6 +751,34 @@ function createDefaultProject(workspaceUri) {
751751
}
752752
```
753753

754+
**Workspaces Without Environment Extension:**
755+
756+
When the Python Environments extension is not available or returns no projects:
757+
758+
1. **Detection**: `discoverWorkspaceProjects()` catches API errors or empty results
759+
2. **Fallback Strategy**: Calls `createDefaultProject(workspaceUri)` which:
760+
- Uses the workspace's active interpreter via `interpreterService.getActiveInterpreter()`
761+
- Creates a mock `PythonProject` with workspace URI as project root
762+
- Generates a project ID from the workspace URI: `default-{workspaceUri.fsPath}`
763+
- Mimics the legacy single-workspace behavior, but wrapped in `ProjectAdapter` structure
764+
765+
3. **Key Characteristics**:
766+
- Single project per workspace (legacy behavior preserved)
767+
- No project scoping in test IDs (projectId is optional in resolver)
768+
- Uses workspace-level Python interpreter settings
769+
- All tests belong to this single "default" project
770+
- Fully compatible with existing test discovery/execution flows
771+
772+
4. **Graceful Upgrade Path**:
773+
- When user later installs the Python Environments extension, next discovery will:
774+
- Detect actual Python projects in the workspace
775+
- Replace the default project with real project adapters
776+
- Rebuild test tree with proper project scoping
777+
- No data migration needed - discovery rebuilds from scratch
778+
779+
This design ensures zero functional degradation for users without the new extension, while providing an instant upgrade path when they adopt it.
780+
```
781+
754782
---
755783
756784
### 5. Project Discovery Triggers

env-api.js

Lines changed: 0 additions & 14 deletions
This file was deleted.

env-api.js.map

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)