Open Bug 1767075 Opened 3 years ago Updated 1 month ago

./mach ide vscode fails with FileNotFoundError

Categories

(Developer Infrastructure :: Developer Environment Integration, defect, P5)

Tracking

(Not tracked)

People

(Reporter: mcomella, Unassigned)

References

(Blocks 1 open bug)

Details

Steps to reproduce

  • rm -rf <mc>/.vscode
  • ./mach ide vscode

Expected results

Command passes.

Actual results

Configuration for /Users/mcomella/dev/mozilla-central/.vscode/settings.json will be created.
Error running mach:

    ['ide', 'vscode']

The error occurred in the implementation of the invoked mach command.

This should never occur and is likely a bug in the implementation of that
command.
You can invoke |./mach busted| to check if this issue is already on file. If it
isn't, please use |./mach busted file ide| to report it. If |./mach busted| is
misbehaving, you can also inspect the dependencies of bug 1543241.

If filing a bug, please include the full output of mach, including this error
message.

The details of the failure are as follows:

FileNotFoundError: [Errno 2] No such file or directory: '/Users/mcomella/dev/mozilla-central/.vscode/settings.json'

  File "/Users/mcomella/dev/mozilla-central/python/mozbuild/mozbuild/backend/mach_commands.py", line 112, in run
    return setup_vscode(command_context, vscode_cmd)
  File "/Users/mcomella/dev/mozilla-central/python/mozbuild/mozbuild/backend/mach_commands.py", line 276, in setup_vscode
    with open(vscode_settings, "w") as fh:

Sentry event ID: fec076553fcd4d11a8099f3e0499b325

I deleted .vscode because I was trying to get Visual Studio Code to reindex m-c. I closed the workspace in the app (it was still running otherwise), did the rm and ran ./mach ide vscode. I'm not sure this would otherwise come up but I think the command should be robust enough to not fail if the parent directory doesn't exist.

The severity field is not set for this bug.
:andi, could you have a look please?

For more information, please visit auto_nag documentation.

Flags: needinfo?(bpostelnicu)
Severity: -- → S4
Flags: needinfo?(bpostelnicu)
Priority: -- → P5
Product: Firefox Build System → Developer Infrastructure
You need to log in before you can comment on or make changes to this bug.