006 stabilize base - #25
Merged
Merged
Conversation
Signed-off-by: dgtalbug <dgtalbug@gmail.com>
…tiple sources Signed-off-by: dgtalbug <dgtalbug@gmail.com>
…ctions Signed-off-by: dgtalbug <dgtalbug@gmail.com>
…monica dependency Signed-off-by: dgtalbug <dgtalbug@gmail.com>
…alidation Signed-off-by: dgtalbug <dgtalbug@gmail.com>
…re metrics Signed-off-by: dgtalbug <dgtalbug@gmail.com>
…e against multiple profiles Signed-off-by: dgtalbug <dgtalbug@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces a new application context system to enable dependency injection across the Arc CLI, improves testability, and enhances documentation for custom themes. The main changes include the creation of a centralized
Contextstruct to hold dependencies, refactoring the CLI entrypoint to use this context, and adding comprehensive documentation and examples for custom themes. Additional improvements were made to the Makefile for more robust test and race detection workflows.Dependency Injection & Application Context:
Contextstruct ininternal/app/context.goto centralize all application-wide dependencies, enabling dependency injection and eliminating global state. This includes logger, configuration, store, preferences, UI, and base directory.NewDefaultContextWithConfig) ininternal/app/factory.goto construct the context with all dependencies, handling configuration loading, logger setup, store and repository initialization, preferences, and theme loading. Also includes a deprecatedNewDefaultContextfor backward compatibility.internal/app/context_test.go, ensuring correct initialization and configuration handling.cmd/arc/main.go) to load configuration, create an application context, and pass it to the CLI, improving startup error handling and enabling dependency injection for commands.Testing & Build Improvements:
Makefileto run core package and CLI tests separately, addressing known race conditions in the CLI due to the Cobra library. Added a newtest-racetarget to run the race detector only on safe packages, and improved output clarity for test commands. [1] [2]Documentation & Theming:
docs/CUSTOM_THEMES.md, detailing file structure, color formats, accessibility, troubleshooting, and sharing themes.docs/custom-theme-example.yamlfor users to use as a template.Dependency Management:
go.modto move thegithub.com/charmbracelet/harmonicadependency from direct to indirect, reflecting its usage in the project. [1] [2]