fix(deps): update dependency com.squareup.okio:okio to v3 #590
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
1.17.6
->3.9.0
Release Notes
square/okio (com.squareup.okio:okio)
v3.9.0
2024-03-12
FileSystem.SYSTEM
can be used in source sets that target both Kotlin/Native andKotlin/JVM. Previously, we had this symbol in each source set but it wasn't available to
common source sets.
COpaquePointer.readByteString(...)
creates a ByteString from a memory address.InflaterSource
,DeflaterSink
,GzipSink
, andGzipSource
in Kotlin/Native.FileMetadata.lastModifiedAtMillis()
is interpreted as UTC and not the host machine's time zone.of ZIP's built-in DOS timestamps, and the 2038 time bombs of ZIP's extended timestamps.
FileSystem.RESOURCES
.NullPointerException
ifCloseable.use { ... }
returns null.v3.8.0
2024-02-09
TypedOptions
works likeOptions
, but it returns aT
rather than an index.Pipe.fold()
.v3.7.0
2023-12-16
Timeout.cancel()
prevents a timeout from firing.watchosX86
Kotlin/Native target. From [the Kotlin blog][watchosX86],‘This is an obsolete simulator for Intel Macs. Use the watchosX64 target instead.’
watchosDeviceArm64
Kotlin/Native target.Timeout
APIs that acceptkotlin.time.Duration
.v3.6.0
2023-10-01
metadata
functions onZipFileSystem
. We had a bugwhere we were closing the
.zip
file, but not a stream inside of it. We would have preventedthis bug if only we’d used
FakeFileSystem.checkNoOpenFiles()
in our tests!ResourceFileSystem.read()
. Thisoperation doesn't need this index, and building it is potentially expensive.
linuxArm64
). Note thatwe haven't yet added CI test coverage for this platform.
v3.5.0
2023-08-02
improving, just like Kotlin's own support for WASM.
WasiFileSystem
. This is in the newokio-wasifilesystem
module. It requires the [preview1]WASI API. We’ll make backwards-incompatible upgrades to new WASI API versions as they become
available.
FileSystem.list()
had always returned absolute paths, even when the target directory was supplied as a relative
path.
FileHandle
on Kotlin/Native.v3.4.0
2023-07-07
java.nio.file.FileSystem
) as an Okio FileSystem usingfileSystem.asOkioFileSystem()
.AssetManager
as an Okio FileSystem usingAssetFileSystem
. This is in thenew
okio-assetfilesystem
module. Android applications should prefer this overFileSystem.RESOURCES
as it’s faster to load.XLEN
) is 32 KiB or larger.FakeFileSystem.canonicalize()
.createdAtMillis
inNodeJsFileSystem
file metadata. We wereincorrectly using
ctimeMs
, wherec
means changed, not created.UnsafeCursor
is nowCloseable
.v3.3.0
2023-01-07
use {}
is used with a non-local return. We introduced thisperformance and stability bug by not considering that non-local returns execute neither the
return
norcatch
control flows.BufferedSink
andBufferedSource
. These were never intendedfor end-users to implement, and we're happy that Kotlin now allows us to express that in our API.
synchronized
toReentrantLock
andCondition
. We expect thisto improve help when using Okio with Java virtual threads ([Project Loom][loom]).
v3.2.0
2022-06-26
com.squareup.okio:okio:3.x.x
) to depend on theJVM artifact (
com.squareup.okio:okio-jvm:3.x.x
) for Maven builds. This should work-around anissue where Maven doesn't interpret Gradle metadata.
CipherSource
andCipherSink
to recover if the cipher doesn't support streaming.This should work around a crash with AES/GCM ciphers on Android.
v3.1.0
2022-04-19
multiplatform project please upgrade your project to Kotlin 1.6.20 (or newer) to take advantage
of this. With hierarchical projects it's easier to use properties like
FileSystem.SYSTEM
thatare available on most Okio platforms but not all of them.
ForwardingSource
is now available on all platforms.watchosX64
platform is now supported.FileSystem.openZip()
.canonicalize()
of ZIP file systems if the path doesn't exist.okio.ProtocolException
is a new exception type for multiplatform users. (It is aliased tojava.net.ProtocolException
on JVM platforms).v3.0.0
2021-10-28
This is the first stable release of Okio 3.x. This release is strongly backwards-compatible with
Okio 2.x, and the new major version signifies new capabilities more than it does backwards
incompatibility.
Most users should be able to upgrade from 2.x by just changing the version. If you're using Okio
in a Kotlin Multiplatform project, you'll need to drop the
-multiplatform
suffix in your Gradledependencies.
New: Remove
@ExperimentalFileSystem
. This annotation is no longer necessary as the file systemis no longer experimental!
New: Path no longer aggressively normalizes
..
segments. UsePath.normalize()
to apply thesebased on the content of the path, or
FileSystem.canonicalize()
to do it honoring any symlinkson a particular file system.
New: Publish a [bill of materials (BOM)][bom] for Okio. Depend on this from Gradle or Maven to
keep all of your Okio artifacts on the same version, even if they're declared via transitive
dependencies. You can even omit versions when declaring other Okio dependencies.
New:
FileSystem.delete()
silently succeeds when deleting a file that doesn't exist. Usethe new
mustExist
parameter to trigger an exception instead.New:
FileSystem.createDirectories()
silently succeeds when creating a directory that alreadyexists. Use the new
mustCreate
parameter to trigger an exception instead.New:
FileSystem
offers Java-language overloads where appropriate. Previously functions thathad default parameters were potentially awkward to invoke from Java.
New:
Timeout.intersectWith()
returns a value instead ofUnit
. This is a binary-incompatiblechange. We expect that this public API is very rarely used outside of Okio itself.
Fix: Change
BufferedSource.readDecimalLong()
to fail if the input value is just-
. PreviouslyOkio incorrectly returned
0
for this.v2.10.0
2021-01-07
HashingSource
,HashingSink
, buffer hash functions, andUnsafeCursor
on non-JVMplatforms. Previously these were all JVM-only.
Closeable
onSink
andSource
on non-JVM platforms. Okio now includes amultiplatform
okio.Closeable
interface and correspondinguse {}
extension. Closing resourceswhen you're done with them shouldn't be JVM-only!
Sink.hashingSink
andSource.hashingSource
functions that acceptjava.security.MessageDigest
andjavax.crypto.Mac
instances. Use these when your hash functionisn't built-in.
ShortBufferException
inCipherSink
andCipherSource
on Android.(Android may throw a
ShortBufferException
even if the buffer is not too short. We nowavoid this problem!)
v2.9.0
2020-10-04
Buffer
when writing a slice of a segmentedByteString
. We had a severebug where
ByteString
instances created withsnapshot()
andreadByteString()
incorrectlyadjusted the buffer's size by their full length, not the length of the slice. This would have
caused buffer reads to crash! We do not believe data was silently corrupted.
CipherSink
andCipherSource
. Use these withjavax.crypto.Cipher
to encrypt and decryptstreams of data. This is a low-level encryption API; most applications should use higher-level
APIs like TLS when available.
md5
,sha1()
,sha512()
, andsha256()
to common Kotlin. Theseare currently only available on
ByteString
, multiplatform support forHashingSource
,HashingSink
, andBuffer
should come in a follow-up release. We wrote and optimized our ownimplementations of these hash functions in Kotlin. On JVM and Android platforms Okio still uses
the platform's built-in hash functions.
v2.8.0
2020-08-17
v2.7.0
2020-07-07
New:
Pipe.cancel()
causes in-progress and future reads and writes on the pipe to immediatelyfail with an
IOException
. The streams may still be canceled normally.New: Enlarge Okio's internal segment pool from a fixed 64 KiB total to 64 KiB per processor. For
example, on an Intel i9 8-core/16-thread machine the segment pool now uses up to 1 MiB of memory.
New: Migrate from
synchronized
to lock-free when accessing the segment pool. Combined with thechange above we saw throughput increase 3x on a synthetic benchmark designed to create
contention.
v2.6.0
2020-04-22
InflaterSource.readOrInflate()
is likeInflaterSource.read()
, except it will return 0 ifconsuming deflated bytes from the underlying stream did not produce new inflated bytes.
v2.5.0
2020-03-20
v2.4.3
2019-12-20
v2.4.2
2019-12-11
InputStream
source is exhausted exactly at a buffer segment boundary.We had a bug where a sequence of reads could violate a buffer's invariants, and this could result
in a crash when subsequent reads encountered an unexpected empty segment.
v2.4.1
2019-10-04
ByteString
on Kotlin/Native which prevented freezing.v2.4.0
2019-08-26
v2.3.0
2019-07-29
This release changes our build from Kotlin-JVM to Kotlin-multiplatform (which includes JVM).
Both native and JavaScript platforms are unstable preview releases and subject to
backwards-incompatible changes in forthcoming releases.
To try Okio in a multiplatform project use this Maven coordinate:
api('com.squareup.okio:okio-multiplatform:2.3.0')
You’ll also need to [enable Gradle metadata][gradle_metadata] in your project's settings. The
artifact name for JVM projects has not changed.
api
instead ofimplementation
for the kotlin-stdlib dependency.BufferedSource.peek()
.v2.2.2
2019-01-28
Pipe.fold()
close the underlying sink when necessary.v2.2.1
2019-01-17
Pipe.fold()
flush the underlying sink.v2.2.0
2019-01-16
New:
Throttler
limits sources and sinks to a maximum desired throughput. Multiple sources andsinks can be attached to the same throttler and their combined throughput will not exceed the
desired throughput. Multiple throttlers can also be used on the same source or sink and they will
all be honored.
New:
Pipe.fold()
replaces the actively-readableSource
with a passively-writableSink
.This can be used to forward one sink to a target that is initially undetermined.
New: Optimize performance of ByteStrings created with
Buffer.snapshot()
.v2.1.0
2018-09-22
New:
BufferedSource.peek()
returns anotherBufferedSource
that reads ahead on the currentsource. Use this to process the same data multiple times.
New: Deprecate
BufferedSource.buffer()
, replacing it with eitherBufferedSource.getBuffer()
(in Java) or
BufferedSource.buffer
(in Kotlin). We have done likewise forBufferedSink
.When we introduced the new extension method
Source.buffer()
in Okio 2.0 we inadvertentlycollided with an existing method. This fixes that.
New: Improve performance of
Buffer.writeUtf8()
. This comes alongside initial implementation ofUTF-8 encoding and decoding in JavaScript which [uses XOR masks][xor_utf8] for great performance.
v2.0.0
2018-08-27
This release commits to a stable 2.0 API. Read the 2.0.0-RC1 changes for advice on upgrading from
1.x to 2.x.
We've also added APIs to ease migration for Kotlin users. They use Kotlin's
@Deprecated
annotationto help you change call sites from the 1.x style to the 2.x style.
Configuration
📅 Schedule: Branch creation - "before 4am on Monday" (UTC), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR has been generated by Mend Renovate. View repository job log here.