Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mark methods using squareup javapoet as deprecated #559

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

ash211
Copy link

@ash211 ash211 commented Nov 5, 2024

The original square/javapoet project has been marked deprecated for 4 years now, and there's a successor at https://github.com/palantir/javapoet that is actively maintained.

In #472 this project started supporting both versions (they are at non-conflicting coordinates). It's now been 6 months and the new version of Goethe has trickled through the ecosystem.

With this change, we mark the old square versions as deprecated, and declare this project's intention to eventually remove them. An example PR that does remove them is at #558 but I think we need a bit more time internally to remove these references before pulling the plug.

And even if there is little benefit to pulling the plug, I think the deprecation warning is important. This makes it clear to new callers who see multiple method overloads which one they should be using. One reason is that the old square release contains a perf issue with an unreleased fix: https://github.com/square/javapoet/pull/828 that is released on the Palantir successor.

@ash211 ash211 requested a review from pkoenig10 November 5, 2024 06:01
@changelog-app
Copy link

changelog-app bot commented Nov 5, 2024

Generate changelog in changelog/@unreleased

What do the change types mean?
  • feature: A new feature of the service.
  • improvement: An incremental improvement in the functionality or operation of the service.
  • fix: Remedies the incorrect behaviour of a component of the service in a backwards-compatible way.
  • break: Has the potential to break consumers of this service's API, inclusive of both Palantir services
    and external consumers of the service's API (e.g. customer-written software or integrations).
  • deprecation: Advertises the intention to remove service functionality without any change to the
    operation of the service itself.
  • manualTask: Requires the possibility of manual intervention (running a script, eyeballing configuration,
    performing database surgery, ...) at the time of upgrade for it to succeed.
  • migration: A fully automatic upgrade migration task with no engineer input required.

Note: only one type should be chosen.

How are new versions calculated?
  • ❗The break and manual task changelog types will result in a major release!
  • 🐛 The fix changelog type will result in a minor release in most cases, and a patch release version for patch branches. This behaviour is configurable in autorelease.
  • ✨ All others will result in a minor version release.

Type

  • Feature
  • Improvement
  • Fix
  • Break
  • Deprecation
  • Manual task
  • Migration

Description

Mark methods using squareup javapoet as deprecated

Check the box to generate changelog(s)

  • Generate changelog entry

Copy link
Member

@pkoenig10 pkoenig10 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As mentioned in #558 (review), I don't think this really buys as much. And it comes with the very real cost of blocking automated upgrades in repos that have enabled deprecation warnings as errors.

The practically of this change is a direct function of how widely this library is used with con.squareup:javapoet. If it was just a couple places, then this would probably be worth it. But have dozens of libraries that haven't migrated to our JavaPoet fork.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants