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

plutus-tx-plugin: store PIR in code as well as PLC, use in tests #365

Merged
merged 1 commit into from
Dec 4, 2018

Conversation

michaelpj
Copy link
Contributor

Store the serialized PIR code in the program as well. This is useful for
debugging and testing.

As a witness to that, we can use it for the plutus-tx and
plutus-tx-plugin tests, producing much shorter and more comprehensible
outputs. (Indeed, I've spotted a couple of potential bugs doing this
that had escaped me in the more verbose output)

I also want to use this in the tutorial/my demo, but I'll do that in a follow-up.

Store the serialized PIR code in the program as well. This is useful for
debugging and testing.

As a witness to that, we can use it for the `plutus-tx` and
`plutus-tx-plugin` tests, producing much shorter and more comprehensible
outputs. (Indeed, I've spotted a couple of potential bugs doing this
that had escaped me in the more verbose output)
Copy link
Contributor

@effectfully effectfully left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Much better output indeed.

correctly etc. But since it *is* just a wrapper... we can just put in a coercion!

Very nice and easy, but we need to make sure we don't stop being a simple newtype
without revisiting this.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is no longer true?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed, now it's a datatype and we actually get the data constructor and construct it properly.

@michaelpj
Copy link
Contributor Author

(PlcCode is increasingly not a good name for the type created by the plugin - I am going to change this in future.)

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.

2 participants