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

Best way to save and load a validator function? #6

Closed
anderslaunerbaek opened this issue Aug 2, 2017 · 1 comment · Fixed by #48
Closed

Best way to save and load a validator function? #6

anderslaunerbaek opened this issue Aug 2, 2017 · 1 comment · Fixed by #48

Comments

@anderslaunerbaek
Copy link

Hi there,

What is the best way to save the validator function for later use?
It returns: Error in context_eval(join(src), private$context) : ReferenceError: jv_21774e4676e1 is not defined when I try to use a saved validator function.

Thanks

/Anders

@colearendt
Copy link

At present, the way the validator works is by creating a temp file:

 name <- basename(tempfile("jv_"))

So you are correct that saving the R object does not help because the temp file can be lost, and then the validator does not have anything to execute (In your example, the temp file jv_21774e4676e1 is missing). The easiest approach at present is to just save the schema, because a new validator can always be created on the fly. However, perhaps worth thinking about a way to make the validator function an R object.

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 a pull request may close this issue.

2 participants