kevinheavey / anchorpy

The Python Anchor client.
https://kevinheavey.github.io/anchorpy/
MIT License
222 stars 59 forks source link

fix(clientgen): add missing BorshPubkey import in defined types #81

Closed losman0s closed 2 years ago

losman0s commented 2 years ago

The BorshPubkey import is missing from the types1 generation for the generated client, leading to broken type structs. This addition should fix that.

losman0s commented 2 years ago

I have some local failures when running make test but I'm not certain they are related. One of them is due to the local validator teardown issues I have, and the other one is a cli test I don't have time to dig in preemptively. Would be great to have the CI fail before I invest time in this 👌

kevinheavey commented 2 years ago

Cool, the stuff that's failing now looks real

losman0s commented 2 years ago

Cool, the stuff that's failing now looks real

Yep, fixing the BarStruct in ts-reference/'s test program and corresponding test.

kevinheavey commented 2 years ago

Oh ts-reference is just a copy of anchor-client-gen using git subtree, don't bother changing that

kevinheavey commented 2 years ago

Ah but i see you need to change it to change the idl

hmm

losman0s commented 2 years ago

No worries I just changed whatever I found to test the change. I can make a test for this in a better place if you can point me to it 😄

losman0s commented 2 years ago

Or I can just scrap that. There is already some coverage in unit/test_clientgen.py.

kevinheavey commented 2 years ago

Yeah probably better to scrap it, I've been treating the subtree contents as read-only

losman0s commented 2 years ago

Makes sense, it'd become a merge nightmare otherwise. Changing.

losman0s commented 2 years ago

Done.

kevinheavey commented 2 years ago

thank you!