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

fix(deps): update dependency com.squareup.okio:okio to v3 #590

Merged
merged 1 commit into from
Apr 1, 2024

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Feb 26, 2024

Mend Renovate

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
com.squareup.okio:okio 1.17.6 -> 3.9.0 age adoption passing confidence

Release Notes

square/okio (com.squareup.okio:okio)

v3.9.0

2024-03-12

  • New: FileSystem.SYSTEM can be used in source sets that target both Kotlin/Native and
    Kotlin/JVM. Previously, we had this symbol in each source set but it wasn't available to
    common source sets.
  • New: COpaquePointer.readByteString(...) creates a ByteString from a memory address.
  • New: Support InflaterSource, DeflaterSink, GzipSink, and GzipSource in Kotlin/Native.
  • New: Support openZip() on Kotlin/Native. One known bug in this implementation is that
    FileMetadata.lastModifiedAtMillis() is interpreted as UTC and not the host machine's time zone.
  • New: Prefer NTFS timestamps in ZIP file systems' metadata. This avoids the time zone problems
    of ZIP's built-in DOS timestamps, and the 2038 time bombs of ZIP's extended timestamps.
  • Fix: Don't leak file handles to opened JAR files open in FileSystem.RESOURCES.
  • Fix: Don't throw a NullPointerException if Closeable.use { ... } returns null.

v3.8.0

2024-02-09

  • New: TypedOptions works like Options, but it returns a T rather than an index.
  • Fix: Don't leave sinks open when there's a race in Pipe.fold().

v3.7.0

2023-12-16

  • New: Timeout.cancel() prevents a timeout from firing.
  • Breaking: Drop the watchosX86 Kotlin/Native target. From [the Kotlin blog][watchosX86],
    ‘This is an obsolete simulator for Intel Macs. Use the watchosX64 target instead.’
  • New: Add the watchosDeviceArm64 Kotlin/Native target.
  • New: Timeout APIs that accept kotlin.time.Duration.
  • Upgrade: [Kotlin 1.9.21][kotlin_1_9_21].

v3.6.0

2023-10-01

  • Fix: Don't leak file handles when using metadata functions on ZipFileSystem. We had a bug
    where we were closing the .zip file, but not a stream inside of it. We would have prevented
    this bug if only we’d used FakeFileSystem.checkNoOpenFiles() in our tests!
  • Fix: Don't build an index of a class loader's resources in ResourceFileSystem.read(). This
    operation doesn't need this index, and building it is potentially expensive.
  • New: Experimentally support Linux on ARM64 for Kotlin/Native targets (linuxArm64). Note that
    we haven't yet added CI test coverage for this platform.
  • Upgrade: [Kotlin 1.9.10][kotlin_1_9_10].

v3.5.0

2023-08-02

  • New: Support the WebAssembly (WASM) platform. Okio's support for WASM is experimental, but
    improving, just like Kotlin's own support for WASM.
  • New: Adapt WebAssembly System Interface (WASI) API's as an Okio FileSystem using
    WasiFileSystem. This is in the new okio-wasifilesystem module. It requires the [preview1]
    WASI API. We’ll make backwards-incompatible upgrades to new WASI API versions as they become
    available.
  • Fix: Return relative paths in the NIO adapter FileSystem when required. FileSystem.list()
    had always returned absolute paths, even when the target directory was supplied as a relative
    path.
  • Fix: Don't crash when reading into an empty array using FileHandle on Kotlin/Native.
  • Upgrade: [Kotlin 1.9.0][kotlin_1_9_0].

v3.4.0

2023-07-07

  • New: Adapt a Java NIO FileSystem (java.nio.file.FileSystem) as an Okio FileSystem using
    fileSystem.asOkioFileSystem().
  • New: Adapt Android’s AssetManager as an Okio FileSystem using AssetFileSystem. This is in the
    new okio-assetfilesystem module. Android applications should prefer this over
    FileSystem.RESOURCES as it’s faster to load.
  • Fix: Don't crash decoding GZIP files when the optional extra data (XLEN) is 32 KiB or larger.
  • Fix: Resolve symlinks in FakeFileSystem.canonicalize().
  • Fix: Report the correct createdAtMillis in NodeJsFileSystem file metadata. We were
    incorrectly using ctimeMs, where c means changed, not created.
  • Fix: UnsafeCursor is now Closeable.

v3.3.0

2023-01-07

  • Fix: Don't leak resources when use {} is used with a non-local return. We introduced this
    performance and stability bug by not considering that non-local returns execute neither the
    return nor catch control flows.
  • Fix: Use a sealed interface for BufferedSink and BufferedSource. These were never intended
    for end-users to implement, and we're happy that Kotlin now allows us to express that in our API.
  • New: Change internal locks from synchronized to ReentrantLock and Condition. We expect this
    to improve help when using Okio with Java virtual threads ([Project Loom][loom]).
  • Upgrade: [Kotlin 1.8.0][kotlin_1_8_0].

v3.2.0

2022-06-26

  • Fix: Configure the multiplatform artifact (com.squareup.okio:okio:3.x.x) to depend on the
    JVM artifact (com.squareup.okio:okio-jvm:3.x.x) for Maven builds. This should work-around an
    issue where Maven doesn't interpret Gradle metadata.
  • Fix: Change CipherSource and CipherSink to recover if the cipher doesn't support streaming.
    This should work around a crash with AES/GCM ciphers on Android.
  • New: Enable compatibility with non-hierarchical projects.

v3.1.0

2022-04-19

  • Upgrade: [Kotlin 1.6.20][kotlin_1_6_20].
  • New: Support [Hierarchical project structure][hierarchical_projects]. If you're using Okio in a
    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 that
    are available on most Okio platforms but not all of them.
  • New: ForwardingSource is now available on all platforms.
  • New: The watchosX64 platform is now supported.
  • Fix: Don't crash in `NSData.toByteString()' when the input is empty.
  • Fix: Support empty ZIP files in FileSystem.openZip().
  • Fix: Throw in canonicalize() of ZIP file systems if the path doesn't exist.
  • Fix: Don't require ZIP files start with a local file header.
  • New: okio.ProtocolException is a new exception type for multiplatform users. (It is aliased to
    java.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 Gradle
dependencies.

  • New: Remove @ExperimentalFileSystem. This annotation is no longer necessary as the file system
    is no longer experimental!

  • New: Path no longer aggressively normalizes .. segments. Use Path.normalize() to apply these
    based on the content of the path, or FileSystem.canonicalize() to do it honoring any symlinks
    on 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.

    dependencies {
       api(platform("com.squareup.okio:okio-bom:3.0.0"))
       api("com.squareup.okio:okio")                // No version!
       api("com.squareup.okio:okio-fakefilesystem") // No version!
    }
  • New: FileSystem.delete() silently succeeds when deleting a file that doesn't exist. Use
    the new mustExist parameter to trigger an exception instead.

  • New: FileSystem.createDirectories() silently succeeds when creating a directory that already
    exists. Use the new mustCreate parameter to trigger an exception instead.

  • New: FileSystem offers Java-language overloads where appropriate. Previously functions that
    had default parameters were potentially awkward to invoke from Java.

  • New: Timeout.intersectWith() returns a value instead of Unit. This is a binary-incompatible
    change. 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 -. Previously
    Okio incorrectly returned 0 for this.

v2.10.0

2021-01-07

  • New: Support Windows (mingwX64) in multiplatform.
  • New: Support watchOS (watchosArm32, watchosArm64, watchosX86) in multiplatform.
  • New: Support HashingSource, HashingSink, buffer hash functions, and UnsafeCursor on non-JVM
    platforms. Previously these were all JVM-only.
  • New: Implement Closeable on Sink and Source on non-JVM platforms. Okio now includes a
    multiplatform okio.Closeable interface and corresponding use {} extension. Closing resources
    when you're done with them shouldn't be JVM-only!
  • New: Sink.hashingSink and Source.hashingSource functions that accept
    java.security.MessageDigest and javax.crypto.Mac instances. Use these when your hash function
    isn't built-in.
  • Fix: Don't crash with a ShortBufferException in CipherSink and CipherSource on Android.
    (Android may throw a ShortBufferException even if the buffer is not too short. We now
    avoid this problem!)
  • Upgrade: [Kotlin 1.4.20][kotlin_1_4_20].

v2.9.0

2020-10-04

  • Fix: Don't corrupt the Buffer when writing a slice of a segmented ByteString. We had a severe
    bug where ByteString instances created with snapshot() and readByteString() incorrectly
    adjusted 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.
  • New: CipherSink and CipherSource. Use these with javax.crypto.Cipher to encrypt and decrypt
    streams of data. This is a low-level encryption API; most applications should use higher-level
    APIs like TLS when available.
  • New: Promote hash functions md5, sha1(), sha512(), and sha256() to common Kotlin. These
    are currently only available on ByteString, multiplatform support for HashingSource,
    HashingSink, and Buffer should come in a follow-up release. We wrote and optimized our own
    implementations of these hash functions in Kotlin. On JVM and Android platforms Okio still uses
    the platform's built-in hash functions.
  • New: Support OSGi metadata.
  • Upgrade: [Kotlin 1.4.10][kotlin_1_4_10].

v2.8.0

2020-08-17

  • New: Upgrade to Kotlin 1.4.0.

v2.7.0

2020-07-07

  • New: Pipe.cancel() causes in-progress and future reads and writes on the pipe to immediately
    fail 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 the
    change above we saw throughput increase 3x on a synthetic benchmark designed to create
    contention.

v2.6.0

2020-04-22

  • New: InflaterSource.readOrInflate() is like InflaterSource.read(), except it will return 0 if
    consuming deflated bytes from the underlying stream did not produce new inflated bytes.

v2.5.0

2020-03-20

  • New: Upgrade to Kotlin 1.3.70.

v2.4.3

2019-12-20

  • New: Upgrade to Kotlin 1.3.61.

v2.4.2

2019-12-11

  • Fix: Don't crash when an 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

  • Fix: Don't cache hash code and UTF-8 string in ByteString on Kotlin/Native which prevented freezing.

v2.4.0

2019-08-26

  • New: Upgrade to Kotlin 1.3.50.

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.

  • New: Upgrade to Kotlin 1.3.40.
  • Fix: Use Gradle api instead of implementation for the kotlin-stdlib dependency.
  • Fix: Don't block unless strictly necessary in BufferedSource.peek().

v2.2.2

2019-01-28

  • Fix: Make Pipe.fold() close the underlying sink when necessary.

v2.2.1

2019-01-17

  • Fix: Make 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 and
    sinks 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-readable Source with a passively-writable Sink.
    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 another BufferedSource that reads ahead on the current
    source. Use this to process the same data multiple times.

  • New: Deprecate BufferedSource.buffer(), replacing it with either BufferedSource.getBuffer()
    (in Java) or BufferedSource.buffer (in Kotlin). We have done likewise for BufferedSink.
    When we introduced the new extension method Source.buffer() in Okio 2.0 we inadvertently
    collided with an existing method. This fixes that.

  • New: Improve performance of Buffer.writeUtf8(). This comes alongside initial implementation of
    UTF-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 annotation
to 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.


  • If you want to rebase/retry this PR, check this box

This PR has been generated by Mend Renovate. View repository job log here.

@renovate renovate bot requested a review from a team as a code owner February 26, 2024 00:56
Copy link

codecov bot commented Feb 26, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 9.11%. Comparing base (0f2d2f7) to head (34ab3f8).

Additional details and impacted files
@@             Coverage Diff             @@
##               main    #590      +/-   ##
===========================================
- Coverage     10.62%   9.11%   -1.52%     
+ Complexity     1838    1417     -421     
===========================================
  Files          6101    6101              
  Lines         58367   58367              
  Branches        263     263              
===========================================
- Hits           6204    5319     -885     
- Misses        51998   52912     +914     
+ Partials        165     136      -29     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@renovate renovate bot force-pushed the renovate/com.squareup.okio-okio-3.x branch from b113139 to 34ab3f8 Compare March 13, 2024 04:51
@lojzatran lojzatran merged commit 8d5e810 into main Apr 1, 2024
7 of 8 checks passed
@lojzatran lojzatran deleted the renovate/com.squareup.okio-okio-3.x branch April 1, 2024 09:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant