-
Notifications
You must be signed in to change notification settings - Fork 53
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
Method Annotations #585
Method Annotations #585
Conversation
Might need some assistance @Jason2605 . All tests and examples are passing locally but not in CI and not sure wht the failure is there. Output seems to be cut off. |
Signed-off-by: Brian Downs <brian.downs@gmail.com>
Signed-off-by: Brian Downs <brian.downs@gmail.com>
Signed-off-by: Brian Downs <brian.downs@gmail.com>
Signed-off-by: Brian Downs <brian.downs@gmail.com>
Signed-off-by: Brian Downs <brian.downs@gmail.com>
Signed-off-by: Brian Downs <brian.downs@gmail.com>
Signed-off-by: Brian Downs <brian.downs@gmail.com>
Signed-off-by: Brian Downs <brian.downs@gmail.com>
0ede329
to
1e2ae12
Compare
Signed-off-by: Brian Downs <brian.downs@gmail.com>
Signed-off-by: Brian Downs <brian.downs@gmail.com>
Signed-off-by: Brian Downs <brian.downs@gmail.com>
Signed-off-by: Brian Downs <brian.downs@gmail.com>
Sorry @briandowns been away for the new year! Thanks for working on this, I haven't forgotten, I'll try to get around to seeing why the tests aren't passing |
Yeah for me running in the debug build im getting a segfault when running the annotation tests, will investigate further |
docs/docs/classes.md
Outdated
``` | ||
|
||
Multiple annotations can be supplied to classes. | ||
Method annotations are available on all class methods except initializers. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Whats the rationale for not on initialisers for my curiosity?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Most the thought of class initialization consistency. I'm happy to update it to allow for init
to have annotations as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah I think allowing it on constructors could be useful, initial thoughts being it may be useful in the future (potentially?) if we were to create some sort of service container and enable some sort of clever dependency injection or something like that
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah I think allowing it on constructors could be useful, initial thoughts being it may be useful in the future (potentially?) if we were to create some sort of service container and enable some sort of clever dependency injection or something like that
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good. I'll work on this tonight. Thanks for all of the feedback!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No worries, sorry it took a bit longer! Thanks for the effort on this too
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the review. I think we're all set now.
Co-authored-by: Jason_000 <Jason2605@users.noreply.github.com>
Co-authored-by: Jason_000 <Jason2605@users.noreply.github.com>
Co-authored-by: Jason_000 <Jason2605@users.noreply.github.com>
Signed-off-by: Brian Downs <brian.downs@gmail.com>
Signed-off-by: Brian Downs <brian.downs@gmail.com>
Signed-off-by: Brian Downs <brian.downs@gmail.com>
Something I've noticed from a "correctness" standpoint is this is technically legal:
It is an edge case scenario but it would be good if this resulted in a compile time error since there's no method, what do you think? |
Signed-off-by: Brian Downs <brian.downs@gmail.com>
Signed-off-by: Brian Downs <brian.downs@gmail.com>
I "think" we're all set. |
Signed-off-by: Brian Downs <brian.downs@gmail.com>
Legend, thank you very much for this! |
Thanks! Was a fun challenge. And thanks for the guidance and feedback through the process. |
Well detailed description of the change :
Initial pass at method annotation implementation. Method annotations have the same expectations as class annotations where they're not brought up from an inherited class.
This is a breaking change as the previous class field of
annotations
is nowclassAnnotations
with an additional fieldmethodAnnotations
Underlying class structure to carry the annotations:
Resolves: #
#464
Type of change:
Bug fix
New feature
Breaking change (fix or feature that would cause existing functionality to not work as expected)
Housekeeping
Tests have been updated to reflect the changes done within this PR (if applicable).
Documentation has been updated to reflect the changes done within this PR (if applicable).
Preview (Screenshots) :