Skip to content

Add tool for generating the DevConfig file #3811

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

Open
wants to merge 6 commits into
base: development
Choose a base branch
from

Conversation

normj
Copy link
Member

@normj normj commented May 13, 2025

Description

I got tired of manually creating DevConfig files or explaining to contributors how to create a DevConfig file so I thought I add a console tool build tools for helping generating the DevConfig file would be helpful. At least it would give a head start on the file and users could later further modify the generated file.

DevConfigGenerator

@boblodgett boblodgett self-requested a review May 13, 2025 18:54
@peterrsongg
Copy link
Contributor

I played around with it a bit, this is neat. Thanks for making the devconfig process easier!

public List<Service> Services { get; } = new List<Service>();
}

public class CoreChange
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be useful to have backwardIncompatibilitiesToIgnore but can be in a future version.

writer.WriteStartObject("core");

writer.WriteBoolean("updateMinimum", config.Core.UpdateServiceMinimum);
writer.WriteString("type", config.Core.Type);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should validate Type being either minor or patch in the future. Any other value isn't technically supported right now for basic DevConfigs.


void GeneratorChange()
{
AnsiConsole.Markup("Generator changes are saved as [green]Core changes[/] with update service minimum set to [green]true[/].\n");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A generator change doesn't always means a core update is needed. Usually it requires a change to a specific service unless it impacts many of them.

var service = devConfig.Services.FirstOrDefault(x => x.Name == serviceName);
if (service == null)
{
service = new Service { Name = serviceName };
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When would this case be valid? It seems like it would either be a mistake name entered that has no match or trying to specify a new service which would have a folder name. Looks like this could lead to invalid devconfigs.

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

Successfully merging this pull request may close these issues.

3 participants