Skip to content

Switch logging for pixi search from error to warning #23710

Closed

Description

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)

Activity

  1. changed the title [-]switch logging for pixi search[/-] [+]Switch logging for pixi search from error to warning[/+] on Jun 26, 2024
  2. baszalmstra commented on Jul 9, 2024

    @baszalmstra

    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?

  3. karthiknadig commented on Jul 9, 2024

    @karthiknadig
    Member

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

  4. anthonykim1 commented on Sep 24, 2024

    @anthonykim1

    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

Metadata

Metadata

Labels

bugIssue identified by VS Code Team member as probable bugtriage-neededNeeds assignment to the proper sub-team

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions