This repository has been archived by the owner on May 7, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 27
Generate Errors as Objects #86
Labels
Difficulty: Challenging
Hacktoberfest
by DigitalOcean and DEV
Type: Enhancement ✨
Improvement to process or efficiency
Milestone
Comments
![:octocat: :octocat:](https://github.githubassets.com/images/icons/emoji/octocat.png)
Can I work on this @irmerk |
![:octocat: :octocat:](https://github.githubassets.com/images/icons/emoji/octocat.png)
Hey @irmerk are the changes you requested to be in |
Hello, I had a look at the code: But it seems to me that clauses are already stored inside an object. What else has to be done ? |
@Ph0tonic yes the clauses are in an object, but the way in which we shape the errors to pass down to |
Thanks @irmerk, so the errorReducer should return an object instead of an Array. |
This specific issue is closed, but testing continues in Cicero UI #167 |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
Difficulty: Challenging
Hacktoberfest
by DigitalOcean and DEV
Type: Enhancement ✨
Improvement to process or efficiency
Is your feature request related to a problem? Please describe.
Revisit
contractReducer
logic and how we generate errors. Right now, the errors get added to an array every time a clause is parsed. This means if multiple changes cause a clause to be parsed multiple times, the same error will be added to the array multiple times and we end up with multiple of the same error.Describe the solution you'd like
It makes more sense to use an object instead of an array, where the
clauseId
are keys and we update the error byclauseId
, so we only ever have one error per clause.Describe alternatives you've considered
Any alternatives are welcome.
Additional context
Related issue in Cicero UI
The text was updated successfully, but these errors were encountered: