Skip to content

Comments

Fix FCS 43.10.103 API compatibility for UntypedAstUtils.fs to unblock CI#4169

Merged
AbhitejJohn merged 1 commit intodotnet:mainfrom
AbhitejJohn:fix/fcs-api-compat
Feb 18, 2026
Merged

Fix FCS 43.10.103 API compatibility for UntypedAstUtils.fs to unblock CI#4169
AbhitejJohn merged 1 commit intodotnet:mainfrom
AbhitejJohn:fix/fcs-api-compat

Conversation

@AbhitejJohn
Copy link
Contributor

CI is failing since build #20260211.6 with compilation errors in UntypedAstUtils.fs. The .NET SDK rolled forward to 10.0.103 which ships FCS 43.10.103 with breaking AST changes (LetOrUseBang/SynExprAndBang removed, NamePatPairField changed to record). This PR updates the FCS/FSharp.Core packages to 43.10.103/10.0.103, pins the SDK, and fixes the code.

- Update FSharp.Compiler.Service 43.10.100 -> 43.10.103
- Update FSharp.Core 10.0.100 -> 10.0.103
- Pin SDK to 10.0.103 with latestPatch rollForward
- Fix NamePatPairField: now a record type, use .Pattern property
- Remove dead SynExpr.LetOrUseBang/SynExprAndBang code (unified into SynExpr.LetOrUse)
@jonsequitur
Copy link
Contributor

Is this consistent with the latest FSAutoComplete code?

cc @Thorium

@Thorium
Copy link
Contributor

Thorium commented Feb 18, 2026

@TheAngryByrd
Copy link

Yeah FSharp.Compiler.Service makes binary incompatible changes to the AST consistently. It's something we just live with.

Is this consistent with the latest FSAutoComplete code?

As far as I know, the fork here has been out of sync with FsAutocomplete for a very long time. But we'll probably have to make the same change to patch in our repo.

@Thorium
Copy link
Contributor

Thorium commented Feb 18, 2026

@TheAngryByrd I did update the files from FSAutoComplete to this repo not-long-ago to get support for function signatures etc. #4080

@AbhitejJohn
Copy link
Contributor Author

@Thorium , @jonsequitur : Indeed, however the CI has been failing ever since with these errors:

D:\a\_work\1\s\src\Microsoft.DotNet.Interactive.FSharp\FsAutoComplete\UntypedAstUtils.fs(19,65): error FS0001: This expression was expected to have type�    'NamePatPairField'    �but here has type�    ''a * 'b * 'c' [D:\a\_work\1\s\src\Microsoft.DotNet.Interactive.FSharp\Microsoft.DotNet.Interactive.FSharp.fsproj]
D:\a\_work\1\s\src\Microsoft.DotNet.Interactive.FSharp\FsAutoComplete\UntypedAstUtils.fs(337,17): error FS0039: The constructor, module or namespace 'LetOrUseBang' is not defined. [D:\a\_work\1\s\src\Microsoft.DotNet.Interactive.FSharp\Microsoft.DotNet.Interactive.FSharp.fsproj]
D:\a\_work\1\s\src\Microsoft.DotNet.Interactive.FSharp\FsAutoComplete\UntypedAstUtils.fs(338,17): error FS0039: The value or constructor 'pat' is not defined. [D:\a\_work\1\s\src\Microsoft.DotNet.Interactive.FSharp\Microsoft.DotNet.Interactive.FSharp.fsproj]
D:\a\_work\1\s\src\Microsoft.DotNet.Interactive.FSharp\FsAutoComplete\UntypedAstUtils.fs(339,18): error FS0039: The value or constructor 'e1' is not defined. [D:\a\_work\1\s\src\Microsoft.DotNet.Interactive.FSharp\Microsoft.DotNet.Interactive.FSharp.fsproj]
D:\a\_work\1\s\src\Microsoft.DotNet.Interactive.FSharp\FsAutoComplete\UntypedAstUtils.fs(341,66): error FS0039: The value or constructor 'ands' is not defined. [D:\a\_work\1\s\src\Microsoft.DotNet.Interactive.FSharp\Microsoft.DotNet.Interactive.FSharp.fsproj]
D:\a\_work\1\s\src\Microsoft.DotNet.Interactive.FSharp\FsAutoComplete\UntypedAstUtils.fs(341,13): error FS0039: The pattern discriminator 'SynExprAndBang' is not defined. [D:\a\_work\1\s\src\Microsoft.DotNet.Interactive.FSharp\Microsoft.DotNet.Interactive.FSharp.fsproj]
D:\a\_work\1\s\src\Microsoft.DotNet.Interactive.FSharp\FsAutoComplete\UntypedAstUtils.fs(341,13): error FS0025: Incomplete pattern matches on this expression. Unmatched elements will be ignored. [D:\a\_work\1\s\src\Microsoft.DotNet.Interactive.FSharp\Microsoft.DotNet.Interactive.FSharp.fsproj]
D:\a\_work\1\s\src\Microsoft.DotNet.Interactive.FSharp\FsAutoComplete\UntypedAstUtils.fs(345,18): error FS0039: The value or constructor 'e2' is not defined. [D:\a\_work\1\s\src\Microsoft.DotNet.Interactive.FSharp\Microsoft.DotNet.Interactive.FSharp.fsproj]
    0 Warning(s)
    8 Error(s)

Here's a build link: https://dev.azure.com/dnceng-public/public/_build/results?buildId=1298378&view=logs&j=bb592630-4b9d-53ad-3960-d954a70a95cf&t=c2e030e7-0c13-5c98-0562-982c06e545f9.

Why the PR build passed for #4080 I'm not really sure yet. This change however is LLMs proposing a fix which seems to have unblocked the build. I'd love to get your thoughts on correctness though.

@AbhitejJohn AbhitejJohn changed the title Fix FCS 43.10.103 API compatibility for UntypedAstUtils.fs Fix FCS 43.10.103 API compatibility for UntypedAstUtils.fs to unblock CI Feb 18, 2026
@Thorium
Copy link
Contributor

Thorium commented Feb 18, 2026

The reason I pinged Jimmy is that I expect he'll need the same changes to FSAutoComplete soon as well.

@AbhitejJohn AbhitejJohn marked this pull request as ready for review February 18, 2026 19:16
@AbhitejJohn
Copy link
Contributor Author

@Thorium : Sounds good, I'm not super familiar with that integration. Would that mean we'd want to wait on those changes to be rolled out before we can merge this? Or is that independent of these updates?

@TheAngryByrd
Copy link

It's independent since FsAutocomplete here is essentially a fork. We'd just make the same changes when I get around to doing the updates.

@AbhitejJohn
Copy link
Contributor Author

Perfect, thanks. I'll go ahead and merge this then.

@AbhitejJohn AbhitejJohn merged commit 8f3ab9a into dotnet:main Feb 18, 2026
4 checks passed
@AbhitejJohn AbhitejJohn deleted the fix/fcs-api-compat branch February 18, 2026 23:35
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.

5 participants