Skip to content

Messages should interact more gracefully with JavaΒ #3013

@mpkorstanje

Description

@mpkorstanje

πŸ€” What's the problem you're trying to solve?

While converting the plugins to use messages I'm running into some annoyances using the messages API.

✨ What's your proposed solution?

  • Timestamp should use Timestamp(Long seconds, Integer nanos) to match Instants.getEpochSecond and getNano.
  • Location should use Location(Integer line, Integer column). There are no instances were a string in Java can be addressed with a long.
  • Same for Group(List<Group> children, Integer start, String value)

Implementing Comparators for Location and Timestamp could also help avoid some annoyances. (e.g. https://github.com/cucumber/query/blob/main/java/src/main/java/io/cucumber/query/TimestampComparator.java).

⛏ Have you considered any alternatives or workarounds?

No response

πŸ“š Any additional context?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions