Refactor: move resolveCaseIdent to GeneratorHelpers, eliminating duplication across generators#259
Open
Copilot wants to merge 3 commits into
Open
Refactor: move resolveCaseIdent to GeneratorHelpers, eliminating duplication across generators#259Copilot wants to merge 3 commits into
resolveCaseIdent to GeneratorHelpers, eliminating duplication across generators#259Copilot wants to merge 3 commits into
Conversation
Copilot
AI
changed the title
[WIP] Review pending pull requests for March 2026
Refactor: move Mar 11, 2026
resolveCaseIdent to GeneratorHelpers, eliminating duplication across generators
23 tasks
There was a problem hiding this comment.
Pull request overview
Consolidates duplicated DU-case identifier qualification logic (handling RequireQualifiedAccess) into GeneratorHelpers.resolveCaseIdent, and updates generators to use the shared helper to keep behavior consistent across plugins.
Changes:
- Added
GeneratorHelpers.resolveCaseIdentto centralize DU caseSynLongIdentconstruction. - Updated
DUCasesGeneratorto remove the local helper and callGeneratorHelpers.resolveCaseIdent. - Updated
LensesGeneratorto replace inline case-name construction withGeneratorHelpers.resolveCaseIdent.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/Myriad.Plugins/GeneratorHelpers.fs | Adds shared resolveCaseIdent helper for qualified DU case identifiers. |
| src/Myriad.Plugins/DUCasesGenerator.fs | Removes local duplication and switches call sites to the shared helper. |
| src/Myriad.Plugins/LensesGenerator.fs | Replaces inline RequireQualifiedAccess case-name logic with shared helper call. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.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.
resolveCaseIdent(which qualifies DU case identifiers whenRequireQualifiedAccessis present) was duplicated — once as a named function inCreateDUModuleand once as inline logic inLensesGenerator. This consolidates it intoGeneratorHelpers.Changes
GeneratorHelpers.fs: AddresolveCaseIdent (requiresQualifiedAccess: bool) (parent: LongIdent) (id: Ident) : SynLongIdenthelperDUCasesGenerator.fs: Remove localresolveCaseIdentfromCreateDUModule; update two call sites toGeneratorHelpers.resolveCaseIdentLensesGenerator.fs: Replace inlinematchCaseIdentParts+SynLongIdent.CreatewithGeneratorHelpers.resolveCaseIdentOriginal prompt
This section details on the original issue you should resolve
<issue_title>[Repo Assist] Monthly Activity 2026-03</issue_title>
<issue_description>🤖 Repo Assist here — I'm an automated AI assistant for this repository.
Activity for March 2026
Suggested Actions for Maintainer
Comprehensive list of all pending actions requiring maintainer attention:
filterTypeshelper to eliminate 5-fold duplication inAst.fs— closes Duplicate Code: Type-filtering pattern repeated 5 times in Ast.fs #249 — ReviewresolveCaseIdentto GeneratorHelpers — closes Duplicate Code:resolveCaseIdentLogic Duplicated Across DUCasesGenerator and LensesGenerator #244, Duplicate Code: Qualified Case Identifier Resolution in DUCasesGenerator and LensesGenerator #248, Duplicate Code: Qualified DU Case Name Resolution in LensesGenerator and DUCasesGenerator #251 — ReviewgenerateModuleshelper — eliminates remainingGenerateboilerplate — closes Duplicate Code:GenerateMethod Structure in DUCasesGenerator and FieldsGenerator #240, Duplicate Code: Structural Duplication inGenerateMethods of DUCasesGenerator and FieldsGenerator #242, Duplicate Code: Structural Duplication in Generate Method Across DUCasesGenerator and FieldsGenerator #246, relates to Duplicate Code: Namespace-filtered Type Extraction Pattern in FieldsGenerator and DUCasesGenerator #221 — Review[docs]Update documentation for infrastructure fixes from 2026-03-04 — Review0.85.0instead of0.8.5— tagv0.85should have beenv0.8.5; consider deprecating0.85.0and republishing as0.8.5— ViewresolveCaseIdentLogic Duplicated Across DUCasesGenerator and LensesGenerator #244, Duplicate Code: Structural Duplication inGenerateMethods of DUCasesGenerator and FieldsGenerator #242, Duplicate Code:GenerateMethod Structure in DUCasesGenerator and FieldsGenerator #240: Addressed by PRs [Repo Assist] Refactor: extract filterTypes helper to eliminate 5-fold duplication in Ast.fs — closes #249 #250 and [Repo Assist] Refactor: move resolveCaseIdent to GeneratorHelpers — closes #244 #245 and [Repo Assist] Refactor: extract generateModules helper to eliminate Generate boilerplate #241 respectively — close once PRs are mergedFuture Work for Repo Assist
FSharp.Core 9.0.101 → 10.0.103andFSharp.Compiler.Service 43.9.101 → 43.10.103(require .NET 10 SDK migration);Tomlyn 0.18 → 1.0.0(major bump, API compatibility check needed).0.8.5, updateCHANGELOG.mdnote and close issue FYI: released version is 0.85, not 0.8.5 #247.Run History
2026-03-11 10:06 UTC — Run
resolveCaseIdentLogic Duplicated Across DUCasesGenerator and LensesGenerator #244 and Duplicate Code: Qualified Case Identifier Resolution in DUCasesGenerator and LensesGenerator #248, pointed to PR [Repo Assist] Refactor: move resolveCaseIdent to GeneratorHelpers — closes #244 #245 which already addresses the issueduplicate2026-03-10 10:07 UTC — Run
filterTypeshelper to eliminate 5-fold duplication inAst.fs— closes Duplicate Code: Type-filtering pattern repeated 5 times in Ast.fs #2492026-03-09 10:11 UTC — Run
v0.85tag caused0.85.0package instead of0.8.5; suggested maintainer deprecate and republishbugenhancement,refactor2026-03-08 09:50 UTC — Run
GenerateMethod Structure in DUCasesGenerator and FieldsGenerator #240, pointed to PR MoiraeSoftwar...🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.