[Feedback wanted] Support for module dependency declaration

7 views
Skip to first unread message

Marcos Passos

unread,
Aug 27, 2019, 11:43:59 PM8/27/19
to jackson-dev
Hi folks!

I've opened a PR that introduces the possibility of declaring modules dependencies to ensure the object mapper will register the required module as well.

In our case, we've several modules that depend on the Jdk8Module. We also have modules that depend on other modules, e.g.:
  • Module A depends on Jdk8Module
  • Module B depends on Module A and Jdk8Module
  • Module C depends on Module B and Jdk8Module

When you split the serialization modules into fine-grained modules, it's much easier to declare the dependencies at the module level rather than requiring the dependency every time you have to use it.

Please, feel free to leave your comments about the proposal.

- Marcos

Tatu Saloranta

unread,
Aug 29, 2019, 8:17:03 PM8/29/19
to jacks...@googlegroups.com
I am hoping to hear from anyone interested, who has had challenges in
maintaining (custom) modules; or who otherwise has opinions on this.
Part of the reason I am eager to hear about this relatively soon is
that I am hoping to close work on 2.10 -- 2.10.0.pr2 should be
released within next 4-5 days, and although this is not a deadline for
all work, additions beyond pr2 will get less testing and may face more
scrutiny. Proposed change itself is quite safe but assuming this seems
like a feature of interest to others I would like to get API somewhat
right.

-+ Tatu +-

Marcos Passos

unread,
Aug 29, 2019, 9:08:35 PM8/29/19
to jacks...@googlegroups.com
We’ve been using this pattern for three months now, and we’ve noticed a considerable improvement since we broke up large packages into smaller ones. Currently, Jackson modules can only declare soft-dependencies which is a bad experience from a developer perspective: you only notice that a dependency is missing at runtime, when in fact they should never have to care about it in the first place. 

- Marcos


--
You received this message because you are subscribed to the Google Groups "jackson-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jackson-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jackson-dev/CAL4a10hK18ZtjEmaSJuPHyp7VHNm_62z0oUgoz3tnWfzO35LeA%40mail.gmail.com.

Tatu Saloranta

unread,
Sep 6, 2019, 9:13:12 PM9/6/19
to jacks...@googlegroups.com
Since I have not heard anything, I think I will proceed with merging
this for 2.10 as suggested

-+ Tatu +-

On Thu, Aug 29, 2019 at 6:08 PM Marcos Passos
> To view this discussion on the web visit https://groups.google.com/d/msgid/jackson-dev/CANA3Des09%3D3FCRi8sQk5Yk4us-Qk0JYHzJi%3DdXrAgDyBPhqhKg%40mail.gmail.com.
Reply all
Reply to author
Forward
0 new messages