Skip to content

Switch logging for pixi search from error to warning #23710

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

Closed
eleanorjboyd opened this issue Jun 26, 2024 · 4 comments
Closed

Switch logging for pixi search from error to warning #23710

eleanorjboyd opened this issue Jun 26, 2024 · 4 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug triage-needed Needs assignment to the proper sub-team

Comments

@eleanorjboyd
Copy link
Member

Currently the extension prints an error if it cannot find pixi envs, it should instead warn and only give full info on verbose mode to reduce noise in the output panel.

2024-06-26 11:52:57.554 [error] Reading directory to watch failed [Error: ENOENT: no such file or directory, scandir '/Users/eleanorboyd/vscode-python/.pixi/envs'
	at Object.readdirSync (node:fs:1515:3)
	at t.readdirSync (node:electron/js2c/node_init:2:11289)
	at /Users/eleanorboyd/.vscode-insiders/extensions/ms-python.python-2024.9.2024062601-darwin-arm64/out/client/extension.js:2:574446
	at /Users/eleanorboyd/.vscode-insiders/extensions/ms-python.python-2024.9.2024062601-darwin-arm64/out/client/extension.js:2:574637
	at Array.map (<anonymous>)
	at d.initWatchers (/Users/eleanorboyd/.vscode-insiders/extensions/ms-python.python-2024.9.2024062601-darwin-arm64/out/client/extension.js:2:574355)
	at async d.ensureWatchersReady (/Users/eleanorboyd/.vscode-insiders/extensions/ms-python.python-2024.9.2024062601-darwin-arm64/out/client/extension.js:2:536827)] {
  errno: -2,
  syscall: 'scandir',
  code: 'ENOENT',
  path: '/Users/eleanorboyd/vscode-python/.pixi/envs'
}
2024-06-26 11:52:57.554 [error] Dir "/Users/eleanorboyd/vscode-python/.pixi/envs" is not watchable (directory does not exist)
@eleanorjboyd eleanorjboyd added the bug Issue identified by VS Code Team member as probable bug label Jun 26, 2024
@github-actions github-actions bot added the triage-needed Needs assignment to the proper sub-team label Jun 26, 2024
@karthiknadig karthiknadig changed the title switch logging for pixi search Switch logging for pixi search from error to warning Jun 26, 2024
@karthiknadig
Copy link
Member

@baszalmstra @tdejager

@baszalmstra
Copy link

Should we just change this line here:

traceError('Reading directory to watch failed', exception);

Or move the logging below the if statement for when the directory doesnt exist?

@karthiknadig
Copy link
Member

You can just change the function to traceVerbose, I think the location is fine.

@anthonykim1
Copy link

I'm closing this as its completed by this PR in august: #23942 and https://github.com/microsoft/vscode-python/pull/23937/files

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue identified by VS Code Team member as probable bug triage-needed Needs assignment to the proper sub-team
Projects
None yet
Development

No branches or pull requests

4 participants