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

Fix @test and @test_throws "Missing Symbol" LSP error #25

Open
mrufsvold opened this issue Nov 13, 2024 · 3 comments
Open

Fix @test and @test_throws "Missing Symbol" LSP error #25

mrufsvold opened this issue Nov 13, 2024 · 3 comments

Comments

@mrufsvold
Copy link

In a @testitem block, you can use @test and @test_throws without importing Test explicitly. However, this causes the LSP to complain about undefined symbols. I could add using Test to my module, but then I have to depend on Test directly.

I understand that this is a stub package which exports dummy macros and lets TestItemRunner do the heavy lifting. Could it also export @test and @test_throws to make those errors go away?

@davidanthoff
Copy link
Member

Ah, interesting point! I think the correct fix here is to teach the LS properly about the fact that @testitem auto-imports Test.

@mrufsvold
Copy link
Author

I mean, yeah that would be wonderful, but doesn't that bring us back to "How do you expand macros with LS without running arbitrary code" can of worms?

@davidanthoff
Copy link
Member

Well, the test item stuff is different, the LS already has lots of specialization for it :)

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