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: treat type aliased subpackage types as underlying types #1564

Merged
merged 1 commit into from
May 23, 2024

Conversation

matt2e
Copy link
Collaborator

@matt2e matt2e commented May 23, 2024

This issue was found when trying to upgrade ftl with another codebase:

  • module has an ftl type that refers to subpackage.CustomerType
  • subpackage has type CustomerType string

Previously this would get added to the schema as just String, but our recent changes had made it get added to the schema as module.CustomerType

We now detect this case and use the underlying type like we used to.

@matt2e matt2e requested a review from alecthomas as a code owner May 23, 2024 06:54
@matt2e matt2e requested review from a team and deniseli and removed request for a team May 23, 2024 06:54
@ftl-robot ftl-robot mentioned this pull request May 23, 2024
@matt2e matt2e force-pushed the matt2e/treat-subpackage-typealiases-as-underlying branch from e753bbc to 3790c46 Compare May 23, 2024 07:05
@matt2e matt2e merged commit 1ede26a into main May 23, 2024
24 checks passed
@matt2e matt2e deleted the matt2e/treat-subpackage-typealiases-as-underlying branch May 23, 2024 07:09

import (
"context"
// Import the FTL SDK.
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: irrelevant comment

@deniseli deniseli added the approved Marks an already closed PR as approved label May 23, 2024
@matt2e matt2e linked an issue May 24, 2024 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Marks an already closed PR as approved
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow subpackage types to be ftl types
3 participants