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

Go schema extraction doesn't correctly validate data types are in FTL modules #1066

Closed
alecthomas opened this issue Mar 12, 2024 · 0 comments · Fixed by #1082
Closed

Go schema extraction doesn't correctly validate data types are in FTL modules #1066

alecthomas opened this issue Mar 12, 2024 · 0 comments · Fixed by #1082
Assignees
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@alecthomas
Copy link
Collaborator

The following code passes schema extraction when it shouldn't, because the type parameter of ftl.Secret[did.PortableDID]("DID") is not an FTL type.

import (
  "github.com/tbd54566975/web5-go/dids/did"

  "github.com/TBD54566975/ftl/go-runtime/ftl"
)

var hostname = ftl.Config[string]("ENDPOINT")
var portableDID = ftl.Secret[did.PortableDID]("DID")
@alecthomas alecthomas added the bug Something isn't working label Mar 12, 2024
@github-actions github-actions bot added the triage Issue needs triaging label Mar 12, 2024
@alecthomas alecthomas added the good first issue Good for newcomers label Mar 12, 2024
@github-actions github-actions bot removed the triage Issue needs triaging label Mar 13, 2024
matt2e added a commit that referenced this issue Mar 21, 2024
Fixes #1066

Building a module now fails if an external type is included in the
schema.

Examples:
- `time.Month`
- `github.com/tbd54566975/web5-go/dids/did. PortableDID`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants