Skip to content
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

Issue running UltestDebugNearest with Go #42

Closed
awwalker opened this issue May 27, 2021 · 1 comment
Closed

Issue running UltestDebugNearest with Go #42

awwalker opened this issue May 27, 2021 · 1 comment

Comments

@awwalker
Copy link

Describe the bug

Setting a breakpoint in a Golang test and then running :UltestDebugNearest results in:

error caught in async handler '/Users/awalker/.local/share/nvim/plugged/vim-ultest/rplugin/python3/ultest:function:_ultest_external_result [[{'namespaces': [], 'id': 'TestParseLoginMethodExtractionComplete-5127535966012300037', 'col': 1, 'name': 'TestParseLoginMetho
dExtractionComplete', 'line': 29, 'type': 'test', 'running': 0, 'file': 'services/scheduler/upload/login_method_extraction_complete_test.go'}, 0, '/var/folders/hh/nbqckpb91qv7t2q3n8kcgqt022nfxk/T/nvimwKMAye/2']]'
Traceback (most recent call last):
  File "/Users/awalker/.local/share/nvim/plugged/vim-ultest/rplugin/python3/ultest/__init__.py", line 114, in _external_result
    return self.handler.external_result(*args)
  File "/Users/awalker/.local/share/nvim/plugged/vim-ultest/rplugin/python3/ultest/handler/__init__.py", line 90, in external_result
    raise ValueError(f"Unknown file {file_name}")
ValueError: Unknown file 0

Logs:

   1   │ 16:58:37 | INFO | MainThread | logging.py:create_logger:98 | Logger created
   2   │ 16:58:37 | DEBUG | MainThread | __init__.py:__init__:41 | Handler created
   3   │ 16:58:37 | DEBUG | Thread-1 | __init__.py:_handle_coroutine:57 | Starting job with group update_positions
   4   │ 16:58:37 | INFO | Thread-1 | tracker.py:_async_update:52 | Updating positions in services/scheduler/upload/login_method_extraction_complete_test.go
   5   │ 16:58:37 | DEBUG | Thread-1 | file.py:parse_file_structure:22 | Converted pattern {'test': ['\\v^\\s*func (\\w+)'], 'namespace': []} to {'test': [re.compile('^\\s*func (\\w+)')], 'namespace': []}
   6   │ 16:58:37 | DEBUG | Thread-1 | tracker.py:_async_update:79 | New test services/scheduler/upload/login_method_extraction_complete_test.go found in services/scheduler/upload/login_method_extraction_complete_test.go
   7   │ 16:58:37 | DEBUG | Thread-1 | tracker.py:_async_update:79 | New test TestParseLoginMethodExtractionComplete-5127535966012300037 found in services/scheduler/upload/login_method_extraction_complete_test.go
   8   │ 16:58:37 | DEBUG | Thread-1 | tracker.py:_async_update:79 | New test TestProcessLoginMethodExtractionComplete-5127535966012300037 found in services/scheduler/upload/login_method_extraction_complete_test.go
   9   │ 16:58:37 | DEBUG | Thread-1 | tracker.py:_remove_old_positions:122 | No tests removed
  10   │ 16:58:37 | DEBUG | Thread-1 | __init__.py:_handle_coroutine:77 | Finished job with group update_positions
  11   │ 16:58:45 | ERROR | MainThread | logging.py:__deferred_flog:62 | Error name 'process_id' is not defined converting args to str f"Saving external stdout path '{output_path}' for test {process_id}"
  12   │ 16:58:45 | DEBUG | MainThread | __init__.py:_register_started:272 | Registering TestParseLoginMethodExtractionComplete-5127535966012300037 as started
  13   │ 16:59:20 | ERROR | MainThread | __init__.py:external_result:87 | Attempted to register test result for unknown file {file_name}

To Reproduce
Steps to reproduce the behavior:

Expected behavior
The test runs and hits my breakpoint.

Screenshots
If applicable, add screenshots to help explain your problem.

Additional context
my debug adapter config looks like this at the time of the test run

{
  request= "launch",
  dlvToolPath= "/Users/awalker/go/bin/dlv",
  mode= "test",
  type= "go",
  program= "/Users/awalker/plaid/go.git/services/scheduler/upload",
  args=     {
      [1] = "-test.run",
      [2] = "TestParseLoginMethodExtractionComplete$",
    },
}
@rcarriga
Copy link
Owner

Ah this got missed in the recent changes for namespaces. Thanks for the report! Should be all good now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants