janl commented on PR #5792:
URL: https://github.com/apache/couchdb/pull/5792#issuecomment-3714914366

   I’m trying to consolidate the discussions so we don’t have to retread a lot 
of text to move forward. These are (let me know if I missed any) the open 
discussion items:
   
   1. Scope
   
   The brief for the design was to be able to model even complex VDUs 
statically. This was accomplished by adding if/then/else-like behaviour as well 
as allowing custom error messages.
   
   Things could be significantly simplified if we reduced the scope to exclude 
these more complicated constructs and trade-off that not everything a JS VDU 
can do can be done statically.
   
   I’m not listing all the smaller sub-issues that would follow from this.
   
   The main question to answer here is whether the resulting functionality is 
useful enough so that people would adopt them?
   
   
   2. Error Reporting
   
   The proposal anticipates it being used interactively. That is, a user is 
doing an action that should result in saving a document, but a validation 
rejects the write. It would be a tedious software to be used if only the first 
of multiple possible validation error were to be returned and fixing each one 
would require a validation roundtrip.
   
   Hence the proposal suggests to report _all_ validation errors in one 
response instead of just the first one.
   
   This would mean a substantial code change to the selector code, as now a 
list of errors must be carried through it and logic-shortcut returns need to be 
skipped. This leads to more complex selector code that encodes two different 
behaviours, one for Mango indexing and one for validation. There are concerns 
about this complexity both in implementation and mental-model for the end-user.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to