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

Bump com.github.mizosoft.methanol:methanol from 1.7.0 to 1.8.0 #127

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

dependabot[bot]
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Dec 30, 2024

Bumps com.github.mizosoft.methanol:methanol from 1.7.0 to 1.8.0.

Release notes

Sourced from com.github.mizosoft.methanol:methanol's releases.

v1.8.0

Ok, here we go. That took a while.

There's been a number of unreleased features brewing in the last two and a half years (!). Guess I could say I've been cooking some Meth—anol, and now it's ready to serve. What's—my—name? Please don't say Heisenbug.

Anyhow, here's what's new:

  • Added a Redis storage backend for the HTTP cache, which supports Standalone & Cluster setups.
  • Added the ability to chain caches with different storage backends, expectedly in the order of decreasing locality. This will work well with the Redis cache. Consider the case where you have multiple instances of your service all sharing a Redis setup, you can have a chain of (JVM memory -> Redis) or even (JVM memory -> disk -> Redis) caches, so each node can have a local cache to consult first, and the shared Redis cache after.
  • The object mapping mechanism has been reworked to stay away from ServiceLoader & static state. We now have an AdapterCodec that is registered per-client.
    var mapper = new JsonMapper();
    var adapterCodec =
        AdapterCodec.newBuilder()
            .encoder(JacksonAdapterFactory.createJsonEncoder(mapper))
            .decoder(JacksonAdapterFactory.createJsonDecoder(mapper))
            .build();
    var client =
        Methanol.newBuilder()
            .adapterCodec(adapterCodec)
            .build();
    record Person(String name) {}
    HttpResponse<Person> response = client.send(
    MutableRequest.GET(".../echo", new Person("Jack Reacher"), MediaType.APPLICATION_JSON),
    Person.class);

  • Added hip Kotlin extensions. These were enjoyable to work on. Check them out!.
  • Added adapters for Moshi. This is mainly intended for Kotlin.
  • Added hints API for adapters. This allows carrying arbitrary parameters to customize encoders & decoders. Currently, supported adapters expose no customization. If you think there's a useful, generalizable customization that can be passed to any of the supported adapters, feel free to create an issue.
  • Added MoreBodyPublishers::ofOutputStream & MoreBodyPublishers::ofByteChannel to be used in favor of WritableBodyPublisher.
  • Added adapters for basic types in the core module.
  • Added the ability to conditionally handle responses with ResponsePayload using the basic adapter.
  • Disk cache writes became considerably faster by avoiding fsync on entry writes/updates, which was used to provide durability in a manner that later turned out to be unnecessary for caches. Now CRC checks are used. Reads however became slightly slower.
  • Added adapters for JAXB Jakarta. They're practically the same as JAXB JavaEE, but use the newer namespaces.
  • New HttpClient APIs for closure & for setting a local socket address have been implemented.
  • As of Java 16, sendAsync(...).cancel(true), or an interruption for the thread calling send can cancel the underlying exchange. This is made sure to continue being the case even after the Methanol seasoning.
  • Made ResponseBuilder part of public API.

There are other incremental improvements here and there that I may have missed. I promise though your code won't break after the update. If that happens, please file an issue.

Later!

Changelog

Sourced from com.github.mizosoft.methanol:methanol's changelog.

Version 1.8.0

Ok, here we go. That took a while.

There's been a number of unreleased features brewing in the last two and a half years (!). Guess I could say I've been cooking some Meth—anol, and now it's ready to serve. What's—my—name? Please don't say Heisenbug.

Anyhow, here's what's new:

  • Added a Redis storage backend for the HTTP cache, which supports Standalone & Cluster setups.
  • Added the ability to chain caches with different storage backends, expectedly in the order of decreasing locality. This will work well with the Redis cache. Consider the case where you have multiple instances of your service all sharing a Redis setup, you can have a chain of (JVM memory -> Redis) or even (JVM memory -> disk -> Redis) caches, so each node can have a local cache to consult first, and the shared Redis cache after.
  • The object mapping mechanism has been reworked to stay away from ServiceLoader & static state. We now have an AdapterCodec that is registered per-client.
    var mapper = new JsonMapper();
    var adapterCodec =
        AdapterCodec.newBuilder()
            .encoder(JacksonAdapterFactory.createJsonEncoder(mapper))
            .decoder(JacksonAdapterFactory.createJsonDecoder(mapper))
            .build();
    var client =
        Methanol.newBuilder()
            .adapterCodec(adapterCodec)
            .build();
    record Person(String name) {}
    HttpResponse<Person> response = client.send(
    MutableRequest.GET(".../echo", new Person("Jack Reacher"), MediaType.APPLICATION_JSON),
    Person.class);

  • Added hip Kotlin extensions. These were enjoyable to work on. Check them out!.
  • Added adapters for Moshi. This is mainly intended for Kotlin.
  • Added hints API for adapters. This allows carrying arbitrary parameters to customize encoders & decoders. Currently, supported adapters expose no customization. If you think there's a useful, generalizable customization that can be passed to any of the supported adapters, feel free to create an issue.
  • Added MoreBodyPublishers::ofOutputStream & MoreBodyPublishers::ofByteChannel to be used in favor of WritableBodyPublisher.
  • Added adapters for basic types in the core module.
  • Added the ability to conditionally handle responses with ResponsePayload using the basic adapter.
  • Disk cache writes became considerably faster by avoiding fsync on entry writes/updates, which was used to provide durability in a manner that later turned out to be unnecessary for caches. Now CRC checks are used. Reads however became slightly slower.
  • Added adapters for JAXB Jakarta. They're practically the same as JAXB JavaEE, but use the newer namespaces.
  • New HttpClient APIs for closure & for setting a local socket address have been implemented.
  • As of Java 16, sendAsync(...).cancel(true), or an interruption for the thread calling send can cancel the underlying exchange. This is made sure to continue being the case even after the Methanol seasoning.
  • Made ResponseBuilder part of public API.

There are other incremental improvements here and there that I may have missed. I promise though your code won't break after the update. If that happens, please file an issue.

Later!

Commits

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Bumps [com.github.mizosoft.methanol:methanol](https://github.com/mizosoft/methanol) from 1.7.0 to 1.8.0.
- [Release notes](https://github.com/mizosoft/methanol/releases)
- [Changelog](https://github.com/mizosoft/methanol/blob/master/CHANGELOG.md)
- [Commits](mizosoft/methanol@v1.7.0...v1.8.0)

---
updated-dependencies:
- dependency-name: com.github.mizosoft.methanol:methanol
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
@dependabot dependabot bot added the dependencies Pull requests that update a dependency file label Dec 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants