Skip to content

Error notification from extension when Git conflict markers exist #733

@anden-akkio

Description

@anden-akkio

The Problem

During any Git merge conflict where pyproject.toml ends up with the markers in it, the extension pops up an error bubble:

Image

The extension logs look like this, pretty clearly corroborating the merge marker thing:

2025-03-31 08:33:27.057587000 ERROR Failed to parse /Users/andenacitelli/akkio/packages/akkio-python-shared/pyproject.toml: TOML parse error at line 3, column 1
  |
3 | <<<<<<< HEAD
  | ^
invalid key

By the letter of the law this probably isn't a bug (after all, an extension shouldn't be expected to still work if the config file isn't broken), but it's pretty annoying to have to manually close this each time.

Other potentially notable information:

  • To my knowledge and decent bit of research, VSCode provides no mechanism to turn error-level notifications off for extensions. You can disable info and warning level notifications, but there's simply no lever for error-level notifications like this.
  • I do not resolve merge conflicts in VSCode itself. I do it in IntelliJ (I prefer their merge resolution UI) and then tab back into VSCode, at which point I get this error.
  • The basedpyright extension also sends an error notification in the same case. Obviously not under your purview to fix, but still relevant.

For the record, big fan of Ruff -- keep up the great work!

Proposed Solution

Not sure an objectively "best" solution exists, but what came to mind first:

  • If extension can't parse the config file but finds a conflict marker in the file, print a message at warn level instead of error level. This still surfaces it, but lets people at least opt out.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions