Skip to content

objective-git still relies on libgit2's deprecated API shims #652

Description

@goneng

The libgit2 1.9.4 bump in #641 restores compatibility through libgit2's
deprecation shims rather than migrating to the current API. Fifteen files in the
pinned objective-git import git2/deprecated.h to bring back pre-1.0 symbol
names:

GTConfiguration.m  GTRemote.m     GTBlob.m       GTFilterList.m  GTIndex.m
GTRepository+Status.m             GTFilter.m     GTBranch.m      GTCredential.m
GTRepository+RemoteOperations.m   GTDiff.m       GTDiffPatch.m   GTReference.m
GTOID.m            NSData+Git.m

That is a reasonable way to land a jump from 0.28.5, and it works: libgit2 keeps
those symbols unless built with DEPRECATE_HARD, which is OFF by default and
not set here.

Filing it so the debt is written down rather than rediscovered at the next bump.
Two things make it worth tracking:

  • The shims are opt-out today, but they are deprecated upstream and can be
    removed. A future libgit2 that drops them, or a build that turns
    DEPRECATE_HARD on, turns this into a compile failure across fifteen files at
    once.
  • The imports mark exactly which call sites still use the old API, so they are a
    ready-made checklist for migrating.

No action needed while #641 is in flight. Raised during its review and promised
there, so recording it here.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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