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

Check params.clj type-hinting #19

Open
mars0i opened this issue Apr 26, 2019 · 3 comments
Open

Check params.clj type-hinting #19

mars0i opened this issue Apr 26, 2019 · 3 comments
Labels
question Further information is requested

Comments

@mars0i
Copy link
Owner

mars0i commented Apr 26, 2019

Check what's going on with type hints on the bean accessors generated by defparams. I think they are getting added in the functions' meta, but that doesn't show up in the macroexpand-1 output, so you can't see it in params.md. The line that is supposed to add the type hints is:
https://github.com/mars0i/masonclj/blob/master/src/masonclj/params.clj#L212

(I copied this from pasta, and need to make sure I understand it again, here.)

@mars0i mars0i added the question Further information is requested label Apr 26, 2019
@mars0i
Copy link
Owner Author

mars0i commented Apr 26, 2019

The type hinting is definitely happening; if you turn it off (by changing the line mentioned above to #this 'this) and turn on reflection warnings, you will see the difference.

What's weird is that I can't see the function defs in the repl. They should be visible e.g. with (dirs pasta.Sim) in pasta, but they're not there. Yet they are used by MASON.

Maybe it's not me, but rather that methods declared in gen-class are not visible to normal Clojure stuff??

@mars0i
Copy link
Owner Author

mars0i commented Apr 26, 2019

When I have this nailed down, I should explain what it is, in params.md.

@mars0i
Copy link
Owner Author

mars0i commented May 18, 2019

I'm pretty sure it's working as expected. It's just difficult to see the effect of the type hints. They disappear during complication, but the reflection warnings go away.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

1 participant