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

Add optional shape check to data parser #127

Closed
wants to merge 19 commits into from

Conversation

lemmon-714
Copy link

as per #126

The core functionality stays the same, just refactored it since the branching got too big.
Deno tests run through, but I didn't add any of myself yet.

@lemmon-714
Copy link
Author

testing rn

@lemmon-714 lemmon-714 closed this Dec 10, 2022
@lemmon-714
Copy link
Author

lemmon-714 commented Dec 10, 2022

Added property tests; succeeds

Screenshot 2022-12-10 at 18 12 43

@lemmon-714 lemmon-714 reopened this Dec 10, 2022
@lemmon-714
Copy link
Author

I'm rn adding the option to leave the lengths of lists/maps/constr-fields indeterminate, so no need to rush looking at it. Also have a hunch it's a bad approach in the first place, will see.

@lemmon-714
Copy link
Author

Note that the regular tests - for the old stuff - still run. Still WIP ofc.

@lemmon-714
Copy link
Author

lemmon-714 commented Dec 12, 2022

Note on the last one: only works on lists of primitives thus far EDIT but that's half a testing issue, depending how you look at it. Requires rn all inner containers to be equally sized, can be interpreted as not a bug.

@lemmon-714
Copy link
Author

Works, only thing untested now is the strange SumType Shape thing. And containers of nonprimitives.

@GGAlanSmithee
Copy link
Contributor

I pulled this branch locally and tested it. I don't have any meaningful or productive feedback at this point, but it's building and all tests are passing!

@lemmon-714
Copy link
Author

The UInt8Array-tests still fail btw, which is almost certainly a testing-issue, not an implementation-issue.

@lemmon-714
Copy link
Author

Come to think of it, it might be simpler to leave the existing parsing as it was before, and add my checks afterwards as a function PlutusData, Shape -> PlutusData.

@lemmon-714
Copy link
Author

Refactor in order.

@lemmon-714 lemmon-714 closed this Dec 13, 2022
@lemmon-714
Copy link
Author

Result #132

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.

None yet

3 participants