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

Reenables VSCode Tests #554

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

Zentrik
Copy link
Collaborator

@Zentrik Zentrik commented Mar 3, 2024

Tests were failing on Julia 1.10.2 due to a warning being printed. I removed the check as testing for no warnings was too strict and if any errors occur, the later tests will catch them.

Tests were failing on Julia 1.10.2 due to a warning being printed. I removed the check as testing for no warnings was too strict and if any errors occur, the later tests will catch them.
@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 0.00%. Comparing base (33c2379) to head (dcb2fa3).

Additional details and impacted files
@@          Coverage Diff           @@
##           master    #554   +/-   ##
======================================
  Coverage    0.00%   0.00%           
======================================
  Files           9       9           
  Lines        1507    1507           
======================================
  Misses       1507    1507           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

end
module TestVSCodeExt # stops modules defined in test files from overwriting stuff from previous test
using Test, PerformanceTestTools, ..VSCodeServer
@testset "runtests.jl VSCodeExt" begin
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we make this include("test_codeview_vscode.jl") only? I remember I got bunch of failures from these tests when I run them locally although they don't seem to happen on CI.

Copy link
Member

@aviatesk aviatesk Mar 3, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm going to share related comments from the other PR here as well. The conversation has been spread out, but let's centralize our discussion here.


@aviatesk 13 hours ago
@ Zentrik What's the whole purpose of duplicating tests here? Can't we include("test_codeview_vscode.jl") only?

@Zentrik 9 hours ago
There's some additional work that Cthulhu does when running under VSCode that I wanted to test in more cases than "test_codeview_vscode.jl". The main thing I was worried about was descending into all callees here.
I don't think it's particularly important to run these additional tests given the code has been working for a while, so if you want you can nix it.

@aviatesk now
So, it sounds like the purpose of running these duplicated tests was to verify that descending into all callees doesn't lead to any timing issues, right? If so, we might consider removing them. Alternatively, if we decide to keep them, it could be a better design choice to extract the main portion of runtests.jl into a separate file and then include that file in both runtests.jl and test_VSCode.jl.

Copy link
Collaborator Author

@Zentrik Zentrik Mar 4, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm curious which tests were failing locally as they seem to work fine for me.
I'm not sure what you mean by timing issues, the tests are there mainly to make sure the code for recursing into callsites doesn't have a bug which causes an error to be thrown. I'll have a look into removing them/ refactoring the tests.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are so many test failures, so let me share some of them here:

fib inlay_types_vscode=true, diagnostics_vscode=true, iswarn=true, hide_type_stable=true: Test Failed at /Users/aviatesk/julia/packages/Cthulhu/test/test_codeview_vscode.jl:46
  Expression: length(VSCodeServer.inlay_hints) == 2
   Evaluated: 1 == 2

Stacktrace:
 [1] macro expansion
   @ ~/julia/julia5/usr/share/julia/stdlib/v1.12/Test/src/Test.jl:679 [inlined]
 [2] macro expansion
   @ ~/julia/packages/Cthulhu/test/test_codeview_vscode.jl:46 [inlined]
 [3] macro expansion
   @ ~/julia/julia5/usr/share/julia/stdlib/v1.12/Test/src/Test.jl:1700 [inlined]
 [4] macro expansion
   @ ~/julia/packages/Cthulhu/test/test_codeview_vscode.jl:35 [inlined]
 [5] macro expansion
   @ ~/julia/julia5/usr/share/julia/stdlib/v1.12/Test/src/Test.jl:1700 [inlined]
 [6] top-level scope
   @ ~/julia/packages/Cthulhu/test/test_codeview_vscode.jl:9
fib inlay_types_vscode=true, diagnostics_vscode=true, iswarn=true, hide_type_stable=true: Error During Test at /Users/aviatesk/julia/packages/Cthulhu/test/test_codeview_vscode.jl:47
  Test threw exception
  Expression: isempty(VSCodeServer.inlay_hints[2])
  BoundsError: attempt to access 1-element Vector{Any} at index [2]
  Stacktrace:
   [1] throw_boundserror(A::Vector{Any}, I::Tuple{Int64})
     @ Base ./essentials.jl:14
   [2] getindex(A::Vector{Any}, i::Int64)
     @ Base ./essentials.jl:891
   [3] macro expansion
     @ ~/julia/julia5/usr/share/julia/stdlib/v1.12/Test/src/Test.jl:676 [inlined]
   [4] macro expansion
     @ ~/julia/packages/Cthulhu/test/test_codeview_vscode.jl:47 [inlined]
   [5] macro expansion
     @ ~/julia/julia5/usr/share/julia/stdlib/v1.12/Test/src/Test.jl:1700 [inlined]
   [6] macro expansion
     @ ~/julia/packages/Cthulhu/test/test_codeview_vscode.jl:35 [inlined]
   [7] macro expansion
     @ ~/julia/julia5/usr/share/julia/stdlib/v1.12/Test/src/Test.jl:1700 [inlined]
   [8] top-level scope
     @ ~/julia/packages/Cthulhu/test/test_codeview_vscode.jl:9
fib inlay_types_vscode=true, diagnostics_vscode=true, iswarn=true, hide_type_stable=true: Test Failed at /Users/aviatesk/julia/packages/Cthulhu/test/test_codeview_vscode.jl:54
  Expression: length(VSCodeServer.diagnostics) == 2
   Evaluated: 1 == 2

Stacktrace:
 [1] macro expansion
   @ ~/julia/julia5/usr/share/julia/stdlib/v1.12/Test/src/Test.jl:679 [inlined]
 [2] macro expansion
   @ ~/julia/packages/Cthulhu/test/test_codeview_vscode.jl:54 [inlined]
 [3] macro expansion
   @ ~/julia/julia5/usr/share/julia/stdlib/v1.12/Test/src/Test.jl:1700 [inlined]
 [4] macro expansion
   @ ~/julia/packages/Cthulhu/test/test_codeview_vscode.jl:35 [inlined]
 [5] macro expansion
   @ ~/julia/julia5/usr/share/julia/stdlib/v1.12/Test/src/Test.jl:1700 [inlined]
 [6] top-level scope
   @ ~/julia/packages/Cthulhu/test/test_codeview_vscode.jl:9
fib inlay_types_vscode=true, diagnostics_vscode=true, iswarn=true, hide_type_stable=true: Error During Test at /Users/aviatesk/julia/packages/Cthulhu/test/test_codeview_vscode.jl:55
  Test threw exception
  Expression: isempty(VSCodeServer.diagnostics[2])
  BoundsError: attempt to access 1-element Vector{Any} at index [2]
  Stacktrace:
   [1] throw_boundserror(A::Vector{Any}, I::Tuple{Int64})
     @ Base ./essentials.jl:14
   [2] getindex(A::Vector{Any}, i::Int64)
     @ Base ./essentials.jl:891
   [3] macro expansion
     @ ~/julia/julia5/usr/share/julia/stdlib/v1.12/Test/src/Test.jl:676 [inlined]
   [4] macro expansion
     @ ~/julia/packages/Cthulhu/test/test_codeview_vscode.jl:55 [inlined]
   [5] macro expansion
     @ ~/julia/julia5/usr/share/julia/stdlib/v1.12/Test/src/Test.jl:1700 [inlined]
   [6] macro expansion
     @ ~/julia/packages/Cthulhu/test/test_codeview_vscode.jl:35 [inlined]
   [7] macro expansion
     @ ~/julia/julia5/usr/share/julia/stdlib/v1.12/Test/src/Test.jl:1700 [inlined]
   [8] top-level scope
     @ ~/julia/packages/Cthulhu/test/test_codeview_vscode.jl:9
fib inlay_types_vscode=true, diagnostics_vscode=true, iswarn=true, hide_type_stable=false: Test Failed at /Users/aviatesk/julia/packages/Cthulhu/test/test_codeview_vscode.jl:46
  Expression: length(VSCodeServer.inlay_hints) == 2
   Evaluated: 1 == 2

Stacktrace:
 [1] macro expansion
   @ ~/julia/julia5/usr/share/julia/stdlib/v1.12/Test/src/Test.jl:679 [inlined]
 [2] macro expansion
   @ ~/julia/packages/Cthulhu/test/test_codeview_vscode.jl:46 [inlined]
 [3] macro expansion
   @ ~/julia/julia5/usr/share/julia/stdlib/v1.12/Test/src/Test.jl:1700 [inlined]
 [4] macro expansion
   @ ~/julia/packages/Cthulhu/test/test_codeview_vscode.jl:35 [inlined]
 [5] macro expansion
   @ ~/julia/julia5/usr/share/julia/stdlib/v1.12/Test/src/Test.jl:1700 [inlined]
 [6] top-level scope
   @ ~/julia/packages/Cthulhu/test/test_codeview_vscode.jl:9
fib inlay_types_vscode=true, diagnostics_vscode=true, iswarn=true, hide_type_stable=false: Error During Test at /Users/aviatesk/julia/packages/Cthulhu/test/test_codeview_vscode.jl:47
  Test threw exception
  Expression: isempty(VSCodeServer.inlay_hints[2])
  BoundsError: attempt to access 1-element Vector{Any} at index [2]
  Stacktrace:
   [1] throw_boundserror(A::Vector{Any}, I::Tuple{Int64})
     @ Base ./essentials.jl:14
   [2] getindex(A::Vector{Any}, i::Int64)
     @ Base ./essentials.jl:891
   [3] macro expansion
     @ ~/julia/julia5/usr/share/julia/stdlib/v1.12/Test/src/Test.jl:676 [inlined]
   [4] macro expansion
     @ ~/julia/packages/Cthulhu/test/test_codeview_vscode.jl:47 [inlined]
   [5] macro expansion
     @ ~/julia/julia5/usr/share/julia/stdlib/v1.12/Test/src/Test.jl:1700 [inlined]
   [6] macro expansion
     @ ~/julia/packages/Cthulhu/test/test_codeview_vscode.jl:35 [inlined]
   [7] macro expansion
     @ ~/julia/julia5/usr/share/julia/stdlib/v1.12/Test/src/Test.jl:1700 [inlined]
   [8] top-level scope
     @ ~/julia/packages/Cthulhu/test/test_codeview_vscode.jl:9
fib inlay_types_vscode=true, diagnostics_vscode=true, iswarn=true, hide_type_stable=false: Test Failed at /Users/aviatesk/julia/packages/Cthulhu/test/test_codeview_vscode.jl:54
  Expression: length(VSCodeServer.diagnostics) == 2
   Evaluated: 1 == 2

Stacktrace:
 [1] macro expansion
   @ ~/julia/julia5/usr/share/julia/stdlib/v1.12/Test/src/Test.jl:679 [inlined]
 [2] macro expansion
   @ ~/julia/packages/Cthulhu/test/test_codeview_vscode.jl:54 [inlined]
 [3] macro expansion
   @ ~/julia/julia5/usr/share/julia/stdlib/v1.12/Test/src/Test.jl:1700 [inlined]
 [4] macro expansion
   @ ~/julia/packages/Cthulhu/test/test_codeview_vscode.jl:35 [inlined]
 [5] macro expansion
   @ ~/julia/julia5/usr/share/julia/stdlib/v1.12/Test/src/Test.jl:1700 [inlined]
 [6] top-level scope
   @ ~/julia/packages/Cthulhu/test/test_codeview_vscode.jl:9
fib inlay_types_vscode=true, diagnostics_vscode=true, iswarn=true, hide_type_stable=false: Error During Test at /Users/aviatesk/julia/packages/Cthulhu/test/test_codeview_vscode.jl:55
  Test threw exception
  Expression: isempty(VSCodeServer.diagnostics[2])
  BoundsError: attempt to access 1-element Vector{Any} at index [2]
  Stacktrace:
   [1] throw_boundserror(A::Vector{Any}, I::Tuple{Int64})
     @ Base ./essentials.jl:14
   [2] getindex(A::Vector{Any}, i::Int64)
     @ Base ./essentials.jl:891
   [3] macro expansion
     @ ~/julia/julia5/usr/share/julia/stdlib/v1.12/Test/src/Test.jl:676 [inlined]
   [4] macro expansion
     @ ~/julia/packages/Cthulhu/test/test_codeview_vscode.jl:55 [inlined]
   [5] macro expansion
     @ ~/julia/julia5/usr/share/julia/stdlib/v1.12/Test/src/Test.jl:1700 [inlined]
   [6] macro expansion
     @ ~/julia/packages/Cthulhu/test/test_codeview_vscode.jl:35 [inlined]
   [7] macro expansion
     @ ~/julia/julia5/usr/share/julia/stdlib/v1.12/Test/src/Test.jl:1700 [inlined]
   [8] top-level scope
     @ ~/julia/packages/Cthulhu/test/test_codeview_vscode.jl:9

And I finally got this test summary:

Test Summary:                                                                                                  | Pass  Fail  Error  Broken  Total   Time
runtests.jl VSCodeExt                                                                                          |  472    88    116       1    677  17.1s
  test_Cthulhu.jl                                                                                              |  241                    1    242   8.1s
  test_codeview.jl                                                                                             |  230    88    116            434   9.0s
    printer test                                                                                               |   66                          66   0.6s
    hide type-stable statements                                                                                |   12                          12   0.2s
    VSCode descend test                                                                                        |  152    88    116            356   7.0s
      fib inlay_types_vscode=true, diagnostics_vscode=true, iswarn=true, hide_type_stable=true                 |    2     2      2              6   2.7s
      fib inlay_types_vscode=true, diagnostics_vscode=true, iswarn=true, hide_type_stable=false                |    1     2      3              6   1.7s
      fib inlay_types_vscode=true, diagnostics_vscode=true, iswarn=false, hide_type_stable=true                |    3     2      2              7   0.1s
      fib inlay_types_vscode=true, diagnostics_vscode=true, iswarn=false, hide_type_stable=false               |    2     2      3              7   0.1s
      fib inlay_types_vscode=true, diagnostics_vscode=false, iswarn=true, hide_type_stable=true                |    2     1      1              4   0.0s
      fib inlay_types_vscode=true, diagnostics_vscode=false, iswarn=true, hide_type_stable=false               |    1     1      2              4   0.0s
      fib inlay_types_vscode=true, diagnostics_vscode=false, iswarn=false, hide_type_stable=true               |    2     1      1              4   0.0s
      fib inlay_types_vscode=true, diagnostics_vscode=false, iswarn=false, hide_type_stable=false              |    1     1      2              4   0.0s
      fib inlay_types_vscode=false, diagnostics_vscode=true, iswarn=true, hide_type_stable=true                |    3     1      1              5   0.0s
      fib inlay_types_vscode=false, diagnostics_vscode=true, iswarn=true, hide_type_stable=false               |    3     1      1              5   0.0s
      fib inlay_types_vscode=false, diagnostics_vscode=true, iswarn=false, hide_type_stable=true               |    4     1      1              6   0.0s
      fib inlay_types_vscode=false, diagnostics_vscode=true, iswarn=false, hide_type_stable=false              |    4     1      1              6   0.0s
      fib inlay_types_vscode=false, diagnostics_vscode=false, iswarn=true, hide_type_stable=true               |    3                           3   0.0s
      fib inlay_types_vscode=false, diagnostics_vscode=false, iswarn=true, hide_type_stable=false              |    3                           3   0.0s
      fib inlay_types_vscode=false, diagnostics_vscode=false, iswarn=false, hide_type_stable=true              |    3                           3   0.0s
      fib inlay_types_vscode=false, diagnostics_vscode=false, iswarn=false, hide_type_stable=false             |    3                           3   0.0s
      fVSCode inlay_types_vscode=true, diagnostics_vscode=true, iswarn=true, hide_type_stable=true             |    1     5      3              9   0.6s
      fVSCode inlay_types_vscode=true, diagnostics_vscode=true, iswarn=true, hide_type_stable=false            |    1     5      3              9   0.1s
      fVSCode inlay_types_vscode=true, diagnostics_vscode=true, iswarn=false, hide_type_stable=true            |    2     2      3              7   0.0s
      fVSCode inlay_types_vscode=true, diagnostics_vscode=true, iswarn=false, hide_type_stable=false           |    2     2      3              7   0.0s
      fVSCode inlay_types_vscode=true, diagnostics_vscode=false, iswarn=true, hide_type_stable=true            |    1     1      2              4   0.0s
      fVSCode inlay_types_vscode=true, diagnostics_vscode=false, iswarn=true, hide_type_stable=false           |    1     1      2              4   0.0s
      fVSCode inlay_types_vscode=true, diagnostics_vscode=false, iswarn=false, hide_type_stable=true           |    1     1      2              4   0.0s
      fVSCode inlay_types_vscode=true, diagnostics_vscode=false, iswarn=false, hide_type_stable=false          |    1     1      2              4   0.0s
      fVSCode inlay_types_vscode=false, diagnostics_vscode=true, iswarn=true, hide_type_stable=true            |    3     4      1              8   0.0s
      fVSCode inlay_types_vscode=false, diagnostics_vscode=true, iswarn=true, hide_type_stable=false           |    3     4      1              8   0.0s
      fVSCode inlay_types_vscode=false, diagnostics_vscode=true, iswarn=false, hide_type_stable=true           |    4     1      1              6   0.0s
      fVSCode inlay_types_vscode=false, diagnostics_vscode=true, iswarn=false, hide_type_stable=false          |    4     1      1              6   0.0s
      fVSCode inlay_types_vscode=false, diagnostics_vscode=false, iswarn=true, hide_type_stable=true           |    3                           3   0.0s
      fVSCode inlay_types_vscode=false, diagnostics_vscode=false, iswarn=true, hide_type_stable=false          |    3                           3   0.0s
      fVSCode inlay_types_vscode=false, diagnostics_vscode=false, iswarn=false, hide_type_stable=true          |    3                           3   0.0s
      fVSCode inlay_types_vscode=false, diagnostics_vscode=false, iswarn=false, hide_type_stable=false         |    3                           3   0.0s
      fibcall Float64 inlay_types_vscode=true, diagnostics_vscode=true, iswarn=true, hide_type_stable=true     |    2     3      5             10   0.1s
      fibcall Float64 inlay_types_vscode=true, diagnostics_vscode=true, iswarn=true, hide_type_stable=false    |    1     3      6             10   0.1s
      fibcall Float64 inlay_types_vscode=true, diagnostics_vscode=true, iswarn=false, hide_type_stable=true    |    2     3      5             10   0.0s
      fibcall Float64 inlay_types_vscode=true, diagnostics_vscode=true, iswarn=false, hide_type_stable=false   |    1     3      6             10   0.1s
      fibcall Float64 inlay_types_vscode=true, diagnostics_vscode=false, iswarn=true, hide_type_stable=true    |    2     3      5             10   0.1s
      fibcall Float64 inlay_types_vscode=true, diagnostics_vscode=false, iswarn=true, hide_type_stable=false   |    1     3      6             10   0.1s
      fibcall Float64 inlay_types_vscode=true, diagnostics_vscode=false, iswarn=false, hide_type_stable=true   |    2     3      5             10   0.0s
      fibcall Float64 inlay_types_vscode=true, diagnostics_vscode=false, iswarn=false, hide_type_stable=false  |    1     3      6             10   0.1s
      fibcall Float64 inlay_types_vscode=false, diagnostics_vscode=true, iswarn=true, hide_type_stable=true    |    3     2      4              9   0.0s
      fibcall Float64 inlay_types_vscode=false, diagnostics_vscode=true, iswarn=true, hide_type_stable=false   |    3     2      4              9   0.0s
      fibcall Float64 inlay_types_vscode=false, diagnostics_vscode=true, iswarn=false, hide_type_stable=true   |    3                           3   0.0s
      fibcall Float64 inlay_types_vscode=false, diagnostics_vscode=true, iswarn=false, hide_type_stable=false  |    3                           3   0.0s
      fibcall Float64 inlay_types_vscode=false, diagnostics_vscode=false, iswarn=true, hide_type_stable=true   |    3                           3   0.0s
      fibcall Float64 inlay_types_vscode=false, diagnostics_vscode=false, iswarn=true, hide_type_stable=false  |    3                           3   0.0s
      fibcall Float64 inlay_types_vscode=false, diagnostics_vscode=false, iswarn=false, hide_type_stable=true  |    3                           3   0.0s
      fibcall Float64 inlay_types_vscode=false, diagnostics_vscode=false, iswarn=false, hide_type_stable=false |    3                           3   0.0s
      fibcall Int inlay_types_vscode=true, diagnostics_vscode=true, iswarn=true, hide_type_stable=true         |    2     2      2              6   0.0s
      fibcall Int inlay_types_vscode=true, diagnostics_vscode=true, iswarn=true, hide_type_stable=false        |    1     2      3              6   0.0s
      fibcall Int inlay_types_vscode=true, diagnostics_vscode=true, iswarn=false, hide_type_stable=true        |    3     2      2              7   0.0s
      fibcall Int inlay_types_vscode=true, diagnostics_vscode=true, iswarn=false, hide_type_stable=false       |    2     2      3              7   0.0s
      fibcall Int inlay_types_vscode=true, diagnostics_vscode=false, iswarn=true, hide_type_stable=true        |    2     1      1              4   0.0s
      fibcall Int inlay_types_vscode=true, diagnostics_vscode=false, iswarn=true, hide_type_stable=false       |    1     1      2              4   0.0s
      fibcall Int inlay_types_vscode=true, diagnostics_vscode=false, iswarn=false, hide_type_stable=true       |    2     1      1              4   0.0s
      fibcall Int inlay_types_vscode=true, diagnostics_vscode=false, iswarn=false, hide_type_stable=false      |    1     1      2              4   0.0s
      fibcall Int inlay_types_vscode=false, diagnostics_vscode=true, iswarn=true, hide_type_stable=true        |    3     1      1              5   0.0s
      fibcall Int inlay_types_vscode=false, diagnostics_vscode=true, iswarn=true, hide_type_stable=false       |    3     1      1              5   0.0s
      fibcall Int inlay_types_vscode=false, diagnostics_vscode=true, iswarn=false, hide_type_stable=true       |    4     1      1              6   0.0s
      fibcall Int inlay_types_vscode=false, diagnostics_vscode=true, iswarn=false, hide_type_stable=false      |    4     1      1              6   0.0s
      fibcall Int inlay_types_vscode=false, diagnostics_vscode=false, iswarn=true, hide_type_stable=true       |    3                           3   0.0s
      fibcall Int inlay_types_vscode=false, diagnostics_vscode=false, iswarn=true, hide_type_stable=false      |    3                           3   0.0s
      fibcall Int inlay_types_vscode=false, diagnostics_vscode=false, iswarn=false, hide_type_stable=true      |    3                           3   0.0s
      fibcall Int inlay_types_vscode=false, diagnostics_vscode=false, iswarn=false, hide_type_stable=false     |    3                           3   0.0s
  test_AbstractInterpreter.jl                                                                                  |    1                           1   0.0s

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

Successfully merging this pull request may close these issues.

3 participants