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

Decouple expression languages from core infrastructure #6502

Merged
merged 2 commits into from May 13, 2024

Conversation

wetneb
Copy link
Sponsor Member

@wetneb wetneb commented Apr 3, 2024

Migrates the registration of expression languages provided by default to the controller.js, and removes references to GREL from functionally independent areas.

This is a first step towards having GREL in its own Maven module.

@wetneb wetneb requested a review from tfmorris April 3, 2024 12:08
@wetneb wetneb force-pushed the grel_decoupling branch 6 times, most recently from b1a68b3 to 64a638e Compare April 3, 2024 14:33
@wetneb
Copy link
Sponsor Member Author

wetneb commented Apr 16, 2024

@tfmorris any interest in this? I'd like to merge it to be able to start the Maven modularization PR.

Copy link
Member

@tfmorris tfmorris left a comment

Choose a reason for hiding this comment

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

This seems like 3 or 4 unrelated sets of changes lumped together, but perhaps I'm not fully understanding what's going on. The core parser changes seem fine (with the addition of the since = on the deprecation annotation).

storeCell(rows, rowindex, colindex, v);
Object date;
try {
date = CalendarParser.parseAsOffsetDateTime(val.get("date").asText());
Copy link
Member

Choose a reason for hiding this comment

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

This also seems unrelated, but even if it gets moved to another PR, I don't think we should be introducing direct calls to CalendarParser which we should be targeting to get rid of. Who's date format is this? If it's something like an ISO date, we should just use the Java classes directly. If it's a human date, it should probably stay wrapped in ToDate()

Copy link
Sponsor Member Author

Choose a reason for hiding this comment

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

The motivation is still the same: removing a dependency from a core class to a GREL function. Using CalendarParser means that we support almost the same sort of date formats as before, which could be useful for services which rely on that.
But that being said now that the specs mandate ISO dates (although only in the JSON schemas so far, we should fix that) it should probably be safe to switch to supporting ISO dates only.

Copy link
Member

Choose a reason for hiding this comment

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

Sorry for the delay in circling back on this. I think using Java classes to support ISO dates (only) would be a better approach.

Migrates the registration of expression languages provided by default
to the controller.js. and removes references to GREL from functionally
independent areas.
Copy link
Member

@tfmorris tfmorris left a comment

Choose a reason for hiding this comment

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

Thanks. LGTM

@wetneb wetneb merged commit bd8f956 into OpenRefine:master May 13, 2024
19 checks passed
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.

None yet

2 participants