Next Major release? #1500
Replies: 33 comments
-
I don't have an opinion one way or the other. These changes all sound like good ideas. But from an end user's perspective, they are somewhat underwhelming when compared to the changes between OH 1 and OH 2 and then from OH 2 to OH 3. I don't know that that's a criteria worth considering but it will be something that will be noted by the end users. One impact that would need to be addressed is that Nashorn will go away as a default. That means breaking changes to existing JavaScript transformations and a good deal of work will need to be done to migrate Blockly to "compile" to some other language. I'd assume that other language would be JS Scripting since it would be the least amount of work to migrate to that. However, that means that Blockly, which comes by default, has a dependency on an optional add-on. So JS Scripting will need to come by default too (if that's chosen as the new underlying language) or Blockly will need to be disabled until JS Scripting is installed. |
Beta Was this translation helpful? Give feedback.
-
I’m not sure either, that’s why I put it before the AC. And yes, the user-facing changes are not that big. I agree that prior to a switch to Java 17 the Blockly issue has to be resolved. We could either add the Nashorn add-on to core (similar to the DSL scripting engine), suggest the installation during setup, disable Blockly if it is not available (that‘s a bad decision in my opinion for upgrades) or figure out if we can install it during the upgrade process. I personally would vote for removing the DSL scripting engine from core and adding it to addons, too. That would keep core totally agnostic of the scripting engine. A point for next major version when increasing the minimum Java version is: OH2 is Java 8, OH3 is Java 11 and OH4 is Java 17. That’s super-easy to understand. Combined with the incompatibility of the add-ons this makes sense for me. |
Beta Was this translation helpful? Give feedback.
-
There is still more to fix for full Java 17 compatibility according to the Xtext Masterplan. So it would be nice to know how well Xtext works when Java 17 is used compile time. I think it is best to only update OH to a new major version if there are big user facing (breaking) changes. In the past we've also never guaranteed add-ons to work between any OH release. When we upgrade certain dependencies like UoM or switch to OSGi R8 (with Karaf 4.4.x) it will also break add-on compatibility again without noticable user changes. Users will most likely also hesitate to immediately upgrade to a new major version (for good reasons). So there should be a big reward waiting for them if they finally decide to upgrade to a new major version. 🙂 |
Beta Was this translation helpful? Give feedback.
-
Xtext is another issue. After reading quite some issues in their repository and the website (releases only if paid or needed by itemis' customers) , I'm not too sure we'll ever see Java 17 source compatibility with Xtext. There is a scheduled release 2.28 for beginning of December which has Java 17 support on the list, but that is also true for 2.27. There are also discussions about dropping LSP support to keep Java 8 compatibility: eclipse-xtext/xtext#1972. If that happens I would vote for a rewrite of the parsing code for textual configuration and drop Xtext completely (there is the issue that DSL rules depend on it). For my test-branch I have raised source level to 17 and lowered it to 11 for the model bundles. That at least compiles fine and should not impose any problems as long as we keep the new features out of the API and use it only in the implementation. My suggestion was not for the next release (which is probably 3.4), I was thinking about the long-term. But I'm fine with staying on 3.x, too. |
Beta Was this translation helpful? Give feedback.
-
I've been worried about Xtext for some time. It would indeed be a huge breaking change if we lost Rules DSL, up there with the removal of the 1.x Compatibility Layer. That certainly would be a big user facing change, but not really a good one, especially for long time users. Losing the LSP would be a big hit for lots of users too who rely on VSCode and the plugin. I like the idea of moving Rules DSL to it's own add-on for lots of reasons. But I think we need something to be the default. Blockly with what ever underlies Blockly (Nashorn or whatever Blockly is upgraded to support) would be my vote. Right now that would be @wborn's add-on on the marketplace I think. Though I'd really like to see Blockly eventually move to one of the more modern languages, even if it's not JS Scripting. I think it's clear that there will need to be a next version of OH at some point. The changes suggested above make sense to be part of it. So I guess it's a matter of when we start working towards that release? |
Beta Was this translation helpful? Give feedback.
-
I think carving out the Rules DSL into its own add-on and eventually making it opt-in (as a "legacy" option, if it remains compatible at all with mandated the JRE version) rather than bundled-in makes a lot of sense. Since we couldn't possibly ship distributions with no scripting support, installing GraalVM by default in new installations as the default script engine (via inclusion in the standard package), the same way rrd4j is automatically installed as the default persistence service, seems a good option. It clearly has the most momentum (with modern, maintained versions of both the language - ECMAScript - as well as the runtime - GraalVM - and the openhab-js library) compared to the other candidates (reaslistically those are Groovy and JRuby, I'm excluding Jython on purpose). Additionally novice-friendly Blockly can be made to work with it, IMHO important for new installations. |
Beta Was this translation helpful? Give feedback.
-
I would love to see Java 17 features available in addons (pattern matching switch statements look especially cool), but I'm not in the core enough to have an educated opinion on what the consequences might be, so i'll leave that to others. I think making the DSL optional (even if its installed by default) sounds like a good plan for eventual phasing out. I also agree that JSScripting is the best option for a default scripting option, and is why I was so eager to see that included in our last major release (along with openhab-js). |
Beta Was this translation helpful? Give feedback.
-
Sorry for not commenting earlier, I lay in bed with feaver the last two days. :-( I think most things have been said and I agree with them. With Java 17, the situation is of course different as users would need to update their installed JVM, so here it makes sense to only do this step with a next major version. But this alone would imho not justify a new major version. As @wborn points out, we should make sure that a new major version does not only come with efforts and removed features for users, but really bring some cool new stuff that makes the version stick out as something new towards the user - and I am not yet sure what that could be, so I'm still reluctant to head for a new major version. While I know that new language features are always desirable for developers, we were usually quite conservative with increasing the JVM minimal version. We did the move from 8 to 11 only after there were no security updates for Java 8 anymore and the switch was therefore unavoidable. Looking at the EOL dates of Java 11, this is still under full active support until Sept. 23 and with security patches until Sept. 26. My feeling would be that if we aim for an openHAB 4.0 by end of 2023, we are still on the safe side. Wrt moving towards GraalVM, I agree that this makes sense on the long run as this is where the activity of the Java community is focussing on. |
Beta Was this translation helpful? Give feedback.
-
What is the reason to stay on outdated (even if still supported) Java versions?
The only reason would be that there are consumers of our code that want to stay on 11. But I know of no such distribution. |
Beta Was this translation helpful? Give feedback.
-
I'd say the reasons are more practical than ideological - probably everyone would welcome a switch to Java 17 if it weren't for Nashorn (there's a replacement for scripting in rules but not for JS transformations yet) and Xtext. |
Beta Was this translation helpful? Give feedback.
-
There is a replacement for the transformation (openhab/openhab-core#2883, which needs only a little fine-tuning openhab/openhab-core#2990) and a replacement for the profile is currently in review (openhab/openhab-core#2872). Both work together with every available scripting language, be it Nashorn, DSL or Jython. The issues with the profile PR are mostly related to the UI representation, your input would be very welcome, @ghys. Xtext is a minor issue at the moment, because we can build the model-bundles with source-level 11 (openhab/openhab-core#2994). This only prevents using Java 17 features (like records) in exported API, but we could still benefit in all implementation classes. |
Beta Was this translation helpful? Give feedback.
-
Indeed - I'm just now seeing this discussion. I guess I'll have to adapt my workflow. I'll gather some thoughts and reply there. |
Beta Was this translation helpful? Give feedback.
-
I'd say the biggest reason is it will cause a good deal of extra work for a number (not all) end users.
I think the Nashorn going away issue is solvable with those PRs and including the Nashorn add-on by default so it really boils down to losing Synology support and making this upgrade more involved than is usual. |
Beta Was this translation helpful? Give feedback.
-
For apt it's just There is a very fine documentation for managing multiple java versions on Win/Mac/Linux: https://docs.azul.com/core/zulu-openjdk/manage-multiple-zulu-versions/linux |
Beta Was this translation helpful? Give feedback.
-
I did check that the latest Java on QNAP seems to be 8, so they already need to use tricks for running OH3 anyway. So the only issue left are users with Synology that do not use Docker (there are instructions on the net - at least in German - for installing Java 17, and it's only five commands or so). IMO the benefits of Java 17 for the development process outweigh the hassle for those users. It seems that @kaikreuzer and @rkoshak would vote against, @ghys abstains (or has at least not expressed an opinion) and @wborn and @digitaldan are in favor of changing Java version after the release. What does this mean now? |
Beta Was this translation helpful? Give feedback.
-
Another option could be to use Java 17 for all source code but compile to Java 11 for compatibility. Then you change the compiler source/target in the POM to something like:
Note that Java 17 will also solve issues our users run into today, like:
If it is Linux based, the Zulu 17 JDK can be used on any system that has glibc 2.5 (or newer). glibc 2.5 has been available since 2006. |
Beta Was this translation helpful? Give feedback.
-
If it is an option to compile to Java11 without loosing the language features, this would indeed be the best compromise. It brings developers the language features, while not forcing the users to upgrade without seeing any direct benefit. In general I share @rkoshak's opinion: I don't want to hinder any development progress, but am also concerned about imposing work to our userbase without offering any obvious benefits. We should not forget that there are many not that tech-savvy users out there, who simply will shy away from an update and stay with an outdated openHAB version for a long time or maybe moving away from it completely. |
Beta Was this translation helpful? Give feedback.
-
Unfortunately that will not work. I checked that it'll not work to use
But I still think that the burden on the user is next to nothing:
That users will refrain from making an upgrade if the minimum Java version is increased is IMO not an argument. We have users running 3.0 not upgrading to 3.1 even though the Java version stayed the same (or they still run completely outdated 2.4 instead of 2.5, even if both require Java 8). Reasons for not upgrading are more that user fear the breaking changes we have in every release (prominent example for 3.3 will be netatmo, which requires a full re-configuration). Not bumping Java will only shift the problem to the future: If users don't upgrade because of a different Java version, they'll not upgrade for the same reason a year in the future. On the other hand the upgrade allows to use language features that'll lead to cleaner code (and by that reduce bugs, which also affects the user) and reduce code complexity (which will allow us to deploy new features with less work for the developer, so more work can be done in the same time). |
Beta Was this translation helpful? Give feedback.
-
Well, the burden on the end users of Bintray going away was next to nothing too. Yet we still have a steady stream of users coming to the forum running ancient versions of OH complaining they can't download add-ons any more. I think it's far to easy to underestimate the disruption caused by even minimal extra work like this. It's going to be people like me and rossko57 and and other helpers on the forum who will face the largest burden of them all. Ultimately, the issue isn't that it's hard to do the upgrade. The issue is far too many users won't even know they need to do so. It fails the "idiot in a hurry" test. We have lots of those among our OH user base. These users are used to being on the release repo and blindly running That's my concern. It's the surprise more than the actual amount of work and no user facing improvements to justify the surprise. |
Beta Was this translation helpful? Give feedback.
-
Can't fix stupid. But:
This is the breaking changes list for 3.3.0. I marked some changes with a * that'll break the installation for users who just do |
Beta Was this translation helpful? Give feedback.
-
I like the clarity of tying Java versions to major releases. To give a purely chronological perspective, the table below tries to summarize when these major releases happened along with that of the supported Java version:
*EoL denotes end of active/"Premier" support, according to: I would argue it's important to release a major version before the currently supported Java version reaches EoL (with some leeway, at least a few months), while also not jumping on a new version and let it mature first - for 2.0 & 3.0 the supported Java version had already been released for 2/3 years. Edit: also note that 4.0.0-SNAPSHOT and milestone versions would already target Java 17 so there would be at least 6 months of Java 17 support before GA. |
Beta Was this translation helpful? Give feedback.
-
Ok, please let me too put my two cents into this. It sounded to me like the OP had a working solution ind we could try to implement this. |
Beta Was this translation helpful? Give feedback.
-
Sorry - I missed this then. I thought that the discussion was to change in OH3, but if I've misread this then that's fine with me and I think is a good approach 👍 . |
Beta Was this translation helpful? Give feedback.
-
Those are all breaking changes in add-ons. Traditionally breaking changes in add-ons are treated as much less of a problem than breaking changes in core. As such, the reaction to them by the end users is much less subdued. Also, changes to any one binding is only going to affect a minority of users, further reducing the size of the angry mob. But it's kind of pointless to argue it further. To summarize my thoughts, releasing an OH 4 where the only significant change is a move to Java 17 with no significant user facing improvements and/or features will have poor adoption rates and anger a number of users. People don't like to have work forced on them just to stay where they already are. But I won't stand in the way of that happening.
That seems a reasonable timeframe. That basically gives a year to make the switch and get some new features included to make the switch a little more palatable.
That would be a big addition. Some other things I've seen talked about that could help pay for the disruption:
Most if not all of these already have issues (sometimes more than one) that have been open for quite some time and are kind of stuck. I'm not saying it has to be all or even any of these, but these are the sorts of fixes and features that will make it easier to sell an OH 4, ways to pay for the surprise. If we can move two or three of these (or things like these) over the finish line as part of an OH 4 it will be a lot easier to say upgrading to OH 4 is worth it and the upgrade pays for the surprise. NOTE: I bet there are a ton of features and irksome things could be addressed for the add-on developers too. I get the feeling that some of them are feeling left out since most of the focus for awhile has been on end user facing stuff and not add-on API facing stuff. Moving to a new OH version is an opportunity to be bold and audacious. Just moving Java versions feels like a big missed opportunity. An opportunity that won't come again for years (given past release schedules). But again, if that's all we want to do, I won't stand in the way by voting no. |
Beta Was this translation helpful? Give feedback.
-
As much as i think Java 17 would be great to have, i am very ok waiting for 4.0 to have it. I agree the benefits are not so great as to offset the disruption to users this may cause (although i get a chuckle when asked if i can port a binding feature back to 2.x) . So my vote is to stay on 11 for now and plan for a major version change in 4.0 (which is not that far away). |
Beta Was this translation helpful? Give feedback.
-
I just learnt about another incompatibility wrt Java 17: I tried to update my production system to a 4.0.0-SNAPSHOT when I noticed that JDK 17 isn't available on macOS < 10.12 anymore - my Mac mini only runs macOS 10.11 and cannot be upgraded. 😢 |
Beta Was this translation helpful? Give feedback.
-
How about putting Debian on that ? |
Beta Was this translation helpful? Give feedback.
-
Well, I am running more things on it and am also using the MacTTS service. So I have chosen the quicker (while more expensive) road: I've ordered a more recent Mac mini... |
Beta Was this translation helpful? Give feedback.
-
Good to know. I was about to order an used MacMini to migrate from my old PC Engines APU. |
Beta Was this translation helpful? Give feedback.
-
FTR: I've chosen a late 2014 model which arrived today. I am running Monterey (macOS 12.6.2) on it and I am back in the game again with Java17 and openHAB 4.0.0-SNAPSHOT. 😄 |
Beta Was this translation helpful? Give feedback.
-
I would like the AC (as stated on the Governance Page) to discuss a new major release.
This should include the following breaking changes that affect the whole openHAB system:
Stream
interface orinstanceof
pattern matching. This is breaking only for running newer add-ons on older core-versions.@Deprecated
annotations over time and a new major version would be a good time to remove them.MqttBrokerConnection
or theAbstractWatchService/WatchQueueReader
mix API and implementation (and should IMO be services anyway), making it very difficult to improve implementation details without breaking compatibility.Beta Was this translation helpful? Give feedback.
All reactions