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 enums from the code base #13743

Closed
zharinov opened this issue Jan 22, 2022 · 9 comments · Fixed by #18900
Closed

Remove enums from the code base #13743

zharinov opened this issue Jan 22, 2022 · 9 comments · Fixed by #18900
Assignees
Labels
priority-3-medium Default priority, "should be done" but isn't prioritised ahead of others type:refactor Refactoring or improving of existing code

Comments

@zharinov
Copy link
Collaborator

Describe the proposed change(s).

This is an umbrella issue for series of small refactoring PRs

@zharinov zharinov added type:refactor Refactoring or improving of existing code status:requirements Full requirements are not yet known, so implementation should not be started priority-5-triage labels Jan 22, 2022
@zharinov zharinov self-assigned this Jan 22, 2022
@HonkingGoose HonkingGoose added priority-3-medium Default priority, "should be done" but isn't prioritised ahead of others status:ready and removed priority-5-triage status:requirements Full requirements are not yet known, so implementation should not be started labels Jan 22, 2022
@pret-a-porter
Copy link
Contributor

What is the reason to remove enums?

@zharinov
Copy link
Collaborator Author

Risks seem to be outweighting the benefits. But doing converting enums for hostType I've realized we actually need not only enumerate values, but also validate them (e.g. when set via user config). So, the problem is a bit wider then one versus another idiomatic construct.

@pret-a-porter
Copy link
Contributor

@pret-a-porter
Copy link
Contributor

Cause of using classic enum in case of ProgrammingLanguage is looping through all possible values

@zharinov
Copy link
Collaborator Author

In context of Renovate, personally my biggest obstacle with enums is that we can't import type { SomeEnum } from 'somewhere'.

@zharinov
Copy link
Collaborator Author

Maybe, it's easily solvable, though

@viceice
Copy link
Member

viceice commented Jan 24, 2022

In context of Renovate, personally my biggest obstacle with enums is that we can't import type { SomeEnum } from 'somewhere'.

That why i don't like them too. I now always union types instead.

@RahulGautamSingh

This comment was marked as resolved.

@renovate-release
Copy link
Collaborator

🎉 This issue has been resolved in version 34.29.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 21, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
priority-3-medium Default priority, "should be done" but isn't prioritised ahead of others type:refactor Refactoring or improving of existing code
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants