Skip to content
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

Documentation for JSR223 cache preset #1937

Merged
merged 8 commits into from
Dec 4, 2022
Merged

Conversation

J-N-K
Copy link
Member

@J-N-K J-N-K commented Dec 2, 2022

Related to openhab/openhab-core#2887

Signed-off-by: Jan N. Klug github@klug.nrw

Signed-off-by: Jan N. Klug <github@klug.nrw>
@netlify
Copy link

netlify bot commented Dec 2, 2022

Thanks for your pull request to the openHAB documentation! The result can be previewed at the URL below (this comment and the preview will be updated if you add more commits).

Name Link
🔨 Latest commit a304004
🔍 Latest deploy log https://app.netlify.com/sites/openhab-docs-preview/deploys/638b147fe9385400080b45e2
😎 Deploy Preview https://deploy-preview-1937--openhab-docs-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

J-N-K added 2 commits December 2, 2022 19:21
Signed-off-by: Jan N. Klug <github@klug.nrw>
Signed-off-by: Jan N. Klug <github@klug.nrw>
@rkoshak
Copy link
Contributor

rkoshak commented Dec 2, 2022

Does it make sense to include a Nashorn example? I think it'll be the same as Groovy/Jython.

scriptExtension.importPreset("cache")

I can see both ways since we really should encourage users to avoid Nashorn, but it's there now and we have the add-on on the marketplace to continue support when we move to Java 17.

@jimtng, jRuby's import should be similar too, right? I personally would really like to see jRuby represented also.

@J-N-K
Copy link
Member Author

J-N-K commented Dec 2, 2022

I can add it if someone confirms it's working. I don't have a JDK 11 installed, so can't test Nashorn.

@rkoshak
Copy link
Contributor

rkoshak commented Dec 2, 2022

I can add it if someone confirms it's working. I don't have a JDK 11 installed, so can't test Nashorn.

Actually, I wonder if it's a better test if it's tested with the Nashorn add-on on the marketplace.

I need to update my OH before I can test it and I'm just about out of time for the day. If I don't see anything I can try the test tomorrow.

J-N-K added 2 commits December 2, 2022 20:25
Signed-off-by: Jan N. Klug <github@klug.nrw>
Signed-off-by: Jan N. Klug <github@klug.nrw>
Copy link
Contributor

@Confectrician Confectrician left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just one small remark.

From the discussion it would be best to wait until you have clarified the example?

Signed-off-by: Jan N. Klug <github@klug.nrw>
@J-N-K
Copy link
Member Author

J-N-K commented Dec 2, 2022

The Nashorn example is already there. We can wait for the ruby example.

@wborn
Copy link
Member

wborn commented Dec 2, 2022

We can wait for the ruby example.

Maybe @ccutrer can provide it after finishing ccutrer/openhab-jrubyscripting#83

@ccutrer
Copy link
Contributor

ccutrer commented Dec 2, 2022

Yeah, don't wait in Ruby to get this merged. I'll make sure we get a Ruby example in in another PR.

@Confectrician Confectrician added this to the 3.4 milestone Dec 2, 2022
@florian-h05
Copy link
Contributor

Do we also want to provide a JS Scripting (GraalJS) example?

If yes, in which way? As this is one the JSR223 page, it would make sense to document the raw access without using the helper libray. If we want to document it using the helper library, this addition is something for a follow up PR, as I currently don't have the new cache implemented in the library.

Co-authored-by: Wouter Born <github@maindrain.net>
@J-N-K
Copy link
Member Author

J-N-K commented Dec 2, 2022

@florian-h05 I don‘t think that is necessary since the helper libraries are always installed, correct?

@florian-h05
Copy link
Contributor

The helper libraries are always installed.

I'm not sure what you refer to with

I don‘t think that is necessary

@J-N-K
Copy link
Member Author

J-N-K commented Dec 2, 2022

An example without the helper libraries. There is already an example for JS Scripting. I can add „GraalJS“ to the tab-title if you want.

@florian-h05
Copy link
Contributor

There is already an example for JS Scripting.

I've just checked it, looks fine 👍

I can add „GraalJS“ to the tab-title if you want.

Not needed.

Signed-off-by: Jan N. Klug <github@klug.nrw>
Copy link
Contributor

@Confectrician Confectrician left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nothing left from my side and alle examplers are available.

Anything left to wait for from your side?
If not please give a short ping and i will merge.

@J-N-K
Copy link
Member Author

J-N-K commented Dec 3, 2022

IMO you can merge.

@Confectrician Confectrician merged commit deeac8b into openhab:main Dec 4, 2022
@J-N-K J-N-K deleted the cache branch December 12, 2022 17:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants