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

[automation] Script dependency tracking #1884

Merged
merged 1 commit into from Jan 26, 2021

Conversation

jpg0
Copy link
Contributor

@jpg0 jpg0 commented Dec 3, 2020

Added ability for ScriptEngines to allow script dependencies to be tracked and changes to trigger script reloading.

This is via a supplier function included in the Script Context.

I have tested this with (a) Python that does not use it and (b) GraalJS which does.

Signed-off-by: Jonathan Gilbert jpg@trillica.com

@jpg0
Copy link
Contributor Author

jpg0 commented Dec 17, 2020

@kaikreuzer this PR is the last one before the main Graal one. This adds the ability for dependency tracking of script libraries, so that modifying a library will reload all scripts that depend on it (I had plenty of issues without this as library changes would break things that I didn't see until a restart). I had included this functionality in the script provider addon itself, but though that it would be beneficial to push it down in the framework so that other languages can use it. If you don't agree please let me know and I'll move it back to the script addon (or even out of that). I noticed that you had made changes in this area recently.

@kaikreuzer
Copy link
Member

Thanks @jpg0! Since we are this week in a feature freeze for 3.0, I'd suggest to keep that for after the release and plan it for 3.1, since GraalVM won't be earlier than that either.
I'll be very busy with the release the next days, so please allow some time before receiving review feedback (at least from me, maybe the other @openhab/core-maintainers are faster ;-)).

…acked and changes to trigger script reloading

Signed-off-by: Jonathan Gilbert <jpg@trillica.com>
@jpg0
Copy link
Contributor Author

jpg0 commented Dec 18, 2020

@kaikreuzer Thanks for the update. I've actually made a small change so that the future 3.1 GraalVM support should be backwards compatible with 3.0, just without the dependency tracking from this PR, also so that it can be reviewed independently. Good luck with 3.0 GA!

@jpg0 jpg0 requested a review from a team as a code owner December 28, 2020 08:22
@cweitkamp cweitkamp added automation enhancement An enhancement or new feature of the Core labels Jan 16, 2021
Base automatically changed from master to main January 18, 2021 20:04
Copy link
Member

@kaikreuzer kaikreuzer left a comment

Choose a reason for hiding this comment

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

Thanks for your patience, @jpg0!
Looks good to me, so let's merge!

@kaikreuzer kaikreuzer merged commit f0c9a84 into openhab:main Jan 26, 2021
@kaikreuzer kaikreuzer added this to the 3.1 milestone Jan 26, 2021
@jpg0 jpg0 deleted the script-dependency-tracking branch December 26, 2021 11:14
splatch pushed a commit to ConnectorIO/copybara-hab-core that referenced this pull request Jul 11, 2023
…acked and changes to trigger script reloading (openhab#1884)

Signed-off-by: Jonathan Gilbert <jpg@trillica.com>
GitOrigin-RevId: f0c9a84
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automation enhancement An enhancement or new feature of the Core
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants