Skip to content

Stricter mode of API checking w.r.t. API file dump order #260

Open
@sandwwraith

Description

@sandwwraith

Currently, apiCheck task is tolerant to ordering changes in API file: if two lines with, let's say, top-level functions, are swapped, it won't cause apiCheck to fail. While generally, it is a desirable behavior, it has one major drawback. Since API file ordering is not stable and it can change (e.g. it was changed between 0.15 and 0.16 versions for Klib dumps), it is quite easy to get into the following situation:

  1. You have 0.15 dump committed
  2. You make a PR that updates BCV to 0.16. apiCheck passes; no other changes are required.
  3. You (perhaps several weeks later) add one function to a public API and do apiDump. Suddenly, not only has your new function been added to the API, but the whole diff has also become cluttered with lines reordering — change which is not related to your new PR per se.

To avoid this, we should either write BCV/dump version to the file (so updating plugin would force users to do new apiDump), or make a configuration option that would strictly compare files — so that people who want to avoid such situation can opt-in to order check.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions