Skip to content

Phasing out annotation syntax #2745

@jurgenvinju

Description

@jurgenvinju

Annotation syntax still exists. Their semantics is (almost) simulated by the interpreter using keyword fields under the hood. The Tree@\loc annotation is simulated by the Tree.src keyword field. The default throws NoSuchAnnotation.

This is the sequential plan to finally remove all declarations and uses of annotation syntax:

  1. Rewrite all annotations in the standard library to keyword fields. There is a tool for this ready. Test and integration tests should succeed.
  2. Make a BOOT release of the rascal project
  3. Rewrite all annotations in the typepal project
  4. Make a BOOT release of typepal depending on the BOOT release of rascal
  5. Make rascal depend on the BOOT release of typepal
  6. Make a normal RC release of rascal
  7. Bump the release of rascal in typepal to the RC release
  8. release typepal with an RC number
  9. bump to this release of typepal in the rascal project
  10. Change the checker to report errors for uses and declarations of annotations. Not only deprecation warnings anymore. do not show errors for annotation uses not declared in the current project, only a warning, unless their declarations have been replaced by keyword fields already. Then it's still an error. This is to allow maintenance on projects that use other projects which have yet to be fixed.
  11. Connect the transformation tool to the quick fix feature of the Rascal ide. It will rewrite all declarations and uses of the entire project in one go, per project.
  12. Release rascal and the ide with the above features.
  13. Apply the fixes to all library projects under our care, using the ide. Release them.
  14. Wait a year and several releases.
  15. Remove the semantics for annotation syntax from the interpreter and the compiler. The syntax will stay to accommodate proper error messages.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions