Fix #7931: Resolve opened namespaces for attributes in recursive scopes#19502
Draft
Fix #7931: Resolve opened namespaces for attributes in recursive scopes#19502
Conversation
Member
|
@copilot : Try again |
Copilot stopped work on behalf of
T-Gro due to an error
March 27, 2026 08:41
Member
|
@copilot : Try again. |
Copilot stopped work on behalf of
T-Gro due to an error
March 27, 2026 11:55
Member
|
@copilot Try again |
… element (#19464) Co-authored-by: abonie <20281641+abonie@users.noreply.github.com>
#19341) Co-authored-by: abonie <20281641+abonie@users.noreply.github.com>
Co-authored-by: abonie <20281641+abonie@users.noreply.github.com>
* Add Regression PR Shepherd agentic workflow Shepherds open AI-Issue-Regression-PR pull requests to completion: - Fixes CI failures and addresses review feedback - Detects when a test proves the bug still exists (removes label, tags maintainers) - Runs 6x/day, only touches tests/ files Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Add min-integrity: none * Add min-integrity: none Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: abonie <20281641+abonie@users.noreply.github.com>
…it, stricter labeling (#19499) - Enable create-pull-request and push-to-pull-request-branch for regression test PRs - Enable remove-labels for AI-thinks-issue-fixed and AI-thinks-windows-only - Add Task 2: Regression Test Verification with adversarial dispute step - Add Task 3: Systematic revisit of AI-thinks-windows-only claims - Reorder tasks: Task 1 → Task 3 → Task 2 → FINAL (Task 3 feeds into Task 2) - Strict windows-only rules with explicit FCS-testable feature list - Fix memory section to match actual state.json schema - Remove close-issue actions (closure happens via PR merge with Fixes link) - Fix stale references, contradictory instructions, date cutoff to 2024 - Clarify anti-spam rules for multi-task commenting Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: abonie <20281641+abonie@users.noreply.github.com>
…327.7 (#19512) On relative base path root Microsoft.DotNet.Arcade.Sdk From Version 10.0.0-beta.26168.1 -> To Version 10.0.0-beta.26177.7 Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com> Co-authored-by: abonie <20281641+abonie@users.noreply.github.com>
* Update dependencies from https://github.com/dotnet/msbuild build 20260324.4 On relative base path root Microsoft.Build , Microsoft.Build.Framework , Microsoft.Build.Tasks.Core , Microsoft.Build.Utilities.Core From Version 18.6.0-preview-26173-02 -> To Version 18.6.0-preview-26174-04 * Update dependencies from https://github.com/dotnet/msbuild build 20260325.1 On relative base path root Microsoft.Build , Microsoft.Build.Framework , Microsoft.Build.Tasks.Core , Microsoft.Build.Utilities.Core From Version 18.6.0-preview-26173-02 -> To Version 18.6.0-preview-26175-01 * Update dependencies from https://github.com/dotnet/msbuild build 20260326.1 On relative base path root Microsoft.Build , Microsoft.Build.Framework , Microsoft.Build.Tasks.Core , Microsoft.Build.Utilities.Core From Version 18.6.0-preview-26173-02 -> To Version 18.6.0-preview-26176-01 * Update dependencies from https://github.com/dotnet/msbuild build 20260327.2 On relative base path root Microsoft.Build , Microsoft.Build.Framework , Microsoft.Build.Tasks.Core , Microsoft.Build.Utilities.Core From Version 18.6.0-preview-26173-02 -> To Version 18.6.0-preview-26177-02 --------- Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com> Co-authored-by: abonie <20281641+abonie@users.noreply.github.com>
…f`1 (#19485) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: abonie <20281641+abonie@users.noreply.github.com>
…#19480) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: abonie <20281641+abonie@users.noreply.github.com>
* Add regression test for #13519: C# optional parameters from F# Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Add ParamArray + optional params regression test for #13519 Addresses reviewer feedback: the original issue was specifically about the intersection of omitted optional arguments and ParamArray arguments, as identified by Don Syme. This adds a test covering that exact scenario. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: abonie <20281641+abonie@users.noreply.github.com>
) * Add regression test for #6648: DU of DUs with inline static members Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Fix unclosed triple-quoted string in Issue 6648 regression test Add missing closing triple-quote and assertion pipeline to the DU of DUs with inline static members test. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: abonie <20281641+abonie@users.noreply.github.com>
) * Initial plan * Fix repo-assist: add safe output discipline, iteration limits, and noop fallback Root cause: Agent spent ~37 minutes creating ~25 test files across 5+ issues without calling any safe output MCP tools, resulting in empty agent_output.json. - Add "Safe Output Discipline" section with incremental output, noop fallback, 3-attempt iteration limit per issue, and time awareness rules - Task 1: call safe output tools immediately after each issue - Task 2: limit build-and-test cycles to 3 per issue, create PRs immediately, do not create multiple test file variants Agent-Logs-Url: https://github.com/dotnet/fsharp/sessions/cf589816-f234-44e2-9245-742907ee5d27 Co-authored-by: T-Gro <46543583+T-Gro@users.noreply.github.com> * Run gh aw upgrade and gh aw compile to regenerate lock files Updates gh-aw from v0.64.2 to v0.64.4: - Regenerate repo-assist.lock.yml with new frontmatter hash - Regenerate regression-pr-shepherd.lock.yml - Update actions-lock.json with new action SHAs - Update agentic-workflows.agent.md version references Agent-Logs-Url: https://github.com/dotnet/fsharp/sessions/0f6b9ce7-da31-403c-b633-6bb5f004484e Co-authored-by: T-Gro <46543583+T-Gro@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: T-Gro <46543583+T-Gro@users.noreply.github.com> Co-authored-by: Tomas Grosup <Tomas.Grosup@gmail.com> Co-authored-by: Adam Boniecki <20281641+abonie@users.noreply.github.com> Co-authored-by: abonie <20281641+abonie@users.noreply.github.com>
…0330.8 (#19525) On relative base path root Microsoft.Build , Microsoft.Build.Framework , Microsoft.Build.Tasks.Core , Microsoft.Build.Utilities.Core From Version 18.6.0-preview-26177-02 -> To Version 18.6.0-preview-26180-08 Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com> Co-authored-by: abonie <20281641+abonie@users.noreply.github.com>
…otnet-optimization build 20260330.1 (#19523) On relative base path root optimization.linux-arm64.MIBC.Runtime , optimization.linux-x64.MIBC.Runtime , optimization.windows_nt-arm64.MIBC.Runtime , optimization.windows_nt-x64.MIBC.Runtime , optimization.windows_nt-x86.MIBC.Runtime From Version 1.0.0-prerelease.26153.1 -> To Version 1.0.0-prerelease.26180.1 Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com> Co-authored-by: abonie <20281641+abonie@users.noreply.github.com>
* Add aw-auto-update workflow for daily gh aw upgrade/compile Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Update agentic workflows via gh aw upgrade (v0.64.2 → v0.64.4) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: abonie <20281641+abonie@users.noreply.github.com>
Pre-process open declarations before Phase1A attribute checking in recursive scopes (namespace rec / module rec). Previously, opens were only processed in Phase1AB after module entities were built, but module attributes needed access to opened namespaces during Phase1A. The fix adds preProcessOpensForPhase1A which silently resolves opens before Phase1A, making opened namespaces available for attribute resolution on modules and types in recursive scopes. Agent-Logs-Url: https://github.com/dotnet/fsharp/sessions/20a6e4bb-a5f1-45cc-b80d-ee1110cd8812 Co-authored-by: abonie <20281641+abonie@users.noreply.github.com>
Agent-Logs-Url: https://github.com/dotnet/fsharp/sessions/20a6e4bb-a5f1-45cc-b80d-ee1110cd8812 Co-authored-by: abonie <20281641+abonie@users.noreply.github.com>
Contributor
Author
Implemented the fix in commit Root cause: In recursive scopes ( Fix: Added |
Copilot
AI
changed the title
[WIP] Copilot Request
Fix #7931: Resolve opened namespaces for attributes in recursive scopes
Mar 31, 2026
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.
Description
Fixes nested module attributes not being resolved in
namespace rec/module recscopes. Previously, using[<Extension>]on a module insidenamespace recwould fail withFS0039: The type 'Extension' is not defined, even whenopen System.Runtime.CompilerServiceswas in scope.Root Cause
In recursive scopes, open declarations are processed in Phase1AB — after Phase1A builds module/type entities. But module attributes are checked during Phase1A using
envInitial, which doesn't yet include the opened namespaces. In non-recursive scopes, opens are processed sequentially before module attributes are checked, so this issue doesn't occur.Changes Made
src/Compiler/Checking/CheckDeclarations.fs: AddedpreProcessOpensForPhase1Ahelper that silently resolves open declarations before Phase1A attribute checking. UsessuppressErrorReportingandTemporarilySuspendReportingTypecheckResultsToSinkto avoid duplicate diagnostics (since opens are re-processed properly in Phase1AB). Applied at two levels:TcMutRecDefns_Phase1(fixesnamespace reccase)TcTyconDefnCore_Phase1A_BuildInitialModule(fixes nested module case)AttributeResolutionInRecursiveScopes.fscovering the issue scenarios (Extension attribute on modules/types innamespace rec, nested modules, multiple opens,module rec, and non-recursive baseline).docs/release-notes/.FSharp.Compiler.Service/11.0.100.md.Testing
📱 Kick off Copilot coding agent tasks wherever you are with GitHub Mobile, available on iOS and Android.