Skip to content

Conversation

@Numpsy
Copy link
Contributor

@Numpsy Numpsy commented Nov 12, 2025

Just an attempt at seeing if it works, still not sure what's causing the current CI failures.

This did require a couple of other changes to get it to build though - see other comments

iIndex + child < nodeArray.Length &&
jIndex + child < nodeArray.Length &&
nodeArray.[iIndex + child].Hashcode = nodeArray.[jIndex + child].Hashcode) { 0..numChildren }
nodeArray.[iIndex + child].Hashcode = nodeArray.[jIndex + child].Hashcode) (seq { 0..numChildren })
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is to fix a deprecation warning that happens when building the current code with .NET 10

/home/runner/work/FSharpLint/FSharpLint/src/FSharpLint.Core/Rules/Hints/HintsHelper.fs(34,88): error FS3873: This construct is deprecated. Sequence expressions should be of the form 'seq { ... }' [/home/runner/work/FSharpLint/FSharpLint/src/FSharpLint.Core/FSharpLint.Core.fsproj::TargetFramework=net9.0]

for pair in jsonObj.AsObject() do
if pair.Value.GetValueKind() = Text.Json.JsonValueKind.Object then
match pair.Value.AsObject().TryGetPropertyValue("enabled") with
let result, isRule = pair.Value.AsObject().TryGetPropertyValue("enabled")
Copy link
Contributor Author

Choose a reason for hiding this comment

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

System.Text.Json v10 has two different overloads of TryGetPropertyValue, and the existing code here can't work out which one to call
image

@knocte
Copy link
Collaborator

knocte commented Nov 12, 2025

@Numpsy thanks, do you know if this generates docs properly? I could merge this tomorrow and make a release.

@knocte
Copy link
Collaborator

knocte commented Nov 12, 2025

I could merge this tomorrow and make a release.

(But for that, the PR needs to be non-draft.)

@knocte knocte mentioned this pull request Nov 13, 2025
@Numpsy
Copy link
Contributor Author

Numpsy commented Nov 13, 2025

The docs built ok. I'll have a look at my local build to see what they look like.

Actually, as it stands, just removing the install-dotnet step from the documentation CI and letting it use the already installed .NET 9 seems to work -
Numpsy@449850b
https://github.com/Numpsy/FSharpLint/actions/runs/19325908115

Though that might change when 10 is installed on the build agents by default.

@Numpsy Numpsy marked this pull request as ready for review November 13, 2025 09:30
@knocte
Copy link
Collaborator

knocte commented Nov 13, 2025

just removing the install-dotnet step from the documentation CI

Then how about a PR that removes the install-dotnet step from all jobs?

Though that might change when 10 is installed on the build agents by default.

Let's cross that bridge when we arrive to it?

@knocte
Copy link
Collaborator

knocte commented Nov 13, 2025

letting it use the already installed .NET 9 seems to work -

Or we should just update our global.json to the same version .NET9 that is installed by default? This way maybe all jobs work without changes.

@knocte
Copy link
Collaborator

knocte commented Nov 13, 2025

Then how about a PR that removes the install-dotnet step from all jobs?

I tested this, and it worked! So I think I'll merge this change, so long as you don't have any objections (I know it might make CI easily fail in the future, but I think we can revisit it when that happens).

And in case you agree and I merge that, you could still maintain this PR for the fs/fsx changes (rebasing it), which still seem to be desirable to be prepared for .NET10 moving forward.

@Numpsy
Copy link
Contributor Author

Numpsy commented Nov 13, 2025

That's fine with me.

@knocte
Copy link
Collaborator

knocte commented Nov 13, 2025

Small tweak to my comment above: removing all setup-dotnet steps works, so long as I also upgrade global.json to the last 9.x version (9.0.306).

@Numpsy
Copy link
Contributor Author

Numpsy commented Nov 13, 2025

Was there a reason for global.json to disable roll forward rather than using the latest 9.0.x ?

@knocte
Copy link
Collaborator

knocte commented Nov 13, 2025

Don't ask me that haha! You're the author of that line according to git-blame hehe:

b173d9f4a76fcb6f6e95f3d4ef9466abb99492e4

And seems you forgot to mention why in the commit msg?

@knocte
Copy link
Collaborator

knocte commented Nov 13, 2025

Oops, I just found the PR that this b173 commit belongs to, and it was a squash of many changes, some which might have not been pushed by you (that's why I'm not a fan of squashing PRs that have more than 1 commit).

@Numpsy
Copy link
Contributor Author

Numpsy commented Nov 13, 2025

Reading the comments in #736 reminded me - It might have been hitting a bug in the 9.0.300 SDK and was pinned to the old version beacuse of that.

So, maybe that's not an issue any more with the latest v9 SDK?

@knocte
Copy link
Collaborator

knocte commented Nov 13, 2025

That's fine with me.

Ok this is ready: #780

So, maybe that's not an issue any more with the latest v9 SDK?

Let's see, CI running: https://github.com/knocte/FSharpLint/commits/wip/fixDocsCiBuildErrorByReenablingRollforward/

@Numpsy Numpsy changed the title Try running the Fornax documentation build with .NET 10 Fix build failures when building with the .NET 10 SDK Nov 13, 2025
@Numpsy
Copy link
Contributor Author

Numpsy commented Nov 13, 2025

Ok, I've updated this one to just contain the two code changes I needed to get it to build with the .NET 10 SDK

@knocte
Copy link
Collaborator

knocte commented Nov 14, 2025

Ok thanks, will merge after a new release is pushed.

BTW, this morning scheduled CI was broken again T_T but FYI thankfully the rollforward change fixed it this time.

System.Text.Json v10 has two different overloads of TryGetPropertyValue and the existing code can't work out which one to use, so tweak it so that it builds.
The changed code still works when build with .NET 9
The .NET 10 compiler wamts sequence literals to exlpicitly use seq{}
@knocte
Copy link
Collaborator

knocte commented Nov 20, 2025

Merged manually (but attributing proper authorship of commits), thanks @Numpsy!

@Numpsy Numpsy deleted the hmm branch November 30, 2025 19:19
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