Opened 11 months ago

Last modified 9 months ago

#16217 new task

check-api-annotations should check that an annotation does not precede its span

Reported by: alanz Owned by:
Priority: normal Milestone: 8.8.1
Component: Test Suite Version: 8.6.3
Keywords: Cc:
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: Incorrect API annotation Test Case:
Blocked By: Blocking:
Related Tickets: Differential Rev(s):
Wiki Page:

Description

For an API annotation to be useful, it must not occur before the span it is enclosed in.

So, for check-api-annotation output, a line such as

((Test16212.hs:3:22-36,AnnOpenP), [Test16212.hs:3:21]),

should be flagged as an error, as the AnnOpenP location of 3:21 precedes its enclosing span of 3:22-26.

Change History (3)

comment:2 Changed 11 months ago by alanz

Milestone: 8.8.1

comment:3 Changed 9 months ago by Ben Gamari <ben@…>

In 3cf12e60/ghc:

check-api-annotations checks for annotation preceding its span

For an API annotation to be useful, it must not occur before the span
it is enclosed in.

So, for check-api-annotation output, a line such as

((Test16212.hs:3:22-36,AnnOpenP), [Test16212.hs:3:21]),

should be flagged as an error, as the AnnOpenP location of 3:21
precedes its enclosing span of 3:22-26.

This patch does this.

Closes #16217
Note: See TracTickets for help on using tickets.