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

Adjust to JuliaLang/julia#53219 #547

Merged
merged 6 commits into from
Mar 3, 2024
Merged

Adjust to JuliaLang/julia#53219 #547

merged 6 commits into from
Mar 3, 2024

Conversation

Keno
Copy link
Collaborator

@Keno Keno commented Feb 19, 2024

These are the changes I was using locally when developing that branch to have basic Cthulhu functionality. It's likely additional changes are required to have Cthulhu fully functional.

Comment on lines 311 to 315
if hasfield(typeof(src), :parent)
mi = src.parent
else
mi = Base.method_instance(f, t)
end
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'm a bit uncertain about using a separate method_instance lookup than the one implicit in code_typed. That sounds like an opportunity for desynchronization.

However, I don't think we have a MI-based code_typed entry point yet so I don't believe there's another alternative.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

However, I don't think we have a MI-based code_typed entry point yet

I think it would be reasonable to add one. I agree, it would be better to look up the method instance first and use that to query the source.

Copy link
Member

Choose a reason for hiding this comment

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

Implemented the refactoring at 707a181.

@topolarity
Copy link
Collaborator

Nightly still reports ~7 failing tests for me locally with the latest changes, but those seem to match the last CI: https://github.com/JuliaDebug/Cthulhu.jl/actions/runs/7857995905/job/21442465198

(from the last run before #541 started affecting us)

TypedSyntax/src/node.jl Outdated Show resolved Hide resolved
TypedSyntax/src/node.jl Outdated Show resolved Hide resolved
else
mi = Base.method_instance(f, t)
end
return src, rt, mi
Copy link
Member

Choose a reason for hiding this comment

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

Also, it seems to be confusing that methods with the same name return different type objects. I would like to extract MethodInstance lookup logic outside of this function rather than including it here.

@codecov-commenter
Copy link

codecov-commenter commented Mar 3, 2024

Codecov Report

Attention: Patch coverage is 0% with 14 lines in your changes are missing coverage. Please review.

Project coverage is 0.00%. Comparing base (b98d972) to head (707a181).

Files Patch % Lines
src/interpreter.jl 0.00% 11 Missing ⚠️
src/reflection.jl 0.00% 3 Missing ⚠️
Additional details and impacted files
@@          Coverage Diff           @@
##           master    #547   +/-   ##
======================================
  Coverage    0.00%   0.00%           
======================================
  Files           9       9           
  Lines        1532    1541    +9     
======================================
- Misses       1532    1541    +9     

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

@aviatesk aviatesk force-pushed the kf/53219 branch 2 times, most recently from fb5c98b to 18e22f9 Compare March 3, 2024 09:08
@aviatesk aviatesk changed the title WIP: Adjust to julia#53219 Adjust to JuliaLang/julia#53219 Mar 3, 2024
aviatesk added a commit that referenced this pull request Mar 3, 2024
Given that Cthulhu is the only user of TypedSyntax currently, and
considering the newer versions of Cthulhu no longer supports older Julia
versions like 1.6, I believe there isn't much merit in maintaining
support for older Julia versions within TypedSyntax. We anticipate the need
for fixes to TypedSyntax's reflection capabilities, like #547, however,
continuing to provide support for these features across older versions
proves to be a significant hassle. Therefore, I'm inclined to match
TypedSyntax.jl's supported Julia version with that of Cthulhu.

Additionally, we've found that if Cthulhu's tests fail, TypedSyntax.jl's
tests don't get executed, leading to unnoticed regressions in the
latter. So I've opted to separate and individually run the tests for
both Cthulhu and TypedSyntax.
aviatesk added a commit that referenced this pull request Mar 3, 2024
Given that Cthulhu is the only user of TypedSyntax currently, and
considering the newer versions of Cthulhu no longer supports older Julia
versions like 1.6, I believe there isn't much merit in maintaining
support for older Julia versions within TypedSyntax. We anticipate the need
for fixes to TypedSyntax's reflection capabilities, like #547, however,
continuing to provide support for these features across older versions
proves to be a significant hassle. Therefore, I'm inclined to match
TypedSyntax.jl's supported Julia version with that of Cthulhu.

Additionally, we've found that if Cthulhu's tests fail, TypedSyntax.jl's
tests don't get executed, leading to unnoticed regressions in the
latter. So I've opted to separate and individually run the tests for
both Cthulhu and TypedSyntax.
Keno and others added 6 commits March 4, 2024 06:11
These are the changes I was using locally when developing that branch
to have basic Cthulhu functionality. It's likely additional changes
are required to have Cthulhu fully functional.
I'm not 100% sure about the lookup here, but this at least seems to get
the nightly tests back into the state they were in before the upstream
CodeInstance change.
@aviatesk
Copy link
Member

aviatesk commented Mar 3, 2024

The nightly failures are all #541. Going to merge.

@aviatesk aviatesk merged commit 5b0d49e into master Mar 3, 2024
20 of 29 checks passed
@aviatesk aviatesk deleted the kf/53219 branch March 3, 2024 21:27
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.

type CodeInfo has no field rettype on Julia's master branch
4 participants