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

Make enums CaseIterable #43

Closed
denizdogan opened this issue May 2, 2022 · 5 comments
Closed

Make enums CaseIterable #43

denizdogan opened this issue May 2, 2022 · 5 comments
Assignees
Milestone

Comments

@denizdogan
Copy link

I'm not sure if this is actually possible, but can we make the generated enums conform to CaseIterable? The use case here is that I have a list of images in my preview assets for testing purposes, and I need to put them in a long list. Without CaseIterable, I need to manually make the array of images.

@mickeyl
Copy link
Collaborator

mickeyl commented May 3, 2022

I can certainly see a use case for that. Merging https://github.com/kaandedeoglu/Shark/tree/namespaced_color_assets would be a requirement though, since it contains a refactoring towards a common enum builder.

Unfortunately this no longer applies cleanly, as I started my work on the framework-specific code generation without knowing of the existence of this very branch.

@denizdogan
Copy link
Author

@mickeyl I thought it would be enough to just add a configuration option here, similar to #44? Kind of like --case-iterable would slap CaseIterable onto every enum?

@mickeyl
Copy link
Collaborator

mickeyl commented Aug 29, 2022

@denizdogan I figured we can just conform unconditionally to CaseIterable. We don't need it for the localizable strings though, or do we?

@denizdogan
Copy link
Author

@mickeyl Not as far as I know

@mickeyl mickeyl added this to the 1.6.0 milestone Sep 18, 2022
@mickeyl mickeyl self-assigned this Sep 18, 2022
@mickeyl
Copy link
Collaborator

mickeyl commented Sep 23, 2022

This is now life as per the 1.6.0 release.

@mickeyl mickeyl closed this as completed Sep 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants