Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multi-root Workspace Support #7

Open
asergeant01 opened this issue Jan 11, 2022 · 2 comments
Open

Multi-root Workspace Support #7

asergeant01 opened this issue Jan 11, 2022 · 2 comments

Comments

@asergeant01
Copy link

Doesn't seem to behave as expected for multi-root workspaces

Select and run multiple tox environments doesn't do anything

@The-Compiler
Copy link
Owner

Some docs, as a note to myself:

We do however already use vscode.workspace.getWorkspaceFolder(docUri); (with that being based on the current document, vscode.window.activeTextEditor?.document.uri):

function findProjectDir() {
const docUri = vscode.window.activeTextEditor?.document.uri;
if (!docUri) {
throw new Error("No active editor found.");
}
const workspace = vscode.workspace.getWorkspaceFolder(docUri);
if (workspace) {
const folder = workspace.uri.fsPath;
console.log(`tox workspace folder: ${folder}`);
return folder;
}
const docPath = docUri.fsPath;
const docDir = path.dirname(docPath);
console.log(`tox doc path: ${docPath} -> ${docDir}`);
return docDir;
}

Thus, I would expect this to work fine in theory. Haven't tried to reproduce yet, though - I'm afraid this project is on the back-burner a bit, as I'm busy with my main project (qutebrowser).

@The-Compiler
Copy link
Owner

FWIW, the task integration added in #12 does seem to support multi-root workspaces and collects all tox envs from all found tox.ini files.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants