Add warning FS3885 for let-in with multi-line body in sequence expressions#19501
Draft
Add warning FS3885 for let-in with multi-line body in sequence expressions#19501
Conversation
Member
|
@copilot : Try again |
Copilot stopped work on behalf of
T-Gro due to an error
March 27, 2026 08:44
Member
|
@copilot : Try again. |
Copilot stopped work on behalf of
T-Gro due to an error
March 27, 2026 11:53
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>
…sions Agent-Logs-Url: https://github.com/dotnet/fsharp/sessions/740bb677-5347-48ad-9001-278dfc1631e3 Co-authored-by: abonie <20281641+abonie@users.noreply.github.com>
Agent-Logs-Url: https://github.com/dotnet/fsharp/sessions/740bb677-5347-48ad-9001-278dfc1631e3 Co-authored-by: abonie <20281641+abonie@users.noreply.github.com>
Contributor
Author
Implemented in 4c00982 and 6259b63. Added warning FS3885 (gated behind Changes:
All 520 ErrorMessages tests and 630 BasicGrammar tests pass. |
Copilot
AI
changed the title
[WIP] Copilot Request
Add warning FS3885 for let-in with multi-line body in sequence expressions
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.
Addresses the long-standing issue where
let ... inwith an explicitinkeyword in indentation-sensitive F# code causes the parser to greedily capture all subsequent lines as part of theletbody, leading to unexpected scoping behavior.Following @dsyme's guidance to raise warnings for this formulation, this PR adds a new compiler warning FS3885 gated behind
LanguageFeature.WarnOnLetInSequenceExpression(F# 11.0).Problem
The parser creates
LetOrUse(let x = 1, Sequential(x + 1, x))instead of the expectedSequential(LetOrUse(let x = 1, x + 1), x), causingxon the second line to resolve to the local binding rather than the outer scope.Changes Made
LanguageFeature.WarnOnLetInSequenceExpressioninLanguageFeatures.fs/fsi, gated at F# 11.0FSComp.txtthat fires whenlet ... inwith an explicitinkeyword has aSequentialbody extending past theinkeyword's lineCheckExpressions.fs, checkstrivia.InKeyword = Some inRangeand whether the continuation expression starts on a later line than theinkeywordWarnExpressionTests.fscovering warning indoblocks, function bodies, no false positives for single-line usage, and no warning on older language versions11.0.100.mdTesting
💬 Send tasks to Copilot coding agent from Slack and Teams to turn conversations into code. Copilot posts an update in your thread when it's finished.