-
Notifications
You must be signed in to change notification settings - Fork 168
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 full support for maps #300
base: master
Are you sure you want to change the base?
Add full support for maps #300
Conversation
Thanks for the PR! It's clearly something that PropEr needs. FYI, I've also started working on this, back in April/May or so, also following the One thing that currently bothers me (big time, actually) on this PR is that it contains no tests, even though the issues that it references do contain some. I think this is top priority. |
@maxnordlund Rebasing this PR on the current |
d6cc2b4
to
e602076
Compare
❤️
That's good; means I was on the right track.
I was wonder about that. Can I use PropEr to test PropEr itself, or do you use something else? Or just plain ol' EUnit? I also wanted to validate the basic design before spending too much time writing tests. |
I've hacked a bit more on it and hit a major snag. The shrinking framework assumes I'll take another stab at it hopefully tomorrow, and try to teach the shrinkers about keys and not just indices. A small aside, I found it very confusing how you're supposed to test stuff. I guess I'm used to having EUnit tests at the bottom of the file, but after I found |
@kostis do you have any ideas of how to go forward with this PR? I don't want to have to rewrite too much of the shrinking if I can help it. Maybe have separate strategies for maps instead of trying to shoehorn them into the existing shrinkers. |
7776c83
to
6921b35
Compare
This makes it quick and easy to sump the value of variables during development of PropEr itself. Don't forget to remove them before committing though.
6921b35
to
2151487
Compare
I decided to try the custom shrinker approach and now the tests pass, which is promising. Fixed maps never shrinks their keys, normal maps do (both change and remove keys). Both types shrink their values. |
2151487
to
76569b5
Compare
@kostis I rebased on latest master (and fixuped a couple of commits) and this apparently made it so that you must approve the workflow again. |
76569b5
to
87b78c1
Compare
So I kept hacking on it yesterday, but now I'm stuck and need your help. You can see what I've done in the two commits, and if you run the tests in ab18886 you get this weird error where it can't find the type The last commit gets a different error, but I can't figure out why. Also, the code in Anyway, could you please take a look and see if you can figure it out? |
Ping @kostis |
Any update on this? |
This is an effort to fix #289 and related issues. Since I've never hacked on PropEr itself I'm not sure if I got it right, and we can always fall back on the
?LET
solution, but I figured it would be good to have maps as a first class citizen.Edit: I removed mentions of the other implementation since
?CONTAINER
is the way to go.