gauge-sh / tach

A Python tool to enforce dependencies, using modular architecture 🌎 Open source 🐍 Installable via pip 🔧 Able to be adopted incrementally - ⚡ Implemented with no runtime impact ♾️ Interoperable with your existing systems 🦀 Written in rust
https://gauge.sh
MIT License
1.01k stars 35 forks source link

tach vscode extension not working with `.toml` #277

Closed h0uter closed 2 weeks ago

h0uter commented 3 weeks ago

it appears the vscode extension is still looking for a .yml file after setting a root with a tach.toml in the vscode extension settings.

  File "/Users/wjmeijer/.vscode/extensions/gauge.tach-0.5.2-darwin-arm64/bundled/tool/lsp_server.py", line 273, in _run_tool_on_document
    boundary_errors = run_tach_check(argv=argv, path=document.path)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/wjmeijer/.vscode/extensions/gauge.tach-0.5.2-darwin-arm64/bundled/tool/tach_util.py", line 22, in run_tach_check
    raise TachSetupError(
tach.errors.TachSetupError:  tach.(yml|yaml) not found in ~/Repositories/<REDACTED>

2024-08-28 12:00:06.815 [info] Failed to handle notification "textDocument/didSave": DidSaveTextDocumentParams(text_document=TextDocumentIdentifier(uri='file:///Users/wjmeijer/Repositories/<REDACTED>'), text=None)
Traceback (most recent call last):
  File "/Users/wjmeijer/.vscode/extensions/gauge.tach-0.5.2-darwin-arm64/bundled/libs/pygls/protocol/json_rpc.py", line 245, in _handle_notification
    self._execute_notification(handler, params)
  File "/Users/wjmeijer/.vscode/extensions/gauge.tach-0.5.2-darwin-arm64/bundled/libs/pygls/protocol/json_rpc.py", line 153, in _execute_notification
    handler(*params)
  File "/Users/wjmeijer/.vscode/extensions/gauge.tach-0.5.2-darwin-arm64/bundled/tool/lsp_server.py", line 86, in did_save
    diagnostics: list[lsp.Diagnostic] = _linting_helper(document)
                                        ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/wjmeijer/.vscode/extensions/gauge.tach-0.5.2-darwin-arm64/bundled/tool/lsp_server.py", line 102, in _linting_helper
    boundary_errors = _run_tool_on_document(document)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/wjmeijer/.vscode/extensions/gauge.tach-0.5.2-darwin-arm64/bundled/tool/lsp_server.py", line 273, in _run_tool_on_document
    boundary_errors = run_tach_check(argv=argv, path=document.path)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/wjmeijer/.vscode/extensions/gauge.tach-0.5.2-darwin-arm64/bundled/tool/tach_util.py", line 22, in run_tach_check
    raise TachSetupError(
tach.errors.TachSetupError:  tach.(yml|yaml) not found in ~/Repositories/<REDACTED>

2024-08-28 12:00:06.815 [info] [Trace - 12:00:06 PM] Received notification 'window/showMessage'.
2024-08-28 12:01:06.531 [info] [Trace - 12:01:06 PM] Sending request 'shutdown - (1)'.
2024-08-28 12:01:06.544 [info] [Trace - 12:01:06 PM] Received response 'shutdown - (1)' in 22ms.
2024-08-28 12:01:06.544 [info] [Trace - 12:01:06 PM] Sending notification 'exit'.
emdoyle commented 2 weeks ago

It looks like the extension is still shipping with tach 0.5.2! I'll make sure an up-to-date version is shipped today.

sparshg commented 2 weeks ago

@emdoyle tach-vscode was updated to 0.10.0 in a recent PR. There are some other fixes I had opened, https://github.com/gauge-sh/tach-vscode/pulls if someone you can review there.

caelean commented 2 weeks ago

@sparshg @h0uter the extension should be updated and published. I'm still seeing some finicky behavior in some cases so lmk if it's working on your end!