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

Cancellable: add safer APIs to check the token #18175

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

auduchinok
Copy link
Member

There're cases where reading an assembly metadata may happen outside of the type checking routine. For example, computing code completion suggestions or Parameter Info signature may trigger reading of types that haven't been imported during the checking. We want to be able to check if the metadata reading is happening inside a Cancellable context and to check for interruptions in a safer way.

@auduchinok auduchinok requested a review from a team as a code owner December 23, 2024 16:32
Copy link
Contributor

github-actions bot commented Dec 23, 2024

❗ Release notes required


✅ Found changes and release notes in following paths:

Change path Release notes path Description
src/Compiler docs/release-notes/.FSharp.Compiler.Service/9.0.200.md

@auduchinok
Copy link
Member Author

auduchinok commented Dec 23, 2024

There's a failing test in the macOS run:

FSharp.Compiler.Service.Tests.BuildGraphTests.Many requests to get a value asynchronously might evaluate the computation more than once even when some requests get canceled

It doesn't seem related to the changes in this PR.

@auduchinok auduchinok closed this Dec 23, 2024
@auduchinok auduchinok reopened this Dec 23, 2024
@majocha
Copy link
Contributor

majocha commented Dec 23, 2024

There's a failing test in the macOS run:

FSharp.Compiler.Service.Tests.BuildGraphTests.Many requests to get a value asynchronously might evaluate the computation more than once even when some requests get canceled

It doesn't seem related to the changes in this PR.

Yes, unrelated: #18115

@auduchinok auduchinok closed this Dec 23, 2024
@auduchinok auduchinok reopened this Dec 23, 2024
@auduchinok
Copy link
Member Author

auduchinok commented Dec 24, 2024

Another unrelated failure:

/Users/runner/hostedtoolcache/dotnet/sdk/9.0.100/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.targets(417,5): error MSB4018: The "GenerateRuntimeConfigurationFiles" task failed unexpectedly. [/Users/runner/work/1/s/buildtools/fslex/fslex.fsproj]
/Users/runner/hostedtoolcache/dotnet/sdk/9.0.100/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.targets(417,5): error MSB4018: System.IO.IOException: The process cannot access the file '/Users/runner/work/1/s/artifacts/bin/fslex/Debug/net9.0/osx-x64/fslex.runtimeconfig.json' because it is being used by another process. [/Users/runner/work/1/s/buildtools/fslex/fslex.fsproj]
/Users/runner/hostedtoolcache/dotnet/sdk/9.0.100/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.targets(417,5): error MSB4018:    at Microsoft.Win32.SafeHandles.SafeFileHandle.Init(String path, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize, Int64& fileLength, UnixFileMode& filePermissions) [/Users/runner/work/1/s/buildtools/fslex/fslex.fsproj]
/Users/runner/hostedtoolcache/dotnet/sdk/9.0.100/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.targets(417,5): error MSB4018:    at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize, UnixFileMode openPermissions, Int64& fileLength, UnixFileMode& filePermissions, Boolean failForSymlink, Boolean& wasSymlink, Func`4 createOpenException) [/Users/runner/work/1/s/buildtools/fslex/fslex.fsproj]
/Users/runner/hostedtoolcache/dotnet/sdk/9.0.100/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.targets(417,5): error MSB4018:    at System.IO.Strategies.OSFileStreamStrategy..ctor(String path, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize, Nullable`1 unixCreateMode) [/Users/runner/work/1/s/buildtools/fslex/fslex.fsproj]
/Users/runner/hostedtoolcache/dotnet/sdk/9.0.100/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.targets(417,5): error MSB4018:    at System.IO.File.Create(String path) [/Users/runner/work/1/s/buildtools/fslex/fslex.fsproj]
/Users/runner/hostedtoolcache/dotnet/sdk/9.0.100/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.targets(417,5): error MSB4018:    at Microsoft.NET.Build.Tasks.GenerateRuntimeConfigurationFiles.WriteToJsonFile(String fileName, Object value) [/Users/runner/work/1/s/buildtools/fslex/fslex.fsproj]
/Users/runner/hostedtoolcache/dotnet/sdk/9.0.100/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.targets(417,5): error MSB4018:    at Microsoft.NET.Build.Tasks.GenerateRuntimeConfigurationFiles.WriteRuntimeConfig(RuntimeFramework[] runtimeFrameworks, LockFileTargetLibrary platformLibrary, Boolean isFrameworkDependent, IList`1 packageFolders) [/Users/runner/work/1/s/buildtools/fslex/fslex.fsproj]
/Users/runner/hostedtoolcache/dotnet/sdk/9.0.100/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.targets(417,5): error MSB4018:    at Microsoft.NET.Build.Tasks.GenerateRuntimeConfigurationFiles.ExecuteCore() [/Users/runner/work/1/s/buildtools/fslex/fslex.fsproj]
/Users/runner/hostedtoolcache/dotnet/sdk/9.0.100/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.targets(417,5): error MSB4018:    at Microsoft.NET.Build.Tasks.TaskBase.Execute() [/Users/runner/work/1/s/buildtools/fslex/fslex.fsproj]
/Users/runner/hostedtoolcache/dotnet/sdk/9.0.100/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.targets(417,5): error MSB4018:    at Microsoft.Build.BackEnd.TaskExecutionHost.Execute() [/Users/runner/work/1/s/buildtools/fslex/fslex.fsproj]
/Users/runner/hostedtoolcache/dotnet/sdk/9.0.100/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.targets(417,5): error MSB4018:    at Microsoft.Build.BackEnd.TaskBuilder.ExecuteInstantiatedTask(TaskExecutionHost taskExecutionHost, TaskLoggingContext taskLoggingContext, TaskHost taskHost, ItemBucket bucket, TaskExecutionMode howToExecuteTask) [/Users/runner/work/1/s/buildtools/fslex/fslex.fsproj]
    0 Warning(s)
    1 Error(s)

@auduchinok auduchinok closed this Dec 24, 2024
Copy link
Contributor

@auduchinok auduchinok reopened this Dec 24, 2024
@auduchinok
Copy link
Member Author

It's green now 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants