-
Notifications
You must be signed in to change notification settings - Fork 32
Implementing CLI Installation #552
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
base: main
Are you sure you want to change the base?
Conversation
|
You don't need to close and reopen the PR btw. |
Please mark the PR as draft until you've had a chance to test. |
How should I test this? |
|
Run the installer with the CLI flags. |
|
After testing, I have realized that VSCode is not being properly installed. |
This uses the Observer design pattern
|
I chose to make each installation function refactored into its own class. I also made the InstallPageViewModel class an observer, following the design pattern, which is how I ended up ensuring that progress can be displayed. |
|
An example of how the class for gradle installing can be used: // Install Gradle
{
ProgressTotal = 11;
TextTotal = "Installing Gradle";
GradleSetupTask task = new GradleSetupTask(
configurationProvider
);
task.Attach(this);
await task.Execute(token);
if (token.IsCancellationRequested) break;
task.Detach(this);
}The braces are to make task scoped |
|
I assume the deduplication still needs to be done? That refactor ended up adding more code than it removed. Also, this PR needs to have main merged into it to fix conflicts. |
yeah, I haven't actually removed duplicate code from CLI, only the GUI installer.
I might do that on Thanksgiving week, when I have more time |
|
I actually didn't merge properly; merging this is going to be hard because this has been made for so long. There are currently 11 new commits, and since I completely refactored the installation process... |
|
Is there any way to uncommit the merge commit? |
|
Option 1: Option 2: |
|
I committed it from github web merge. Oh well. |
|
It's finally done! |
|
I appreciate the time and effort you've put into this PR so far. However, I don't think it's taking the correct approach. The installer on the main branch is 3.5k lines of C# code, and this PR adds another 1.2k (34%) to implement what should ostensibly be up to 200 lines calling existing functions in a noninteractive, headless context. In my opinion, this PR currently adds repetitive boilerplate and technical debt we wouldn't want to merge and thus be responsible for maintaining. Even if this PR were in a better state, we're now too close to the 2026 season to merge a change this large into a piece of infrastructure so central; it wouldn't get the amount of testing such a change warrants, so the risk is too high. Given our installer requirements are changing for 2027 and beyond to serve both FRC and FTC, we're looking at replacing the Avalonia installer with something more standard like the Qt installer framework. See |
|
It looks like you've used AI to help draft this - that's fine, i'm totally in favor of AI assistance in coding. However, AI is really bad at code factoring/normalization, and we cannot/will not relax code standards to expect less than handwritten and properly-deduplicated code. I suggest giving this a comprehensive refactor pass; you should be able to reduce the number of LOC substantially, and make it read a lot more succinctly, without affecting the functionality. |
This pulls upon the work here: #464 and enables a command line install.
Closes #11.