-
Notifications
You must be signed in to change notification settings - Fork 0
Add package installer generics, BepInEx implementation #25
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: develop
Are you sure you want to change the base?
Conversation
This is done so to better handle the mapping of modloader variants to specific package installers. We do so via enum as any modification of these variants will incur a compilation error that must be handled.
This commit contains two major features: Traits that define the behavior of filesystem operations and installer functionality, and an early implementation of the bepinex package installer which uses this functionality. New traits: - TrackedFs, which defines the API by which the installer will interact with the filesystem. - PackageInstaller, which defines the functionality and types that an installer implementee must define / consume to function.
... And a small edit to the PackageInstaller trait install_package and uninstall_package functions to accept mutable self references, not immutable. In theory this is fine but it opens up problems if we plan on multithreading file ops due to rust's mutable borrow rules. If this becomes a problem (and we NEED mutability) we can rely on something like a RefCell<T: TrackedFile> at the cost of some runtime peformance.
This commit introduces community-based package organization and automatic modloader detection for enhanced package installation workflows. Key changes: - Add community parameter to project initialization and package operations - Implement modloader detection and installation via ecosystem schema - Replace hardcoded installer selection with dynamic modloader resolution - Add package-community membership validation API - Refactor PackageInstaller trait to handle modloader packages explicitly - Create new macro-based testing framework with per-community test cases The community concept enables proper game-specific package management while modloader detection eliminates manual installer configuration. Test infrastructure now supports multiple game communities with declarative test case generation via installer_tests! macro.
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the ✨ Finishing touches🧪 Generate unit tests
Tip 👮 Agentic pre-merge checks are now available in preview!Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.
Please see the documentation for more information. Example: reviews:
pre_merge_checks:
custom_checks:
- name: "Undocumented Breaking Changes"
mode: "warning"
instructions: |
Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal). Please share your feedback with us on this Discord post. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
impl StateEntry { | ||
/// Add a new staged file. If overwrite is set then already existing | ||
/// entries with the same path will be replaced. | ||
pub fn add_staged(&mut self, file: StagedFile, overwrite: bool) {} |
Check warning
Code scanning / clippy
unused variable: file Warning
impl StateEntry { | ||
/// Add a new staged file. If overwrite is set then already existing | ||
/// entries with the same path will be replaced. | ||
pub fn add_staged(&mut self, file: StagedFile, overwrite: bool) {} |
Check warning
Code scanning / clippy
unused variable: overwrite Warning
|
||
/// Add a new linked file. If overwrite is set then already existing | ||
/// entries with the same path will be replaced. | ||
pub fn add_linked(&mut self, file: LinkedFile, overwrite: bool) {} |
Check warning
Code scanning / clippy
unused variable: file Warning
|
||
/// Add a new linked file. If overwrite is set then already existing | ||
/// entries with the same path will be replaced. | ||
pub fn add_linked(&mut self, file: LinkedFile, overwrite: bool) {} |
Check warning
Code scanning / clippy
unused variable: overwrite Warning
impl Default for TrackingMethod { | ||
fn default() -> Self { | ||
TrackingMethod::None | ||
} | ||
} |
Check warning
Code scanning / clippy
this impl can be derived Warning
… API - Update rule resolution to support relative file exclusions and simplify rule mapping - Refactor TrackedFs trait to return Result for delete operations and clarify FileAction semantics - Enhance installer_tests! macro and Testficate harness for better accuracy reporting and asset dir resolution - Add new bepinex installer test cases for h3vr community packages - Fix directory copy and delete logic for tracked/untracked file operations - Minor cleanup in ecosystem modloader data retrieval
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds package installer generics and a BepInEx implementation by introducing a development dependency and workspace configuration.
- Add
dir-diff
development dependency for directory comparison functionality - Configure cargo workspace directory environment variable
Reviewed Changes
Copilot reviewed 2 out of 1119 changed files in this pull request and generated no comments.
File | Description |
---|---|
Cargo.toml | Adds dir-diff development dependency for testing directory operations |
.cargo/config.toml | Sets up workspace directory environment variable configuration |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
No description provided.