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

Language model only returns runtime-retained annotations in build compatible extensions #554

Merged
merged 1 commit into from
Nov 17, 2021

Commits on Nov 1, 2021

  1. Language model only returns runtime-retained annotations in build com…

    …patible extensions
    
    The language model API itself doesn't specify what annotations are
    accessible. In the CDI context, only runtime-retained annotations
    make sense, because that's the only way all implementation strategies
    can be consistent. That's because:
    
    - purely runtime implementations, such as Weld, only have access
      to runtime-retained annotations;
    - bytecode-based implementations, such as ArC, only have access
      to runtime-retained and class-retained annotations, but don't
      have access to source-retained annotations;
    - annotation processing-based implementations, such as ODI, have
      access to all annotations.
    
    An alternative would be to specify that the language model _always_
    returns only runtime-retained annotations. That would be just fine
    strictly from the CDI perspective, but unforeseen cases may exist
    where the language model API would be useful, but nothing would
    prevent providing access to class-retained or even source-retained
    annotations. Hence, I believe it is better to make the restriction
    on the CDI level, and not on the language model level.
    Ladicek committed Nov 1, 2021
    Configuration menu
    Copy the full SHA
    82aad25 View commit details
    Browse the repository at this point in the history