Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fsdk: fix build #40

Merged
merged 2 commits into from
Feb 19, 2024
Merged

Fsdk: fix build #40

merged 2 commits into from
Feb 19, 2024

Conversation

knocte
Copy link
Member

@knocte knocte commented Feb 16, 2024

Somehow, the macOS--dotnet6-and-mono and
linux-*-github--dotnet-* CI lanes started failing with this compiler error:

/home/runner/work/fsx/fsx/Fsdk/Process.fs(22,31): error FS0041: No overloads match for method 'Read'.

Known type of argument: int ref

Available overloads:
 - Volatile.Read(location: inref<bool>) : bool // Argument 'location' doesn't match
 - Volatile.Read(location: inref<byte>) : byte // Argument 'location' doesn't match
 - Volatile.Read(location: inref<float32>) : float32 // Argument 'location' doesn't match
 - Volatile.Read(location: inref<float>) : float // Argument 'location' doesn't match
 - Volatile.Read(location: inref<int16>) : int16 // Argument 'location' doesn't match
 - Volatile.Read(location: inref<int64>) : int64 // Argument 'location' doesn't match
 - Volatile.Read(location: inref<int>) : int // Argument 'location' doesn't match
 - Volatile.Read(location: inref<nativeint>) : nativeint // Argument 'location' doesn't match
 - Volatile.Read(location: inref<sbyte>) : sbyte // Argument 'location' doesn't match
 - Volatile.Read(location: inref<uint16>) : uint16 // Argument 'location' doesn't match
 - Volatile.Read(location: inref<uint32>) : uint32 // Argument 'location' doesn't match
 - Volatile.Read(location: inref<uint64>) : uint64 // Argument 'location' doesn't match
 - Volatile.Read(location: inref<unativeint>) : unativeint // Argument 'location' doesn't match
 - Volatile.Read<'T when 'T: not struct>(location: inref<'T>) : 'T // Argument 'location' doesn't match

Which makes me think that they are upgrading to newer .NET versions instead of being pinned...

The build fix works but not sure it's correct at runtime TBH. We will see when we start using the new version of Fsdk nuget package soon...

Somehow, the 'macOS--dotnet6-and-mono' and
'linux-*-github--dotnet-*' CI lanes started failing with
this compiler error:

```
/home/runner/work/fsx/fsx/Fsdk/Process.fs(22,31): error FS0041: No overloads match for method 'Read'.

Known type of argument: int ref

Available overloads:
 - Volatile.Read(location: inref<bool>) : bool // Argument 'location' doesn't match
 - Volatile.Read(location: inref<byte>) : byte // Argument 'location' doesn't match
 - Volatile.Read(location: inref<float32>) : float32 // Argument 'location' doesn't match
 - Volatile.Read(location: inref<float>) : float // Argument 'location' doesn't match
 - Volatile.Read(location: inref<int16>) : int16 // Argument 'location' doesn't match
 - Volatile.Read(location: inref<int64>) : int64 // Argument 'location' doesn't match
 - Volatile.Read(location: inref<int>) : int // Argument 'location' doesn't match
 - Volatile.Read(location: inref<nativeint>) : nativeint // Argument 'location' doesn't match
 - Volatile.Read(location: inref<sbyte>) : sbyte // Argument 'location' doesn't match
 - Volatile.Read(location: inref<uint16>) : uint16 // Argument 'location' doesn't match
 - Volatile.Read(location: inref<uint32>) : uint32 // Argument 'location' doesn't match
 - Volatile.Read(location: inref<uint64>) : uint64 // Argument 'location' doesn't match
 - Volatile.Read(location: inref<unativeint>) : unativeint // Argument 'location' doesn't match
 - Volatile.Read<'T when 'T: not struct>(location: inref<'T>) : 'T // Argument 'location' doesn't match
```

Which makes me think that they are upgrading to newer
.NET versions instead of being pinned...

The build fix works but not sure it's correct at runtime
TBH. We will see when we start using the new version of
Fsdk nuget package soon...
@knocte
Copy link
Member Author

knocte commented Feb 17, 2024

Upstream bug is 16524 in dotnet/fsharp; and looking at a referenced PR from it, it looks like this PR as it is currently might not be the best fix.

According to @vlza (nickname in F#'s discord) this should work
(see previous commit to see the build fix, but non-thread-safe
approach).
@knocte knocte force-pushed the wip/fixVolatileBuild branch from bd23c55 to f3b6785 Compare February 19, 2024 11:39
@knocte knocte merged commit 29521ed into master Feb 19, 2024
30 checks passed
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.

1 participant