-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Code to report deprecation warnings is in codegen instead of semantic #8259
Comments
It can be moved around sure, but I would prefer to keep the co-location by feature. |
What's "co-location by feature"? |
That the code that makes a features is located near / in the same file. Instead of laying out the code by namespace. The last refactoring on |
I've been working on and off on refactoring the warnings code towards adding a Part of this I moved the detection to the semantic phase, not codegen, and since the code is only useful for deprecation warnings, I might rename it all to deprecations instead. |
There could definitely be other kinds of warnings, this one from 0.35.1 for example, which were also absent if abstract class Foo
abstract def foo : Int32
end
class Bar < Foo
def foo
end
end
Same goes for anything that we might want to disallow in 2.0. |
The code to report deprecation warnings is in
codegen/warnings.cr
, which is super strange because warnings is a semantic thing. For example if you compile with--no-codegen
you don't get the warnings.I think this should be refactored. The best place to put this might be in
CleanUpVisitor
.I might try to improve this, I just don't want to forget about it.
The text was updated successfully, but these errors were encountered: