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

Allow DSL scripts for script transformation #2990

Merged
merged 4 commits into from
Jun 14, 2022

Conversation

J-N-K
Copy link
Member

@J-N-K J-N-K commented May 31, 2022

This extends the DSL scriptengine to accept inputString as implicit variable in the engine context. By that DSL scripts can be used for the script transformation.

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

Signed-off-by: Jan N. Klug <github@klug.nrw>
@J-N-K J-N-K added enhancement An enhancement or new feature of the Core DSL Domain-Specific Language labels May 31, 2022
@J-N-K J-N-K requested a review from a team as a code owner May 31, 2022 20:07
@kaikreuzer
Copy link
Member

The current JS transformation uses input as a variable name for the input. Shouldn't we align the naming across all scripting languages?

1 similar comment
@kaikreuzer
Copy link
Member

The current JS transformation uses input as a variable name for the input. Shouldn't we align the naming across all scripting languages?

@J-N-K
Copy link
Member Author

J-N-K commented Jun 4, 2022

Good point. I‘ll change that for the script transformation in general, since it was only merged a milestone ago or so, I think we can still accept this breaking change. I can do that this afternoon.

J-N-K added 2 commits June 4, 2022 18:34
… correct type

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

J-N-K commented Jun 4, 2022

@kaikreuzer I have changed it to input and also added a check that the file/configuration type is script. The script type itself (i.e. js/dsl/...) is still prepended to the filename (as suggested in the other PR).

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

J-N-K commented Jun 4, 2022

Done.

@J-N-K
Copy link
Member Author

J-N-K commented Jun 11, 2022

@kaikreuzer Can we merge here? This should be part of 3.3 so there are less breaking changes after the release.

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.

Sure, thank you!

@kaikreuzer kaikreuzer merged commit 293de9d into openhab:main Jun 14, 2022
@kaikreuzer kaikreuzer added this to the 3.3 milestone Jun 14, 2022
@J-N-K J-N-K deleted the feature-enabledslscripttransformation branch June 14, 2022 19:16
splatch pushed a commit to ConnectorIO/copybara-hab-core that referenced this pull request Jul 12, 2023
* Allow DSL scripts for script transformation

Signed-off-by: Jan N. Klug <github@klug.nrw>
GitOrigin-RevId: 293de9d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
DSL Domain-Specific Language enhancement An enhancement or new feature of the Core
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants