https://kotlinlang.org logo
Join Slack
Powered by
# opensavvy
  • b

    Benoît Liessens

    01/03/2025, 9:12 AM
    Morning everyone, I spotted this repo recently https://gitlab.com/opensavvy/automation/gitlab-ci.kt which looks promessing 👍 . What isn’t clear though is how you get GitLab CI to execute the
    gitlab-ci.main.kts
    file? Thanks
    c
    • 2
    • 5
  • c

    CLOVIS

    01/14/2025, 8:00 AM
    KtMongo 0.6.0 is out! This release is fairly small, it is about handling of maps. In particular,
    Map<String, V>
    , which is often serialized as an object. Added:
    Copy code
    class User(
        val name: String,
        val grades: Map<String, Int>,
    )
    
    collection.find {
        User::grades["physics"] eq 5
    }
    as well as: •
    isMapEmpty
    •
    isMapNotEmpty
    Read more about these operators in the documentation • Full changelog
  • c

    CLOVIS

    01/14/2025, 5:20 PM
    How to use Kotlin/JS nested suites using Prepared? Original question: https://kotlinlang.slack.com/archives/CT0G9SD7Z/p1736762977403649?thread_ts=1736762977.403649&amp;cid=CT0G9SD7Z
    v
    • 2
    • 19
  • c

    CLOVIS

    01/16/2025, 8:00 AM
    I've worked a bit on documentation this past weekend. The next step is making sure the library is on MavenCentral, and after re-verifying all usage examples to ensure they are up-to-date and work. https://opensavvy.gitlab.io/automation/gitlab-ci.kt/docs (cc @Benoît Liessens @Piotr Krzemiński, you mentioned being interested in the project)
    🙌 2
    • 1
    • 1
  • c

    CLOVIS

    01/17/2025, 9:07 PM
    Prepared 2.0.0-alpha.2 is out! This release contains a breaking change! The second parameter to the
    test()
    function, which was used to inject a coroutine context was removed, so you will need to replace:
    Copy code
    test("Foo", yourCoroutineContext) {
        // your test
    }
    by:
    Copy code
    test("Foo", Context(yourCoroutineContext)) {
        // your test
    }
    This makes the library simpler, as there is a single concept to configure tests,
    TestConfig
    , which users can extend themselves. Full changelog • Website
    d
    • 2
    • 10
  • c

    CLOVIS

    01/17/2025, 9:08 PM
    Also, I'm nearing the end of things I wanted to break for Prepared 2.0.0, so if you have some feedback now is the time!
  • c

    CLOVIS

    01/19/2025, 5:55 PM
    For those who like MongoDB… I've done a thing 👀
    Copy code
    users.find {
        expr {
            of(Song::creationDate) gt of(Song::editionDate)
        }
    }
    Copy code
    {
      "$expr": {
        "$gt": [
          "$creationDate",
          "$editionDate"
        ]
      }
    }
  • c

    CLOVIS

    02/07/2025, 8:00 AM
    KtMongo 0.9.0 with the
    $cond
    aggregation operator
    Copy code
    users.aggregate()
        .set {
            Song::releaseDate set cond(
                condition = of(Song::isReleased),
                ifTrue = of(2025),
                ifFalse = of(null)
            )
        }
    https://opensavvy.gitlab.io/ktmongo/docs/
  • c

    CLOVIS

    02/08/2025, 1:25 PM
    The GitLab CI DSL will be promoted to Beta soon. If you want to test things out until then, please take a look now blob smile https://gitlab.com/opensavvy/automation/gitlab-ci.kt/-/releases/0.4.0-rc.1
  • c

    CLOVIS

    02/17/2025, 8:00 AM
    KtMongo 0.10.0 is out with a few new aggregation operators: •
    $abs
    , the absolute value •
    $add
    , the sum of two values •
    $cos
    ,
    $sin
    ,
    $tan
    and their variants (see changelog for exhaustive list) https://opensavvy.gitlab.io/ktmongo/docs/news/2025/02/16/v0.10.0.html
  • d

    dave08

    02/17/2025, 2:48 PM
    @CLOVIS Is there such a thing as a prepared val that can take parameters when called? Also is there any way to disable a whole PreparedSpec (it's a bit heavy to run every time...)
    c
    • 2
    • 8
  • c

    CLOVIS

    03/24/2025, 8:00 AM
    Prepared 2.0.0 RC1 is out! The main change here is the support for Java 11 (only supported Java 21 previously), implemented by @dave08! Please try this release and check if there are any issues. If no problems are detected, this version will become 2.0.0, probably next week. Documentation
    👍🏼 1
  • c

    CLOVIS

    04/03/2025, 7:00 AM
    Prepared 2.0.0 is out! No changes since the latest release candidate. See the full changelog to know everything that happened since the last stable version..
    🎉 2
    d
    • 2
    • 2
  • c

    CLOVIS

    05/08/2025, 7:00 AM
    Prepared 2.0.1 is out, with a bump of Kotlin and the added mention of the #C887ZKGCQ assertion library with an example usage in the documentation. Changelog
  • a

    altavir

    05/12/2025, 8:19 AM
    @CLOVIS I filed an issue in `opensavvy.resources`: https://gitlab.com/opensavvy/automation/kotlin-js-resources/-/issues/14 It seems it does not work properly with projects that have native targets. I apply the plugin via my plugin, but it probably should not matter.
    👀 1
    c
    • 2
    • 8
  • c

    CLOVIS

    05/13/2025, 7:00 AM
    Dokka for MkDocs 0.5.2 is out! This release marks the removal of the Dokkatoo plugin, since everything has been added to Dokka v2. Additionally, the plugin will now delete all generated files when
    :clean
    is called. Changelog
    🎉 3
  • c

    CLOVIS

    05/18/2025, 7:20 PM
    Hey! Who's coming to KotlinConf? I'll be in Copenhagen starting tomorrow night. Ping me if you'd like to share a drink somewhere ahead of the conference!
  • c

    CLOVIS

    05/22/2025, 9:54 AM
    Join me at the Kotlin Foundation booth at 13:30 for a demo of KtMongo!
    K 1
  • c

    CLOVIS

    06/02/2025, 8:44 AM
    Prepared 2.0.5 is out! Prepared now supports TestBalloon, allowing tests to be declared with even simpler syntax:
    Copy code
    val FooTest by preparedSuite {
        test("Test 1") {
            check("Hello world" == "Hello world")
        }
    
        suite("A group of tests") {
            test("Test 2") { /* … */ }
            test("Test 3") { /* … */ }
        }
    }
    The TestBalloon team is planning on creating an IntelliJ plugin that will also work with Prepared. In this release, we also add experimental support for
    kotlin.time
    :
    Copy code
    test("Set the initial time of a test") {
        time.set("2024-12-31T05:00:00Z")
    
        delay(4.hours)
        println(time.now)    // 2024-12-31T09:00:00Z
    }
    As always, more info is available in the news: https://opensavvy.gitlab.io/groundwork/prepared/docs/news
  • c

    CLOVIS

    06/09/2025, 7:00 AM
    Spine 0.8.0 is out! • Ktor 3 support • Arrow 2 support • Added
    equals
    /`hashCode` /`toString` to`Parameters` for easier debugging • And more dependency upgrades Full changelog
    👏 1
    👏🏾 1
  • c

    CLOVIS

    06/27/2025, 8:56 AM
    This September I will be talking in Belgium about what goes into creating complex DSLs! There are some tickets left 👀 https://ktconf.be/speakers/ivan-canet/
    👏 5
  • s

    Shubham Singh

    07/03/2025, 4:09 PM
    Hey @CLOVIS, I've raised a new issue here: https://gitlab.com/opensavvy/automation/kotlin-vite/-/issues/56 Could you please have a look whenever you get a chance?
    c
    • 2
    • 3
  • c

    CLOVIS

    07/10/2025, 5:32 PM
    I'm currently in the process of migrating to the new MavenCentral process, so there may not be any new versions for a few days/weeks
    🍀 1
  • c

    CLOVIS

    07/13/2025, 2:59 PM
    KJS Resources 0.5.0 is out! KJS Resources is a Gradle plugin to embed your
    src/jsMain/resources
    files into your library, so your users can access them within their project. This version contains: • Support for Kotlin 2.2.0 • A bug fix for Native targets (thanks @altavir for the report!) Full changelog
    👍 1
  • c

    CLOVIS

    07/25/2025, 8:14 PM
    Vite for Kotlin 0.5.3 is out! This version contains: • Support for Kotlin 2.2.0 • Support for Gradle 8.14 • Deployment based on NMCP Full changelog
    🎉 1
  • c

    CLOVIS

    07/25/2025, 8:16 PM
    There will probably be a 0.5.4 very soon with a dependency upgrades to fix a bug in
    @originjs/vite-plugin-commonjs
    as soon as they release a new version. See #57 for tracking.
  • c

    CLOVIS

    07/28/2025, 3:24 PM
    I've finished migrating KtMongo from Kotest to TestBalloon. Some numbers that may be of interest; Protocol:
    ./gradlew clean; ./gradlew check; ./gradlew check --no-configuration-cache --rerun-tasks
    •
    clean
    to ensure there aren't files left over •
    check
    to ensure everything needed is available locally (all dependencies are downloaded, etc) •
    --no-configuration-cache
    to ensure a fair execution order and disable intra-project parallelism •
    --rerun-tasks
    to disable incremental compilation, the build cache, up-to-date checks, etc • Only the last invokation is timed, using Gradle's build timer So: the test measures how long tests execute, but also how long it takes to compile, etc. The repository compiles to nearly all Kotlin targets using cross-compilation, so compilation time is quite a lot. Kotest: 2c899266a67a1c605e97d615afa353246859e261 • 2min 2s TestBalloon: 3dc162f411167345de9f38bd3c4cbb46569afa54 • 1min 2s That's a pretty big difference if you ask me!
    o
    • 2
    • 2
  • c

    CLOVIS

    07/30/2025, 7:00 AM
    KtMongo 0.19.0 is out! • Added multiplatform
    ObjectId
    and
    Timestamp
    • `BsonType.Datetime`is automatically interpreted as
    kotlin.time.Instant
    • Added the aggregation operators
    $switch
    ,
    $type
    ,
    $isNumber
    ,… • Added the filter operators
    $bitsAllClear
    ,… • Added the options
    writeConcern
    and
    readPreference
    • Added a new documentation section on aggregation support Full changelog
  • c

    CLOVIS

    07/31/2025, 7:00 AM
    Prepared 2.1.0 is out! • Improved logging in failed tests with finalizers • Added
    String.matches(String)
    to simplify Regex-based assertions • Added
    checkThrows
    for easy exception-based tests • Deprecated the KotlinX.Datetime compatibility module (all related functionality has been merged into the main module using
    kotlin.time
    ) • Stabilized the resource management APIs • Kotest 6.0.0.M4 and TestBalloon 0.4.0 support Full changelog
    👍🏼 1
  • a

    Albertas

    08/01/2025, 8:50 AM
    Hi! I've been working on a project similar to KtMongo for a while and I no longer have the time to maintain it by myself, so I'm looking into migrating to yours. A few questions, however: • does KtMongo automatically use SerialNames for filters/aggregations/etc? Having to name a property
    _id
    feels incorrect to me, so I prefer annotating it with
    @SerialName("_id")
    instead, along with other properties. • is the
    Parent::child / Child::property
    syntax the only way to refer to nested properties? Using the division operator feels very hacky, how difficult would it be to implement nesting like
    Parent::child { Child::property eq ??? }
    c
    • 2
    • 5