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

refactor: use a configure interface for settings #16264

Open
6543 opened this issue Jun 26, 2021 · 4 comments
Open

refactor: use a configure interface for settings #16264

6543 opened this issue Jun 26, 2021 · 4 comments
Labels
type/proposal The new feature has not been accepted yet but needs to be discussed first. type/refactoring Existing code has been cleaned up. There should be no new functionality.

Comments

@6543
Copy link
Member

6543 commented Jun 26, 2021

I remain unconvinced of the wisdom of moving more things in to setting and in fact intend to make a refactor that will require mostly reverting this.

We should be using a Configure interface e.g.

setting.Configure(setting.Configurable) error

so that the explicit dependency on setting everywhere can eventually be dropped.

Originally posted by @zeripath in #15241 (comment)

@6543
Copy link
Member Author

6543 commented Jun 26, 2021

my thoughts: of now it's convinient to just have to look to one place if you search for settings or like to change gitea behaviour
if we going to split setting into it's related modules and move it into that modules, we should considder carefully how to do so and what conventions we follow
so we still know without thinking where to look at / put code at

cc @lunny

@6543 6543 added this to the 1.16.0 milestone Jun 26, 2021
@6543 6543 added type/proposal The new feature has not been accepted yet but needs to be discussed first. type/refactoring Existing code has been cleaned up. There should be no new functionality. labels Jun 26, 2021
@lunny
Copy link
Member

lunny commented Jun 27, 2021

I think they are different designs. One is to keep all settings on one package(setting), another is to keep configurations on feature packages. Both them have advantages and disadvantages.

We could discuss what's the benefit to convert one to another.

@6543
Copy link
Member Author

6543 commented Jun 27, 2021

I'm fine with both as long as you can easely find related things in codebase

@lunny lunny modified the milestones: 1.16.0, 1.17.0 Nov 19, 2021
@lunny
Copy link
Member

lunny commented May 16, 2022

I think #18058 will fix this partially.

@lunny lunny modified the milestones: 1.17.0, 1.x.x Jun 3, 2022
@lunny lunny removed this from the 1.x.x milestone Mar 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/proposal The new feature has not been accepted yet but needs to be discussed first. type/refactoring Existing code has been cleaned up. There should be no new functionality.
Projects
None yet
Development

No branches or pull requests

2 participants