micronaut-projects / micronaut-projects/micronaut-serialization

Micronaut Serialization is too aggressive and breaks old HTTP clients

Open
#607 12 comments 5 reactions 0 assignees View on GitHub
status: under consideration
Dominant language
Java
Stars
36
Forks
29
Avg merge
1d 21h
Merged PRs (30d)
29

Description

### Expected Behavior

HTTP clients using new Micronaut Serialization with `@Serdable` annotation should be able to coexist with the legacy HTTP clients that uses beans that are only annotated with `@Introspected` annotation.

### Actual Behaviour

Whenever the Micronaut Serde library is on the classpath (even as transient dependency) then all HTTP clients not using `@Serdable` start failing.

In a large codebase with many HTTP clients is this behavior too aggressive.

### Steps To Reproduce

1. checkout https://github.com/musketyr/micronaut-serialization-too-aggressive
2. run `NormalClientTest`

This is a simplified version of having a legacy HTTP client and a transitive dependency on Micronaut Serde.

### Environment Information

Java 17

### Example Application

https://github.com/musketyr/micronaut-serialization-too-aggressive

### Version

4.1.5, 3.10.1

Contributor guide

Open the contributing guide

Research direction

Start with the linked reproduction repository and run NormalClientTest under Java 17 with the stated Micronaut Serialization and Micronaut versions. Trace why adding Micronaut Serde causes the legacy @Introspected-only client to fail, then verify that @Serdable clients and legacy clients coexist without the dependency changing legacy behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
api, backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.