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

Fault breaks with MagmaProtocol outputs #327

Open
cdonovick opened this issue Aug 1, 2023 · 2 comments
Open

Fault breaks with MagmaProtocol outputs #327

cdonovick opened this issue Aug 1, 2023 · 2 comments

Comments

@cdonovick
Copy link
Collaborator

Fault breaks when a protocol is used an output type on account of missing debug_name and len

See: #326

@leonardt
Copy link
Owner

leonardt commented Aug 2, 2023

One option: have fault use getattr and default to name if no debug name
Another: have protocol pass through the _get_magma_value_ debug name
Third: have fault check if magmaprotocol, if so get the underlying debug name

I feel like third might be the simplest option, but perhaps we can come up with some clever way to implicitly pass through these methods to the underlying magma value, or do we like having the user dispatch on this explicitly?

@cdonovick
Copy link
Collaborator Author

Id prefer not to have write a debug_name method. In my ideal world lib code would call proto._get_magma_value_().debug_name or do option 1, I have no preference between the two.

Adding debug_name as a mixin to the MagmaProtocol is fine but each mixin method makes the protocol slightly harder to use because I need to make sure I dont alias a name reserved by Magma.

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

No branches or pull requests

2 participants