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

@generated function generators don't follow the new rules for v0.6 #7

Closed
andyferris opened this issue Feb 27, 2017 · 0 comments · Fixed by #8
Closed

@generated function generators don't follow the new rules for v0.6 #7

andyferris opened this issue Feb 27, 2017 · 0 comments · Fixed by #8

Comments

@andyferris
Copy link

The requirements for @generated and @pure functions have changed in Julia v0.6. For instance, AFAIK you can no longer call any function function from a function generator which may be specialized in the future, or you risk getting a world age error. My understanding of this is that function generators are compiled just once, and immediately as they are read in by the system, so they only have access to methods before their definition. Furthermore, any methods found of a later world age will result in a world age related error. I think the reason for this is that pure functions and generators do not populate back-edges in the dependency graph for automatic recompilation, but @vtjnash knows the exact details.

A specific example is this line of Tensors where one and zero may fail on user defined types created after the user executes using Tensors. I haven't looked around for any more problems, but I thought I'd let you know after experience this in StaticArrays.

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 a pull request may close this issue.

1 participant