Skip to content

Fix test suite#624

Merged
aviatesk merged 3 commits intoJuliaDebug:masterfrom
serenity4:fix-tests
Mar 18, 2025
Merged

Fix test suite#624
aviatesk merged 3 commits intoJuliaDebug:masterfrom
serenity4:fix-tests

Conversation

@serenity4
Copy link
Copy Markdown
Collaborator

This should fix test failures for nightly, so it is easier to test & approve changes for PRs.

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Mar 4, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 0.00%. Comparing base (2c33b9a) to head (006cb9b).
Report is 45 commits behind head on master.

Additional details and impacted files
@@          Coverage Diff           @@
##           master    #624   +/-   ##
======================================
  Coverage    0.00%   0.00%           
======================================
  Files           9       9           
  Lines        1556    1628   +72     
======================================
- Misses       1556    1628   +72     

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

🚀 New features to boost your workflow:
  • Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@serenity4
Copy link
Copy Markdown
Collaborator Author

Ah, well, it will actually require #619 first.

@serenity4 serenity4 marked this pull request as draft March 4, 2025 21:56
Comment on lines +4 to +8
using Core.Compiler: widenconst

has_name_typ(node, name::Symbol, @nospecialize(Ts::Tuple)) = kind(node) == K"Identifier" && node.val === name && node.typ in Ts
has_name_typ(node, name::Symbol, @nospecialize(T)) = kind(node) == K"Identifier" && node.val === name && node.typ === T
has_typ(node, @nospecialize(Ts::Tuple)) = any(has_typ(node, T) for T in Ts)
has_typ(node, @nospecialize(T)) = node.typ === T || !isnothing(node.typ) && widenconst(node.typ) === T
has_name_typ(node, name::Symbol, @nospecialize(T)) = kind(node) == K"Identifier" && node.val === name && has_typ(node, T)
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Not 100% sure about these changes. Essentially, what I have been assuming is that it doesn't matter whether the node type is a Const or not, so long as the type of the value is correct, if we test it against a non-Const type.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Yeah, this change looks reasonable.

@serenity4 serenity4 marked this pull request as ready for review March 7, 2025 22:02
Copy link
Copy Markdown
Member

@aviatesk aviatesk left a comment

Choose a reason for hiding this comment

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

Thanks for this update. While I'm working on #619, this PR doesn't need to wait for it since it already passes all tests on the stable version.

Comment on lines +4 to +8
using Core.Compiler: widenconst

has_name_typ(node, name::Symbol, @nospecialize(Ts::Tuple)) = kind(node) == K"Identifier" && node.val === name && node.typ in Ts
has_name_typ(node, name::Symbol, @nospecialize(T)) = kind(node) == K"Identifier" && node.val === name && node.typ === T
has_typ(node, @nospecialize(Ts::Tuple)) = any(has_typ(node, T) for T in Ts)
has_typ(node, @nospecialize(T)) = node.typ === T || !isnothing(node.typ) && widenconst(node.typ) === T
has_name_typ(node, name::Symbol, @nospecialize(T)) = kind(node) == K"Identifier" && node.val === name && has_typ(node, T)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Yeah, this change looks reasonable.

@aviatesk aviatesk merged commit bfbe645 into JuliaDebug:master Mar 18, 2025
15 of 17 checks passed
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