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

fix: improve Go schema extraction errors #927

Merged
merged 2 commits into from
Feb 12, 2024

Conversation

alecthomas
Copy link
Collaborator

@alecthomas alecthomas commented Feb 12, 2024

Previously:

failed to build module: failed to extract module schema: ftl/foo:
/Users/alec/dev/example/backend/modules/foo/foo.go:14:2: could not import
ftl/bar (invalid package name: "")

Now:

failed to build module: failed to extract module schema:
/Users/alec/dev/example/backend/modules/foo/foo.go:2:1:
/Users/alec/dev/example/backend/modules/foo/foo.go:88:1:
/Users/alec/dev/example/backend/modules/foo/foo.go:88:138:
/Users/alec/dev/example/backend/modules/foo/foo.go:106:2:
/Users/alec/dev/example/backend/modules/foo/foo.go:106:23: call first
argument must be a function but is an unresolved reference to
bar.BarRequest

Fixes #924

Previously:

```
failed to build module: failed to extract module schema: ftl/foo:
/Users/alec/dev/example/backend/modules/foo/foo.go:14:2: could not import
ftl/bar (invalid package name: "")
```

Now:

```
failed to build module: failed to extract module schema:
/Users/alec/dev/example/backend/modules/foo/foo.go:2:1:
/Users/alec/dev/example/backend/modules/foo/foo.go:88:1:
/Users/alec/dev/example/backend/modules/foo/foo.go:88:138:
/Users/alec/dev/example/backend/modules/foo/foo.go:106:2:
/Users/alec/dev/example/backend/modules/foo/foo.go:106:23: call first
argument must be a function but is an unresolved reference to
bar.BarRequest
```
Copy link
Collaborator

@mistermoe mistermoe left a comment

Choose a reason for hiding this comment

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

❤️

@alecthomas alecthomas merged commit 76ed3b5 into main Feb 12, 2024
@alecthomas alecthomas deleted the aat/go-schema-improve-errors branch February 12, 2024 04:10
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.

Some kind of cycle is causing a build failure
2 participants