Skip to content

chore: increase verbosity of codegen error - #8181

Merged
jedevc merged 3 commits into
dagger:mainfrom
jedevc:improve-default-codegen-message-verbosity
Aug 20, 2024
Merged

jedevc merged 3 commits into
dagger:mainfrom
jedevc:improve-default-codegen-message-verbosity

Conversation

@jedevc

@jedevc jedevc commented Aug 19, 2024

Copy link
Copy Markdown
Contributor

This error seems to appear as a weird little flake (see #8031 (comment)) - and never seems to appear legitimately.

Because of this, we should crank the verbosity up to try and understand what the go parser is actually seeing when this happens, which might give us a hint as to what is really going on.

@jedevc
jedevc requested a review from gerhard August 19, 2024 10:56
@jedevc

jedevc commented Aug 19, 2024 •

Copy link
Copy Markdown
Contributor Author

Well clearly something is off here:

	            	Error: generate code: template: module.go.tmpl:79:3: executing "_dagger.gen.go/module.go.tmpl" at <ModuleMainSrc>: error calling ModuleMainSrc: cannot find default codegen DaggerObject interface in:

	            	[Bare, DaggerObject, ExecError, Tracer, dag, marshalCtx, setMarshalContext]

🤔 it's there

@jedevc
jedevc requested a review from vito August 19, 2024 15:57
@jedevc

jedevc commented Aug 20, 2024 •

Copy link
Copy Markdown
Contributor Author

@vito pointed out that this occurred very consistently in #8150. The cause of this was the new types.Alias types that are by default generated in go 1.23.

It feels unlikely that this is the cause here 🤔 But, obviously, not impossible - it could be enabled in old versions of go using GODEBUG, but we don't set that explicitly anywhere...

EDIT: the flakes still seem to happen in #8150, even after fixing the main issue.

@jedevc
jedevc force-pushed the improve-default-codegen-message-verbosity branch from 6ba689e to 616902c Compare August 20, 2024 13:32
@jedevc
jedevc requested a review from a team as a code owner August 20, 2024 13:32
jedevc added 2 commits August 20, 2024 14:34
This error seems to appear as a weird little flake - and never seems to
appear legitimately.

Because of this, we should crank the verbosity up to try and understand
what the go parser is *actually* seeing when this happens, which might
give us a hint as to what is really going on.

Signed-off-by: Justin Chadwell <[email protected]>
If we cannot lookup a symbol which is *definitely* in the found scope,
something is very wrong, and we should error.

Signed-off-by: Justin Chadwell <[email protected]>
@jedevc
jedevc force-pushed the improve-default-codegen-message-verbosity branch from 616902c to f8137a1 Compare August 20, 2024 13:34

@gerhard gerhard left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

👍 🚀

@gerhard gerhard mentioned this pull request Aug 20, 2024
2 of 5 tasks
@jedevc
jedevc merged commit c0c8d41 into dagger:main Aug 20, 2024
@jedevc
jedevc deleted the improve-default-codegen-message-verbosity branch August 20, 2024 14:58
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