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

Fix custom function handler support #729

Merged
merged 2 commits into from
Aug 29, 2023

Conversation

seadowg
Copy link
Member

@seadowg seadowg commented Aug 25, 2023

This had been broken by #722.

What has been done to verify that this works as intended?

New and existing tests.

Why is this the best possible solution? Were any other approaches considered?

I'd really like to deprecate FormDef#getEvaluationContext as it really doesn't feel like it belongs there. I might do an afternoon spike on that and see how far I can get, but it's definitely too much work to hold up a fix for.

How does this change affect users? Describe intentional changes to behavior and behavior that could have accidentally been affected by code changes. In other words, what are the regression risks?

This basically reverts the behavior to how it was pre #722 so this is hopefully fairly low risk. That said, changes to this are are pretty scary and can have subtle side effects.

@seadowg seadowg marked this pull request as ready for review August 25, 2023 13:21
@seadowg seadowg requested a review from lognaturel August 25, 2023 13:21
Copy link
Member

@lognaturel lognaturel left a comment

Choose a reason for hiding this comment

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

I'm a bit unnerved by the fact that we didn't catch this in initial dev but I don't think there's any real process change to consider. It is good that Collect tests caught it.

public static FormDef createFormDef(String formName, XFormsElement form) throws IOException, XFormParser.ParseException {
Path formFile = createTempDirectory("javarosa").resolve(formName + ".xml");
String xml = form.asXml();
System.out.println(xml);
Copy link
Member

Choose a reason for hiding this comment

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

We should probably clean these up at some point (it's also in the source init implementation)

@lognaturel lognaturel merged commit cf76b1f into getodk:master Aug 29, 2023
@seadowg seadowg deleted the fix-custom-funcs branch August 29, 2023 09:08
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.

2 participants