Skip to content

Conversation

@aviatesk
Copy link
Member

@aviatesk aviatesk commented Apr 8, 2025

There have been changes to type definitions and global variable assignments to v1.12, and this commit tries to adjust the code base to it. There might be some missing pieces still, this allow us to reduce the failures in the test suite.

aviatesk added 2 commits April 8, 2025 15:32
There have been changes to type definitions and global variable
assignments to v1.12, and this commit tries to adjust the code base to
it. There might be some missing pieces still, this allow us to reduce
the failures in the test suite.
@aviatesk
Copy link
Member Author

aviatesk commented Apr 9, 2025

That was a really tough job, but it seems to be working now.

On recent Julia versions we can just pattern match against `:method`
expressions.
@aviatesk
Copy link
Member Author

Here are the key points of this change:

  • Updated the entire code base to handle the change in Julia 1.12 where assigning to global variables now requires using setglobal!(mod, name, val) instead of lhs::GlobalRef = val.
  • Added support for the requirement that global variables must now be declared with :globaldecl before being assigned a value.
  • Minor adjustments to the test code were made to reflect these changes.

This change is necessary to update JET to Julia 1.12, so I'm going to proceed with merging it. I welcome review comments even after it's merged.

@aviatesk aviatesk merged commit cea0537 into master Apr 19, 2025
9 checks passed
@aviatesk aviatesk deleted the avi/1.12 branch April 19, 2025 03:42
@danielwe
Copy link

Just a heads up that this broke Revise: timholy/Revise.jl#906. Looks like trackedheads wasn't exported or marked public, so no foul semver-wise.

Copy link
Member

@timholy timholy left a comment

Choose a reason for hiding this comment

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

Sorry I didn't notice this, and thanks for the update! I agree these 1.12 updates are significant effort.

Looks like we'll need to adjust a couple of items to fix timholy/Revise.jl#906, I'll add those separately.

end
end
elseif stmt.head !== :copyast
stmt = stmt::Expr
Copy link
Member

Choose a reason for hiding this comment

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

This line seems like it must date to an era when inference was not as capable, though obviously it does no harm.

isrequired[p] && continue
isrequired[p] = true
chngd = true
end
Copy link
Member

Choose a reason for hiding this comment

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

Oh interesting, I assume this was a bugfix?

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.

4 participants