question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Kluent 2.0 Roadmap

See original GitHub issue

I’d like to open a discussion about what we should do and drop with the next major version of Kluent. @javatarz did a lot of work to make Kluent independent of JUnit (and specific test runners in general), thanks for that!

During those PRs (#71 #72) we started a discussion about what we could do and what we could drop with the next major version. I would love to have a lot of feedback and opinions here 😃 We should atleast give @Egorand , @eburke56 , @javatarz, @guenhter and @goreRatzete a chance to state their opinions here 👍

Dropping support

Mocking

#73 Is already a proposal to drop the mocking features in Kluent. I do agree with @Egorand points and I think it fits into the “no opinion” discussion. If we don’t want to force an opinion on a test runner, we also shouldn’t do that on mocking. In the beginning of Kluent I started the mocking support with plain java Mockito which didn’t work out really well. Later we transitioned to mockito-kotlin and kept our API backwards compatible, but it still doesn’t feel great. Kluent doesn’t support all kinds of features that a mocking framework is bringing in and it also led to a lot of confusion (#62).

I can see multiple ways of doing this. We could either deprecate mocking in the next 1.x version and drop it completely in 2.x, don’t deprecate it (as in keep as it is) in 1.x and drop it in 2.x or also maintain it in 2.x.

Platform independence

Since Kotlin already supports other targets than the JVM (e.g. JavaScript) and more platforms are being worked on (Kotlin native) we could try to take this next major step to also be platform independent.

What that means is that we get rid of all external dependencies (e.g. JUnit) and only use builtin Kotlin functionality. @javatarz already experimented this within #72 and could give some insights on this. What we do need if we go into this direction is having tests builtin for each platform, to make sure we don’t break anything.

Even if we can get rid of our Java dependencies, we still have dependencies on the Java library, because we do have assertions for java.time.* and java.io.File. I’m not sure if we can be completely platform independent (as in Kotlin platforms) with just maintaining one project. Having only one core artifact for the Kotlin stdlib and then platform specific assertions (dependent on the core artifact) for Java specific stuff, Android specific stuff and so on, aggregated into one Github organization, might be better in the future.

Android

I also see Android as a kind of another platform, because we are locked in Java 1.6 there. @eburke56 has already contributed logic into our buildsystem so that we can have a specific artifact for Android (e.g. no backtick names). I would definitely want to support Android further.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:2
  • Comments:33 (26 by maintainers)

github_iconTop GitHub Comments

4reactions
javatarzcommented, Nov 1, 2017

If we want Kluent to be truly platform independent, can we split out the JVM specific dependencies into a new library called kluent-jvm (and possibily kluent-jvm-android)?

What you end up with is

  1. kluent (v2)
  • Contains pure kotlin assertions
  • Useful for Kotlin on JVM, JS and Native
  1. kluent-jvm
  • Contains kluent
  • Adds JVM specific assertions (such as java.time.* and java.io.File)
  • Adds Android specific support (by removing backtick notations and ensuring JVM 1.6 compatibility)

We could go ahead and make the changes that you’re outlining in kluent v2 and later start a JVM specific project. It’s important to note that until we create kluent-jvm, in most cases existing projects would find it really hard to move to the latest version.

PS: If you’re looking for contributors/maintainers for future work, I’d be happy to help 😃

2reactions
Egorandcommented, Nov 2, 2017

A few points I wanted to add:

  • To avoid confining the JVM flavor of the library to Java 6, we can split out kluent-jvm and kluent-android, the latter targeting Java 6, and the former targeting Java 8 (or Java 9)
  • Kotlin 1.2 comes with the support for multiplatform projects, I think that would be a good, future-proof solution for Kluent. Since Kotlin 1.2 is currently in beta, if we decide to go this way, we’d also need to keep Kluent 2 in beta until Kotlin 1.2 is out
Read more comments on GitHub >

github_iconTop Results From Across the Web

Kotlin roadmap
The goal of this roadmap is to give you a big picture. Here's a list of our key projects – the most important...
Read more >
Github Trending - Kotlin is Awesome!
The 2022 Android Developer Roadmap suggests learning paths to understanding Android development. 3986 Star ethereum-lists/​chains. Last update: Dec 15, 2022.
Read more >
third party component notices - Starry Internet
For components licensed pursuant to the Apache License Version 2.0 or the ... of Health through the NIH Roadmap for Medical Research, Grant...
Read more >
Kluent | Fluent Assertion-Library for Kotlin - GitHub Pages
Kluent. Kluent is a “Fluent Assertions” library written specifically for Kotlin. It uses the Infix-Notations and Extension Functions of Kotlin to provide a ......
Read more >
Kotlin - Awesome List
MarkusAmshove/Kluent - Fluent Assertion-Library for Kotlin. winterbe/expekt - BDD assertion library for ... qwertukg/SeleniumBuilder - DSL for Selenium 2.0.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found