generated from TBD54566975/tbd-project-template
-
Notifications
You must be signed in to change notification settings - Fork 8
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
Build fails when importing another module which doesn't use go-runtime/ftl #1095
Comments
Open
matt2e
added a commit
that referenced
this issue
Mar 17, 2024
Changes - Incomplete module boilerplate for test modules - `ftl/one` was using `two.User`, but `ftl/two` was not including it in its schema - I've added a new Verb which makes use of User - compiling schema was returning errors at the node that was reached before finding an error, where as sometimes we have a more accurate position available - Now we pass around the latest position we dive deeper into all the checks, rather than staying at the node's position - Previously we would get an error on the verb location, rather than the field on a struct that was used by the verb Not included in this PR is a fix for #1095, which is why test/data is using Option in the new verb
Still seeing errors when |
matt2e
added a commit
that referenced
this issue
Mar 25, 2024
Fixes #1095 Sink & Source verbs would have a schema like ``` verb returnsUser(Unit) two.UserResponse ``` but the scaffolded `external_module.go` version of it would be: ``` func ReturnsUser(ctx context.Context) (UserResponse, error) ``` When generating imports, we were finding `schema.Unit` in the verb which triggered an inclusion of ftl This caused the exernal module to fail to build because ftl was not being used by the generated code. This fix now skips any unit in the schema if the parent is a verb
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Getting this build error when building a module which imports another module:
../modules/two/external_module.go:8:3: "github.com/TBD54566975/ftl/go-runtime/ftl" imported and not used
I worked around it by making use of ftl somehow, like by including an Option value somewhere
The text was updated successfully, but these errors were encountered: