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

Apparent problem with @test_warn #25

Open
kbarros opened this issue Sep 30, 2022 · 2 comments
Open

Apparent problem with @test_warn #25

kbarros opened this issue Sep 30, 2022 · 2 comments
Labels
bug Something isn't working upstream

Comments

@kbarros
Copy link

kbarros commented Sep 30, 2022

It appears that placing @test_warn inside a @testitem block breaks the VSCode/Julia testing. When running a failing test for @test_warn, VSCode tries to open an editor window for Test.jl, which only shows the message "The editor could not be opened because the file was not found."

@davidanthoff
Copy link
Member

I think this is essentially a problem in Base... If you look at the implementation of the @test_warn macro here you can see that it just calls the @test macro in turn. So the file location where the test is failing is actually not the location where the @test_warn macro is being called, instead it will report the location that I linked to here. And then it also seems that the default Julia stores filenames from the build bots for standard library locations, so then VS Code is trying to open a file that doesn't exist.

I think the proper way to fix this is to fix @test_warn to correctly report the location of the @test_warn invocation if it fails.

@davidanthoff davidanthoff added bug Something isn't working upstream labels Oct 4, 2022
@davidanthoff
Copy link
Member

JuliaLang/julia#47033

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working upstream
Projects
None yet
Development

No branches or pull requests

2 participants