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

[jsscripting] Upgrade openhab-js & Remove SharedCache #13908

Merged
merged 4 commits into from
Dec 11, 2022

Conversation

florian-h05
Copy link
Contributor

This PR upgrades the included openhab-js version to 3.1.0, which uses the new caches from core instead of the addon provided one and brings many doc improvements.

The SharedCache is therefore removed as it is superseded by the caches added to core in openhab/openhab-core#2887.

@jlaur Ping.
@wborn FYI: We can now remove the SharedCache.

Upgrades the included openhab-js version to 3.1.0, which uses the new
caches from core (introduced in
openhab/openhab-core#2887) and provides many
doc improvements.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
Removes the SharedCache from the addon because this functionality is
now provided by core (see
openhab/openhab-core#2887).

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
@florian-h05 florian-h05 added the enhancement An enhancement or new feature for an existing add-on label Dec 11, 2022
@florian-h05 florian-h05 requested a review from jlaur December 11, 2022 00:49
Copy link
Member

@wborn wborn left a comment

Choose a reason for hiding this comment

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

It seems to break the build:

Error: Failed to execute goal com.github.eirslett:frontend-maven-plugin:1.12.1:npx (npx webpack) on project org.openhab.automation.jsscripting: Failed to run task: 'npx webpack -c ./node_modules/openhab/webpack.config.js --entry ./node_modules/openhab/ -o ./dist' failed. org.apache.commons.exec.ExecuteException: Process exited with an error: 2 (Exit value: 2) -> [Help 1]

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
@florian-h05
Copy link
Contributor Author

I see the problem, I'll fix it later.

The addon build failed due to webpack exiting with 1 because of a missing webpack configuration for „@runtime/cache“.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
@florian-h05
Copy link
Contributor Author

@wborn The build is now working.
The problem was, that due to a change in the library we were requiring an import from openHAB that our bundler webpack was not aware of. I‘ve added the missing webpack configuration and now it works fine.

I‘ve also had a look at the classed in the org.openhab.automation.jsscripting.internal.scope package and I will probably open a PR with some cleanups and refactorings, since parts of the functionality of that package is actually also provided by core.

@florian-h05 florian-h05 requested a review from wborn December 11, 2022 14:11
Copy link
Member

@wborn wborn left a comment

Choose a reason for hiding this comment

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

Thanks! 👍 It's nice to also have this available in M6 as well.

@wborn wborn merged commit 438552d into openhab:main Dec 11, 2022
@wborn wborn added this to the 3.4 milestone Dec 11, 2022
@florian-h05 florian-h05 deleted the jsscripting-upgrade-ohjs-remove-cache branch December 11, 2022 14:28
morph166955 pushed a commit to morph166955/openhab-addons that referenced this pull request Dec 18, 2022
Upgrades the included openhab-js version to 3.1.0, which uses the new
caches from core (introduced in
openhab/openhab-core#2887) and provides many
doc improvements.

Removes the SharedCache from the addon because this functionality is
now provided by core (see
openhab/openhab-core#2887).

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
Signed-off-by: Ben Rosenblum <rosenblumb@gmail.com>
andrasU pushed a commit to andrasU/openhab-addons that referenced this pull request Dec 24, 2022
Upgrades the included openhab-js version to 3.1.0, which uses the new
caches from core (introduced in
openhab/openhab-core#2887) and provides many
doc improvements.

Removes the SharedCache from the addon because this functionality is
now provided by core (see
openhab/openhab-core#2887).

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
Signed-off-by: Andras Uhrin <andras.uhrin@gmail.com>
borazslo pushed a commit to borazslo/openhab-mideaac-addon that referenced this pull request Jan 8, 2023
Upgrades the included openhab-js version to 3.1.0, which uses the new
caches from core (introduced in
openhab/openhab-core#2887) and provides many
doc improvements.

Removes the SharedCache from the addon because this functionality is
now provided by core (see
openhab/openhab-core#2887).

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
psmedley pushed a commit to psmedley/openhab-addons that referenced this pull request Feb 23, 2023
Upgrades the included openhab-js version to 3.1.0, which uses the new
caches from core (introduced in
openhab/openhab-core#2887) and provides many
doc improvements.

Removes the SharedCache from the addon because this functionality is
now provided by core (see
openhab/openhab-core#2887).

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
nemerdaud pushed a commit to nemerdaud/openhab-addons that referenced this pull request Feb 28, 2023
Upgrades the included openhab-js version to 3.1.0, which uses the new
caches from core (introduced in
openhab/openhab-core#2887) and provides many
doc improvements.

Removes the SharedCache from the addon because this functionality is
now provided by core (see
openhab/openhab-core#2887).

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
andrasU pushed a commit to andrasU/openhab-addons that referenced this pull request Jan 6, 2024
Upgrades the included openhab-js version to 3.1.0, which uses the new
caches from core (introduced in
openhab/openhab-core#2887) and provides many
doc improvements.

Removes the SharedCache from the addon because this functionality is
now provided by core (see
openhab/openhab-core#2887).

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
Signed-off-by: Andras Uhrin <andras.uhrin@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement An enhancement or new feature for an existing add-on
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants