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
Can't define enums in sub-packages #1903
Labels
bug
Something isn't working
Comments
alecthomas
added
bug
Something isn't working
next
Work that will be be picked up next
labels
Jun 28, 2024
github-actions
bot
added
triage
Issue needs triaging
and removed
triage
Issue needs triaging
labels
Jun 28, 2024
Open
Is this the same issue rooted in the fact that enums haven't been migrated to the new extractor yet? |
Related, yes. |
deniseli
added a commit
that referenced
this issue
Jul 2, 2024
…ding in unit tests (#1909) Fixes #1577 This change introduces a new generated file `types.ftl.go` in the user-defined package itself to make sure sumtype registrations get called when running unit tests. Notes: * This change also includes a subpackage `subpackage` in the test data that is not yet unit tested. Unit tests should be added (identical to the parent package's unit tests) after #1903 is resolved. Some work will also need to be done to extend the `types.ftl.go` generation to working on subpackages. * This works by extending the existing logic operating on `mainModuleContext`, which means that code now generates not only just the literal `main` package, but also the conceptual _main_ package's additional artifacts. I couldn't come up with a name that would be better, so it's left as-is in this PR, but please let me know if you think of something better.
worstell
added a commit
that referenced
this issue
Jul 11, 2024
worstell
added a commit
that referenced
this issue
Jul 11, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I thought this was working, but it doesn't seem to be in practice.
We should also ensure that all types can be defined in sub-packages.
The text was updated successfully, but these errors were encountered: