Skip to content

Add target to ApiCompat.proj that determines when the baseline shrinks #28571

Closed

Description

@wtgodbe

Right now, unless a dev manually updates the baseline files for APICompat, we have no way of knowing if a check that's currently in the baseline has stopped triggering. We get an error when new checks pop up, so we'll know if the baseline grows, but nothing happens when old checks disappear, so we don't know if the baseline shrinks.

We could try writing to the baseline during every build, in addition to throwing an error if we trigger checks that weren't previously in the baseline.

CC @ericstj @terrajobst

Activity

  1. self-assigned this
    on Jan 30, 2019
  2. ericstj commented on Jan 31, 2019

    @ericstj
    Member

    Generically, I believe that is by-design. The baseline files often are shared per framework and may contain entries only needed for one of many frameworks. This could be changed but would be a feature in APICompat in dotnet/arcade.

    That said, you could hack something together that captures the output of the tool when run and compares that to the checked in baseline. Here's some psuedo code:

    run apicompat -baseline original.txt
    run apicompat > latest.txt
    readlines original.txt -> @(orig)
    readlines latest.txt > @(latest)
    @(orig) exclude @(latest) -> @(orphaned)
    Error @(orphaned)
    
  3. transferred this issue fromdotnet/corefxon Feb 1, 2020
  4. added this to the Future milestone on Feb 1, 2020
  5. removed their assignment
    on Feb 3, 2020
  6. added
    untriaged
    on Feb 23, 2020
  7. removed
    untriaged
    on Jul 8, 2020
  8. ViktorHofer commented on May 6, 2022

    @ViktorHofer
    Member

    Closing as I recently leveraged the ApiCompat's ValidateBaseline switch in ApiCompat.proj. That said, it's disabled right now because of a temporary issue tracked in #68730.

  9. ghost locked as resolved and limited conversation to collaborators on Jun 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions