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

Proposal for expansion of expression language #31

Merged
merged 3 commits into from
Apr 3, 2023

Conversation

jaredoconnell
Copy link
Contributor

@jaredoconnell jaredoconnell commented Mar 14, 2023

Changes introduced with this PR

This PR proposes three main changes to the expression language.

See the files changed for the proposal itself.

Voting Period is 7 21 days

Voting ends Friday March 24th April 7th.


By contributing to this repository, I agree to the contribution guidelines.

Copy link

@ghost ghost left a comment

Choose a reason for hiding this comment

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

I would like to add one more element: every expression language component should be built in such a way that the expression language can create a resulting schema without executing the expression itself if a schema for the referenced value is available. This will help with later adding static workflow analysis.

@jaredoconnell
Copy link
Contributor Author

I would like to add one more element: every expression language component should be built in such a way that the expression language can create a resulting schema without executing the expression itself if a schema for the referenced value is available. This will help with later adding static workflow analysis.

Especially since you're already implementing it, and it is required regardless as an implementation detail, I'll leave that out of the proposal. The proposed changes in this proposal change how the users create and interact with workflows.

@jaredoconnell jaredoconnell marked this pull request as ready for review March 16, 2023 21:41
@jaredoconnell jaredoconnell requested review from a user March 16, 2023 21:44
Copy link

@ghost ghost left a comment

Choose a reason for hiding this comment

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

Yes please!

@dustinblack
Copy link
Member

I assume this is a breaking change, particularly:

  • Make subexpressions default within map access since it is unintuitive as-is, removing the old () syntax. Moving from map[(sub-expression)] to map[sub-expression]

The new functions and operators I suppose could add functionality in a non-breaking way.

IIUC this would cause a workflow built before the change to be incompatible with the engine after the change, and new workflows will not be backward-compatible. This will require some housekeeping across the workflows we already have published, and a good set of release notes. Documentation should be a concurrent requirement with the new engine release, when ready.

@jaredoconnell
Copy link
Contributor Author

I assume this is a breaking change, particularly:

  • Make subexpressions default within map access since it is unintuitive as-is, removing the old () syntax. Moving from map[(sub-expression)] to map[sub-expression]

The new functions and operators I suppose could add functionality in a non-breaking way.

IIUC this would cause a workflow built before the change to be incompatible with the engine after the change, and new workflows will not be backward-compatible. This will require some housekeeping across the workflows we already have published, and a good set of release notes. Documentation should be a concurrent requirement with the new engine release, when ready.

While the () removal is likely a breaking change, no one has used it as far as I am aware. It's an advanced use case that has not been taken advantage of.

The main documentation change is that this deviates from JSONPATH.

Copy link
Member

@mfleader mfleader left a comment

Choose a reason for hiding this comment

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

I like the proposal. While domain specific programming languages (DSL) generally need to be targeted at non-software developers, many of the most used DSLs, like SQL, OS shells, and even Make, have all incorporated some combination of functionality from general purpose programming languages (GPL) like functions, binary comparison operators, and/or mathematical expressions, so it seems reasonable that these features would facilitate Arcaflow's expression language to meet the complexity of our end users' needs.

Does not change the content of the proposal
@dustinblack dustinblack requested a review from mfleader March 21, 2023 13:18
@dustinblack
Copy link
Member

I'm taking the liberty to extend the voting date on this to April 7 since the process is still new for us and many of us were distracted by an internal event.

@dustinblack dustinblack merged commit 0722d0e into arcalot:main Apr 3, 2023
dustinblack added a commit that referenced this pull request Apr 3, 2023
@dustinblack dustinblack mentioned this pull request Apr 3, 2023
dustinblack added a commit that referenced this pull request Apr 4, 2023
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.

9 participants