#@Lev Lazinskiy I'm getting the same

1 messages ยท Page 1 of 1 (latest)

grizzled anvil
#

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

  1. a field named commit (the json:"commit")
  2. a function named commit (the func (b *RemoteBranch) Commit() *Commit)

That is in a sense expected to be an error case, but:

  1. The error messages sucks obviously
  2. 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

grizzled anvil
#

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

winter fog
#

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

grizzled anvil
winter fog
#

Oh really - I can drop all those json tags?

#

The engine will just auto-"when in Rome" the field names?

grizzled anvil
#

(that's with a local change to remove json tags)

winter fog
#

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 ๐Ÿ˜›

red yoke
winter fog
#

I'm being serious though. If a new version of Dagger is released and it causes my module to break, I would like to get an email

#

(I don't mean now ๐Ÿ˜›