-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Adapt addons to core watch service changes #14004
Conversation
@jpg0 @florian-h05 Can you have a look at the changes in JS Scripting? Unfortunately it's not so easy to test because it requires a full distribution build with the core changes. |
This pull request has been mentioned on openHAB Community. There might be relevant details there: https://community.openhab.org/t/openhab-4-0-snapshot-discussion/142322/22 |
Having a glance (at GitHub web) at JS Scripting, the changes look reasonable and good to me, but I will try to have a look at this in IntelliJ tomorrow. |
I see, cause of the change in the BOM's pom.xml. Are there any docs on how to do a full dist build? I've run into this before when I was trying to move the Jinja dependency for Home Assistant. I failed, and have never gotten back to it (and I've kept myself plenty busy with other things). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
JRuby portion looks fine to me, minus the minor typo. I'll try to figure out how to test it within the next few days.
...ng/src/main/java/org/openhab/automation/jrubyscripting/internal/watch/JRubyWatchService.java
Outdated
Show resolved
Hide resolved
@ccutrer I do a local openhab-core build, then an openhab-addons and openhab-webui build (only if changes may affect UI). The last step is an openhab-distro build which produces a .zip for the core installation and a .kar for add-ons. I have a modified update script which updates my the test installation on my dev machine from a file (instead of the remote repository). |
@J-N-K Any chance you can provide the core ZIP to us? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Apart from one bug, the JS Scripting code looks good to me, thanks!
I trust you that you tested it, I won't test myself unless someone provides me the distro build (or just the core ZIP).
Please have a look at my comments.
|
||
super.activate(); | ||
if (Files.isRegularFile(this.libraryPath)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if (Files.isRegularFile(this.libraryPath)) { | |
if (Files.isRegularFile(Path.of(this.LIB_PATH))) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Debatable if it is more clear if we use libraryPath
which is what is used by the WatchService
itself or Path.of(LIB_PATH)
. Technically it is the same. The constructor calls super(watchService, LIB_PATH)
and there libraryPath
is assigned to Path.of(LIB_PATH)
.
.../src/main/java/org/openhab/automation/jsscripting/internal/fs/watch/JSDependencyTracker.java
Show resolved
Hide resolved
.../src/main/java/org/openhab/automation/jsscripting/internal/fs/watch/JSScriptFileWatcher.java
Show resolved
Hide resolved
Hmm, a full core build is failing for me with
|
Can you try building with |
I had the same issue yesterday and fixed it by removing all cached Eclipse artifacts from my local Maven repo in |
Awesome that this has been refactored! When working on this to support more advanced watching for JSScripting, it was pretty obvious that the existing code was really struggling to incorporate the changes. As long as the tests are passing then I'm happy (as they were already pretty extensive as I remember). |
709a71c
to
70c8ae7
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you fix the merge conflicts and address the review comment @J-N-K?
Signed-off-by: Jan N. Klug <github@klug.nrw>
...src/main/java/org/openhab/automation/jrubyscripting/internal/watch/JRubyLibWatchService.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Jan N. Klug <github@klug.nrw>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Signed-off-by: Jan N. Klug <github@klug.nrw>
Signed-off-by: Jan N. Klug <github@klug.nrw>
Signed-off-by: Jan N. Klug <github@klug.nrw>
Signed-off-by: Jan N. Klug <github@klug.nrw>
Depends on openhab/openhab-core#3004