Skip to content

Remove Feign dependency#3429

Open
pkoenig10 wants to merge 3 commits intodevelopfrom
pkoenig/feign2
Open

Remove Feign dependency#3429
pkoenig10 wants to merge 3 commits intodevelopfrom
pkoenig/feign2

Conversation

@pkoenig10
Copy link
Copy Markdown
Member

@pkoenig10 pkoenig10 commented Mar 27, 2026

We currently depend on a very old and not longer maintained version of Feign. Upgrading is tricky because there are a number of subtle behavior changes in the latest version of Feign - see #1337. This code is quite ossified, so even small behavior changes are likely to cause problems.

This is starting to cause conflicts with consumers are also depending on modern version of Feign.

This PR addresses the issue by removing our Feign dependency. This is accomplished by vendoring the code from the version of Feign we currently depend on.

This PR is divided into a series of commits in order to make reviewing easier:

  1. Vendor Feign as is into conjure-java-jaxrs-client

  2. Move all classes to the com.palantir.conjure.java.client.jaxrs

    conjure-java-jaxrs-client currently exposes a lot of it's internals, mostly because internal classes don't all exist in the same package. Changing the interfaces that our classes implement is an already an ABI, so we should take the opportunity to address this deficiency while we are breaking the API.

    There are a small handful of internal consumers that are importing some of the feignimpl classes. But it is small enough (roughly 13 files across 8 repos), that this change should be acceptable.

  3. Remove unused code, suppress warnings, and make internal things package private

    This includes some small refactors if those refactors allowed us to eliminate more code.

There are many additional follow up refactors that can be done to further clean up and simplify this code.

@pkoenig10 pkoenig10 changed the base branch from pkoenig/feign to develop April 22, 2026 12:59
@changelog-app
Copy link
Copy Markdown

changelog-app Bot commented Apr 22, 2026

Generate changelog in changelog/@unreleased

Type (Select exactly one)

  • Feature (Adding new functionality)
  • Improvement (Improving existing functionality)
  • Fix (Fixing an issue with existing functionality)
  • Break (Creating a new major version by breaking public APIs)
  • Deprecation (Removing functionality in a non-breaking way)
  • Migration (Automatically moving data/functionality to a new system)

Description

conjure-java-jaxrs-client no longer depends on Feign. Some internal conjure-java-jaxrs-client that were previously public are now package-private and no longer accessible to consumers.

Check the box to generate changelog(s)

  • Generate changelog entry

@pkoenig10 pkoenig10 force-pushed the pkoenig/feign2 branch 2 times, most recently from cb8bfb4 to 23f7a01 Compare April 22, 2026 13:27
@pkoenig10
Copy link
Copy Markdown
Member Author

pkoenig10 commented Apr 22, 2026

I may take the time to experiment with a more substantive change, where we instead build this more from the ground up and remove all the unnecessary Feign intermediate parts. Basically all we need from Feign is the logic in Contract to parse a JAX-RS annotated class into metadata that we can use to make requests. For example, I'm imaging that we can parse the JAX-RS annotated class directly into Endpoint implementations.

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.

1 participant