Skip to content

remove SetFieldMappings#148

Merged
JusterZhu merged 1 commit intomasterfrom
remove
Feb 12, 2026
Merged

remove SetFieldMappings#148
JusterZhu merged 1 commit intomasterfrom
remove

Conversation

@JusterZhu
Copy link
Collaborator

No description provided.

@JusterZhu
Copy link
Collaborator Author

@copilot Will there be an error when DrivelutionMiddleware is referenced? After I commented out #if NET10_0_OR_GREATER, GeneralDrivelution becomes unresolvable.

Copy link
Contributor

Copilot AI commented Feb 12, 2026

@JusterZhu I've opened a new pull request, #149, to work on those changes. Once the pull request is ready, I'll request review from you.

@JusterZhu JusterZhu marked this pull request as ready for review February 12, 2026 10:24
Copilot AI review requested due to automatic review settings February 12, 2026 10:24
@JusterZhu JusterZhu merged commit e6fd903 into master Feb 12, 2026
2 checks passed
@JusterZhu JusterZhu deleted the remove branch February 12, 2026 10:24
Copy link
Contributor

Copilot AI left a 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 removes the SetFieldMappings configuration surface area from the update bootstrap and internal config, simplifying configuration now that mapping is centralized via ConfigurationMapper.

Changes:

  • Removed GeneralUpdateBootstrap.SetFieldMappings(...) from the public bootstrap API.
  • Removed FieldMappings from GlobalConfigInfo.
  • Updated sample usage and unit tests to stop referencing SetFieldMappings.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
src/c#/GeneralUpdate.Upgrad/Program.cs Removes/updates example usage that referenced field mappings.
src/c#/GeneralUpdate.Core/GeneralUpdateBootstrap.cs Removes the SetFieldMappings fluent API from the bootstrap.
src/c#/GeneralUpdate.Common/Shared/Object/GlobalConfigInfo.cs Removes the FieldMappings property from the runtime config object.
src/c#/CoreTest/Bootstrap/GeneralUpdateBootstrapTests.cs Removes tests and chaining calls for the deleted API.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@@ -84,13 +84,7 @@ public GeneralUpdateBootstrap SetConfig(Configinfo configInfo)
InitBlackList();
return this;
}
Copy link

Copilot AI Feb 12, 2026

Choose a reason for hiding this comment

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

Removing the public SetFieldMappings API is a breaking change for any consumers chaining this call. If backward compatibility matters, consider leaving a deprecated shim (e.g., marked obsolete) for at least one release or explicitly handling the versioning/release notes for this breaking change.

Suggested change
}
}
[Obsolete("SetFieldMappings is deprecated. Use SetConfig instead.")]
public GeneralUpdateBootstrap SetFieldMappings(Configinfo configInfo)
{
return SetConfig(configInfo);
}

Copilot uses AI. Check for mistakes.
Comment on lines 113 to 117
public bool? PatchEnabled { get; set; }

/// <summary>
/// Dictionary for custom field name mappings.
/// Used for flexible configuration transformations in specific scenarios.
/// </summary>
public Dictionary<string, string> FieldMappings { get; set; }

/// <summary>
/// Directory path where the current version files are backed up before update.
/// Computed by combining InstallPath with a versioned directory name.
Copy link

Copilot AI Feb 12, 2026

Choose a reason for hiding this comment

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

GlobalConfigInfo is a public type; removing the FieldMappings property is a source-breaking change for any callers referencing it (and potentially for any reflection-based code). If this is an intentional breaking change, consider documenting it in release notes / bumping the appropriate package version, or providing a compatibility path if needed.

Copilot uses AI. Check for mistakes.
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.

2 participants