Skip to content

FSharp.Compiler.Service 43.10.103#770

Open
Numpsy wants to merge 7 commits intofsprojects:masterfrom
Numpsy:fcs10
Open

FSharp.Compiler.Service 43.10.103#770
Numpsy wants to merge 7 commits intofsprojects:masterfrom
Numpsy:fcs10

Conversation

@Numpsy
Copy link
Contributor

@Numpsy Numpsy commented Oct 19, 2025

Just having a go at building it with the RC .NET 10 version to see if it all works.

List.revIter (Binding >> add) bindings
// let! or use!
| SynExpr.LetOrUse(_, _, _, true, bindings, leftHandSide, _, _) ->
match bindings with
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@Numpsy Numpsy force-pushed the fcs10 branch 2 times, most recently from e5c21fc to 032f006 Compare November 3, 2025 22:10
@Numpsy Numpsy force-pushed the fcs10 branch 3 times, most recently from 6b9014d to 6ab840a Compare November 11, 2025 16:16
@Numpsy
Copy link
Contributor Author

Numpsy commented Nov 11, 2025

Not sure why the docs build failed with the build using the RTM FCS 43.10 when it worked with the RC2 version

@Numpsy
Copy link
Contributor Author

Numpsy commented Nov 11, 2025

Or is that just because the CI has started installing .NET 10 on it's own when it didn't this morning?

image

Apparently the use-dotnet action always installs the latest version now, which is .NET 10 as of earlier today - actions/setup-dotnet#674

@knocte
Copy link
Collaborator

knocte commented Nov 12, 2025

@Numpsy you're right, our daily CI run has started to fail today. Maybe setup-dotnet doesn't honor with: global-json-file: global.json properly anymore? We need to fix/workaround this in case that 674 issue is not fixed.

@knocte
Copy link
Collaborator

knocte commented Nov 12, 2025

@Numpsy actually, I don't think it's a bug in setup-dotnet action because all other CI jobs work except the docs one. So maybe it's a bug in Fornax? Fornax not honoring global.json?

@Numpsy
Copy link
Contributor Author

Numpsy commented Nov 12, 2025

It sounds like it's running with the .NET 9 SDK but trying to build as .NET 10 for some reason? (though the error shows the 9.0.306 SDK, and global.json is 9.0.201).
Not sure what's going on there at the moment, I didn't see that error when I built it locally (on Windows)

@Numpsy
Copy link
Contributor Author

Numpsy commented Nov 12, 2025

@Numpsy actually, I don't think it's a bug in setup-dotnet action because all other CI jobs work except the docs one. So maybe it's a bug in Fornax? Fornax not honoring global.json?

There does seem to be some machinery at https://github.com/ionide/Fornax/blob/master/src/Fornax/FSIRefs.fs for fishing for runtime libraries, so maybe you're right there and something is going wrong with .NET 10

@Numpsy
Copy link
Contributor Author

Numpsy commented Nov 12, 2025

I tried changing the CI to actually run as .NET 10 and that fails with a type check error in the build script - https://github.com/Numpsy/FSharpLint/actions/runs/19300021169/job/55193408198#step:7:12

Nothing can ever be simple :-(

@knocte knocte changed the title [Testing] FSharp.Compiler.Service 43.10 [Testing] FSharp.Compiler.Service 43.10.100 Jan 5, 2026
@knocte
Copy link
Collaborator

knocte commented Jan 6, 2026

Temporarily disable lint warning about expressionChildren() being too long

Hey @Numpsy I probably managed to fix the above problem with this commit from my fork: knocte@3cc0a65 can you include it in this PR and rebase?

@Numpsy
Copy link
Contributor Author

Numpsy commented Jan 6, 2026

I'll have a look later

@Numpsy Numpsy force-pushed the fcs10 branch 2 times, most recently from dc7abab to 8bf0fa8 Compare January 11, 2026 11:00
fieldPats
|> List.map (fun ((_, fieldIdent), _, _) -> fieldIdent.idRange)
|> List.map (fun patPairField -> patPairField.Range)
// @@TODO@@ Do we need to look at the ranges inside FieldName here?
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Any comments on this one?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Not sure TBH, but if unit tests pass without looking at the ranges, then I wouldn't oppose merging this PR before we investigate this. That said, if you can come up with a unit test that can exercise this code, then I'd sleep better. BTW, I'm aiming to merge this PR when FCS 43.10.103 gets released (because that version will contain a fix which now is only in their master branch).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ok.
FWIW, 43.10.102 seems to work without any further code changes.

@Numpsy Numpsy changed the title [Testing] FSharp.Compiler.Service 43.10.100 FSharp.Compiler.Service 43.10.100 Jan 18, 2026
@Numpsy Numpsy marked this pull request as ready for review January 18, 2026 11:28
@Numpsy Numpsy force-pushed the fcs10 branch 2 times, most recently from d1cadc0 to aaba91d Compare February 5, 2026 22:19
@Numpsy Numpsy changed the title FSharp.Compiler.Service 43.10.100 FSharp.Compiler.Service 43.10.103 Feb 10, 2026
@knocte
Copy link
Collaborator

knocte commented Feb 11, 2026

@Numpsy thanks for keeping an eye on FCS versions! I was glad today when I saw your .103 commit, however:

  • That build is taking ages, do we have a perf regression?
  • Unfortunately the .103 tag's last commit is still 2 months ago :'( which means it doesn't include the fix we want.

@Numpsy
Copy link
Contributor Author

Numpsy commented Feb 11, 2026

I was just trying to have a look at that :-(

The build at https://github.com/fsprojects/FSharpLint/actions/runs/21730690753 used 43.10.100 and ran in the usual amount of time.

The build at https://github.com/fsprojects/FSharpLint/actions/runs/21876176125 which was also 43.10.100 but rebased on top of #841 was terribly slow at running the self-lint

The only local change in here between those two was this one

image

So it doesn't seem like FCS 10 on its own caused an issue, but it looks like there's some bad interaction between that and the other recent changes

@Numpsy
Copy link
Contributor Author

Numpsy commented Feb 11, 2026

I ran the latest code on a profiler and got this:

image

Which I guess is coming from https://github.com/webwarrior-ws/FSharpLint/blob/c378757ad49d9a0c9eedbf228ced722245643978/src/FSharpLint.Core/Rules/Conventions/Naming/AsynchronousFunctionNames.fs#L36 which was recently added?

With the current FCS9 it gets this, which is still a hotspot in the same place, but doesn't take nearly as much time

image

I've seen a number of bugs raised in the F# repo about this cache stuff causing performance issues of which some are fixed and some which aren't, though I'm sure I've read of issues elsewhere related to getting those project contexts lots of times but I can't recall the details.

@Numpsy
Copy link
Contributor Author

Numpsy commented Feb 11, 2026

Would something like Numpsy@11e75ec where it only creates the ProjectOptions once help?

Ci build for that - https://github.com/Numpsy/FSharpLint/actions/runs/21925277621

That's a bit more like how it's done in the analyzers sdk, where the checker results and the project options are both passed down from the top - https://github.com/ionide/FSharp.Analyzers.SDK/blob/294cae109f63a585c35a6e3e2f196358e248371e/src/FSharp.Analyzers.SDK/FSharp.Analyzers.SDK.fsi#L106

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