Jmix 2.2 upgrade vs new project

This question is about a different dependency set for a Jmix 2.2.1 (Java Fullstack application):

When migrating a very basic application (just a after project generation) from 2.1.3 to 2.2.1 leads to a different dependency set than when creating it from the scratch.

  1. Question The migrated one gets two new - as documented :
  • io.jmix.pessimisticlock:jmix-pessimisticlock-starter
  • io.jmix.pessimisticlock:jmix-pessimisticlock-flowui-starter
    But a newly created does not.
  1. The migrated had before and kept the following, but the newly generated does not contain it:
  • io.jmix.flowui:jmix-flowui-kit

Is it save to remove the pessimistic lock modules on a migrated project, if they had not been explicitly used yet - and the migration routine just doesn’t know so it adds them in doubt?

Is the flowui-kit dependency optional?

The questions are based on using

IntelliJ IDEA 2023.3.5 (Ultimate Edition)
Build #IU-233.14808.21, built on March 12, 2024

Runtime version: 17.0.10+1-b1087.21 amd64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
Linux 6.6.13+bpo-amd64

io.jmix.studio (2.2.0-233)

Kotlin: 233.14808.21-IJ
Current Desktop: KDE

Hi Steffen!

Regarding the first question:

Indeed, these dependencies are added automatically during migration. This is intentional to ensure a seamless transition.
The fact is that in previous versions, the pessimistic locking functionality was available out of the box and was built into the core of the user interface. We decided to do some decomposition so that the UI module would only have components (no business logic). See: Extract pessimistic locking into add-on · Issue #1958 · jmix-framework/jmix · GitHub

To ensure that application work exactly the same after the update, these dependencies will be added. New project don’t have this out of the box because we decided to make this add-on optional. You can use it simply by installing a free add-on.

Regarding the seconds question

kit dependency was no longer needed due to the fact that we were refactoring the preview logic of the Jmix Studio. In fact, this dependency is loaded transitively through the flowui module.

Best regards,
Dmitriy

1 Like