#@Lev Lazinskiy I'm getting the same
1 messages ยท Page 1 of 1 (latest)
So I suspect the "problem" is that these lines: https://github.com/shykes/daggerverse/blob/2d123e61569c7d80fbd1657a89754aab3aaee0bd/supergit/remote.go#L144-L149
Result in the graphql schema having both
- a field named
commit(thejson:"commit") - a function named
commit(thefunc (b *RemoteBranch) Commit() *Commit)
That is in a sense expected to be an error case, but:
- The error messages sucks obviously
- I'm not 100% sure why this wasn't being caught previously and only became an error now. Looking into what changed
There was refactoring of the server-side implementation of module loading, it may have just also ended up covering a case that was previously missed, but I'll double check
Ah okay, in v0.9.3 the end result was that commit got exposed as a correctly working function. We also "said" that commit-id was available in the schema, but if you actually tried to use it you just always got an error.
Basically, I think v0.9.3 and before were serving a broken schema for this case. It's more correct now, but still silly the number of mental gymnastics required to explain to users why... Thinking if there's a way to make this work consistently
I didn't understand all of that, but looking at my code a couple months after writing it, I think that json:"commit" was a mistake, I probably meant to make it json:"commitID" but it got lost in one code refactor or other
Ah okay yeah I was over thinking, just checked and you can either change the json tag or it actually works as expected just dropping the json tags entirely now
Need the same change on RemoteTag https://github.com/shykes/daggerverse/blob/2d123e61569c7d80fbd1657a89754aab3aaee0bd/supergit/remote.go#L76-L80
Oh really - I can drop all those json tags?
The engine will just auto-"when in Rome" the field names?
Yes it all works as expected now
(that's with a local change to remove json tags)
Ah cool. So now the SDK doesn't blindly apply Go's default json encoding I guess?
@strong monolith let me fix my module real quick
Daggerverse feature request @red yoke : an alert when my modules are broken ๐
"connect your account to pagerduty" 