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

ordering issues with side annotations #10

Open
sigmundch opened this issue Mar 31, 2015 · 4 comments
Open

ordering issues with side annotations #10

sigmundch opened this issue Mar 31, 2015 · 4 comments
Labels

Comments

@sigmundch
Copy link
Owner

there is a potential ordering issue with how to combine interceptors that are annotated on the side via @ApplyInterceptorTo

Original comment from @mraleph:

If I import the same library twice into two other different libraries and on both imports I apply interceptors to the same member --- then it's not entirely clear how that should "stack".

Of course there is an obvious order induced by the order of import statements - but this order is somewhat hidden from the programmer.

@sigmundch
Copy link
Owner Author

This is an interesting point. Some ideas:

  • require the user to specify the order somewhere else (this can be very hard to express though)
  • make it invalid: detect potential ambiguity and make it a static error when it occurs.

@jakemac53
Copy link

also, how should those be ordered relative to existing annotations?

@sigmundch
Copy link
Owner Author

if they exist on the declaration itself, I'd say those always win/apply first.

@jakemac53
Copy link

you can imagine a situation where you needed your SideTag annotation to be first though

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants