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
Conversation
b1a68b3
to
64a638e
Compare
@tfmorris any interest in this? I'd like to merge it to be able to start the Maven modularization PR. |
There was a problem hiding this 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).
...rver/src/com/google/refine/operations/column/ColumnAdditionByFetchingURLsOperationTests.java
Show resolved
Hide resolved
storeCell(rows, rowindex, colindex, v); | ||
Object date; | ||
try { | ||
date = CalendarParser.parseAsOffsetDateTime(val.get("date").asText()); |
There was a problem hiding this comment.
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()
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. LGTM
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.