-
Notifications
You must be signed in to change notification settings - Fork 58
Rename DriverUpdate to Drivelution across codebase #141
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
Conversation
Co-authored-by: JusterZhu <11714536+JusterZhu@users.noreply.github.com>
Co-authored-by: JusterZhu <11714536+JusterZhu@users.noreply.github.com>
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
Renames the public-facing “DriverUpdate” naming to “Drivelution” throughout the GeneralUpdate.Drivelution C# library, aligning API types, error codes, logging defaults, tests, and documentation under the new naming.
Changes:
- Renamed core public API types (options, exception base, factory) to
Drivelution*and updated call sites. - Updated error code prefixes from
DU_*toDR_*and adjusted default/embedded log file paths. - Updated tests and markdown documentation examples to use the new names.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| src/c#/GeneralUpdate.Drivelution/Windows/Implementation/WindowsGeneralDrivelution.cs | Updates unknown error code fallback and exception type check to Drivelution naming. |
| src/c#/GeneralUpdate.Drivelution/GeneralDrivelution.cs | Updates public Create(...) overloads and platform info to use DrivelutionOptions and DrivelutionFactory. |
| src/c#/GeneralUpdate.Drivelution/Core/Logging/LoggerConfigurator.cs | Updates configuration API to accept DrivelutionOptions and switches default log path. |
| src/c#/GeneralUpdate.Drivelution/Core/DriverUpdaterFactory.cs | Renames factory type to DrivelutionFactory and updates option type usage. |
| src/c#/GeneralUpdate.Drivelution/Abstractions/Exceptions/DriverUpdateExceptions.cs | Renames base exception to DrivelutionException and updates error code strings. |
| src/c#/GeneralUpdate.Drivelution/Abstractions/Configuration/DriverUpdateOptions.cs | Renames options type to DrivelutionOptions and updates default log path. |
| src/c#/DrivelutionTest/GeneralDrivelutionTests.cs | Updates tests to construct DrivelutionOptions. |
| src/c#/DrivelutionTest/Core/DriverUpdaterFactoryTests.cs | Renames the test class and updates references to DrivelutionFactory. |
| doc/GeneralUpdate.Drivelution.md | Updates documentation snippets to use new types and log path. |
Comments suppressed due to low confidence (1)
src/c#/GeneralUpdate.Drivelution/Core/Logging/LoggerConfigurator.cs:23
ConfigureLoggertakes a non-nullableDrivelutionOptions(nullable refs are enabled), but it still performs a null-check and throws. Either make the parameter nullable (DrivelutionOptions?) if null is a supported input, or remove the dead null-check to avoid misleading API contracts.
public static ILogger ConfigureLogger(DrivelutionOptions options)
{
if (options == null)
{
throw new ArgumentNullException(nameof(options));
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| public class DrivelutionException : Exception | ||
| { | ||
| public string ErrorCode { get; set; } | ||
| public bool CanRetry { get; set; } | ||
|
|
||
| public DriverUpdateException(string message, string errorCode = "DU_UNKNOWN", bool canRetry = false) | ||
| public DrivelutionException(string message, string errorCode = "DR_UNKNOWN", bool canRetry = false) |
Copilot
AI
Feb 8, 2026
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.
The file name (DriverUpdateExceptions.cs) still reflects the old naming even though the base type is now DrivelutionException. Consider renaming the file (e.g., DrivelutionExceptions.cs) to keep filenames aligned with the current public API and improve discoverability.
| /// Validates platform detection, factory creation, and platform-specific implementations. | ||
| /// </summary> | ||
| public class DriverUpdaterFactoryTests | ||
| public class DrivelutionFactoryTests |
Copilot
AI
Feb 8, 2026
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.
The test file name (DriverUpdaterFactoryTests.cs) no longer matches the renamed test class DrivelutionFactoryTests. Renaming the file to DrivelutionFactoryTests.cs will keep test discovery/navigation consistent with the rest of the test project.
| public class DrivelutionFactoryTests | |
| public class DriverUpdaterFactoryTests |
| /// Driver updater factory - Automatically detects platform and creates appropriate implementation | ||
| /// </summary> | ||
| public static class DriverUpdaterFactory | ||
| public static class DrivelutionFactory |
Copilot
AI
Feb 8, 2026
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.
The file name no longer matches the public type it contains (file is DriverUpdaterFactory.cs but the type is DrivelutionFactory). This makes navigation harder and can trip analyzers/conventions; consider renaming the file to DrivelutionFactory.cs to match the class name.
| public static class DrivelutionFactory | |
| public static class DriverUpdaterFactory |
| /// Driver update configuration options | ||
| /// </summary> | ||
| public class DriverUpdateOptions | ||
| public class DrivelutionOptions |
Copilot
AI
Feb 8, 2026
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.
The file name (DriverUpdateOptions.cs) no longer matches the public type it contains (DrivelutionOptions). To stay consistent with the rest of the project’s one-type-per-file naming (e.g., Abstractions/Models/DriverInfo.cs), consider renaming the file to DrivelutionOptions.cs.
| /// <returns>适配当前平台的驱动更新器 / Platform-adapted driver updater</returns> | ||
| /// <exception cref="PlatformNotSupportedException">当前平台不支持时抛出 / Thrown when platform is not supported</exception> | ||
| public static IGeneralDrivelution Create(DriverUpdateOptions? options = null) | ||
| public static IGeneralDrivelution Create(DrivelutionOptions? options = null) |
Copilot
AI
Feb 8, 2026
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.
Renaming public API types/method signatures (e.g., DriverUpdateOptions -> DrivelutionOptions) is a breaking change for downstream consumers. If backwards compatibility is important, consider adding [Obsolete] shim types (e.g., DriverUpdateOptions inheriting/forwarding to DrivelutionOptions, and a DriverUpdaterFactory wrapper) to provide a migration path.
* add GeneralUpdate.Drivelution * Add comprehensive documentation for GeneralUpdate.Drivelution (#139) * Initial plan * Add comprehensive README documentation for GeneralUpdate.Drivelution Co-authored-by: JusterZhu <11714536+JusterZhu@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: JusterZhu <11714536+JusterZhu@users.noreply.github.com> * Add comprehensive test suite for GeneralUpdate.Drivelution (#140) * Initial plan * Add comprehensive test cases for GeneralUpdate.Drivelution Co-authored-by: JusterZhu <11714536+JusterZhu@users.noreply.github.com> * Address code review feedback: improve test quality and cleanup Co-authored-by: JusterZhu <11714536+JusterZhu@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: JusterZhu <11714536+JusterZhu@users.noreply.github.com> * Rename DriverUpdate to Drivelution across codebase (#141) * Initial plan * Replace all instances of DriverUpdate with Drivelution Co-authored-by: JusterZhu <11714536+JusterZhu@users.noreply.github.com> * Update error code prefixes from DU_ to DR_ Co-authored-by: JusterZhu <11714536+JusterZhu@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: JusterZhu <11714536+JusterZhu@users.noreply.github.com> * Add GetDriversFromDirectoryAsync for local driver discovery (#142) * Initial plan * Add GetDriversFromDirectoryAsync method to read driver information from local directory Co-authored-by: JusterZhu <11714536+JusterZhu@users.noreply.github.com> * Add tests for GetDriversFromDirectoryAsync method Co-authored-by: JusterZhu <11714536+JusterZhu@users.noreply.github.com> * Fix security issues: prevent command injection and improve certificate parsing Co-authored-by: JusterZhu <11714536+JusterZhu@users.noreply.github.com> * Translate all Chinese annotations to English Co-authored-by: JusterZhu <11714536+JusterZhu@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: JusterZhu <11714536+JusterZhu@users.noreply.github.com> --------- Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com> Co-authored-by: JusterZhu <11714536+JusterZhu@users.noreply.github.com>
Replaces all instances of "DriverUpdate" with "Drivelution" for consistent naming throughout the GeneralUpdate.Drivelution library.
Changes
DriverUpdateException→DrivelutionException,DriverUpdateOptions→DrivelutionOptions,DriverUpdaterFactory→DrivelutionFactoryDU_*→DR_*prefix (e.g.,DU_UNKNOWN→DR_UNKNOWN,DU_PERMISSION_DENIED→DR_PERMISSION_DENIED)./Logs/driver-update-.log→./Logs/drivelution-.logDriverUpdaterFactoryTests→DrivelutionFactoryTestsExample
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.