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

Remove restriction on defining verbs/types in subpackages #1549

Closed
alecthomas opened this issue May 21, 2024 · 0 comments
Closed

Remove restriction on defining verbs/types in subpackages #1549

alecthomas opened this issue May 21, 2024 · 0 comments
Assignees

Comments

@alecthomas
Copy link
Collaborator

I think in general we should use a model of allowing anti-patterns, but warning. In this case the anti-pattern is defining very large numbers of functions and types in a single FTL module.

So instead of preventing types from subpackages:

eg.

unsupported type ftl/foo/bar.Currency from subpackage

Instead, we'd allow this but warn if the number of types/functions defined is over a certain threshold. Of course, due to the single namespace in FTL we would not be able to allow the same type name across multiple subpackages (eg. foo/bar/Currency and foo/waz.Currency), as that will result in an error.

@alecthomas alecthomas changed the title Remove restriction on defining verbs/types only in root package Remove restriction on defining verbs/types in subpackages May 21, 2024
@github-actions github-actions bot added the triage Issue needs triaging label May 21, 2024
@ftl-robot ftl-robot mentioned this issue May 21, 2024
@github-actions github-actions bot removed the triage Issue needs triaging label May 22, 2024
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

No branches or pull requests

2 participants