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: set token in more places #18283

Merged
merged 5 commits into from
Feb 3, 2025

Conversation

auduchinok
Copy link
Member

Fixes #18278.

I do agree that a more general approach would be better, but for now I'd like to fix the places where our asserts are triggering. It also helps to see different places we'll need to take into account when something like cancellableTask exists.

Copy link
Contributor

github-actions bot commented Jan 29, 2025

❗ 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.300.md

@auduchinok auduchinok force-pushed the cancellable-setToken branch from a51a17e to 3e8fe33 Compare January 30, 2025 10:00
@auduchinok
Copy link
Member Author

What is the proper way to update the ILVerify tests?

I've tried to run ./tests/ILVerify/ilverify.ps1 in PowerShell, but got this:

PS C:\Developer\fsharp> .\tests\ILVerify\ilverify.ps1
Checking whether running on Windows:
Repository path: fsharp
ILVerify version:
9.0.0-rtm.24528.9+9d5a6a9aa463d6d10b0b0ba6d5982cc82f363dc3
Building Debug configuration...
& : The module 'fsharp' could not be loaded. For more information, run 'Import-Module fsharp'.
At C:\Developer\fsharp\tests\ILVerify\ilverify.ps1:41 char:7
+     & $script -c $configuration $additional_arguments
+       ~~~~~~~
    + CategoryInfo          : ObjectNotFound: (fsharp\build.sh:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CouldNotAutoLoadModule

Building Release configuration...
& : The module 'fsharp' could not be loaded. For more information, run 'Import-Module fsharp'.
At C:\Developer\fsharp\tests\ILVerify\ilverify.ps1:41 char:7
+     & $script -c $configuration $additional_arguments
+       ~~~~~~~
    + CategoryInfo          : ObjectNotFound: (fsharp\build.sh:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CouldNotAutoLoadModule

Checking if dotnet-ilverify is installed...
 dotnet-ilverify is installed:
  dotnet-ilverify      9.0.2-servicing.25065.18      ilverify
Found the following runtimes:
 Microsoft.NETCore.App 8.0.11 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
 Microsoft.NETCore.App 8.0.12 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
 Microsoft.NETCore.App 9.0.0 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
 Microsoft.NETCore.App 9.0.1 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
 Selected runtime:
  Microsoft.NETCore.App 9.0.1 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
 Using the following path to runtime:
  C:\Program Files\dotnet\shared\Microsoft.NETCore.App/9.0.1
DLL not found: fsharp\artifacts\bin/FSharp.Core/Debug/netstandard2.0/FSharp.Core.dll

The FSharp.Core.dll file does exist in that location.

Also, could we somehow make it work in other shells? bash can be used successfully for all other FCS work.

@psfinaki
Copy link
Member

@auduchinok so at least for Windows, this should run in the PowerShell 7. Since many people have had a hiccup here, I agree this should be improved...

@auduchinok
Copy link
Member Author

@psfinaki I've installed another PowerShell version, but it did not help:

PS C:\Users\Eugene.Auduchinok> pwsh --version
PowerShell 7.5.0
PS C:\Users\Eugene.Auduchinok> cd C:\Developer\fsharp\tests\ILVerify
PS C:\Developer\fsharp\tests\ILVerify> .\ilverify.ps1
Checking whether running on Windows:
Repository path: fsharp
ILVerify version:
9.0.0-rtm.24528.9+9d5a6a9aa463d6d10b0b0ba6d5982cc82f363dc3
Building Debug configuration...
& : The module 'fsharp' could not be loaded. For more information, run 'Import-Module fsharp'.
At C:\Developer\fsharp\tests\ILVerify\ilverify.ps1:41 char:7
+     & $script -c $configuration $additional_arguments
+       ~~~~~~~
    + CategoryInfo          : ObjectNotFound: (fsharp\build.sh:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CouldNotAutoLoadModule

Building Release configuration...
& : The module 'fsharp' could not be loaded. For more information, run 'Import-Module fsharp'.
At C:\Developer\fsharp\tests\ILVerify\ilverify.ps1:41 char:7
+     & $script -c $configuration $additional_arguments
+       ~~~~~~~
    + CategoryInfo          : ObjectNotFound: (fsharp\build.sh:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CouldNotAutoLoadModule

Checking if dotnet-ilverify is installed...
 dotnet-ilverify is installed:
  dotnet-ilverify      9.0.2-servicing.25065.18      ilverify
Found the following runtimes:
 Microsoft.NETCore.App 8.0.11 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
 Microsoft.NETCore.App 8.0.12 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
 Microsoft.NETCore.App 9.0.0 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
 Microsoft.NETCore.App 9.0.1 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
 Selected runtime:
  Microsoft.NETCore.App 9.0.1 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
 Using the following path to runtime:
  C:\Program Files\dotnet\shared\Microsoft.NETCore.App/9.0.1
DLL not found: fsharp\artifacts\bin/FSharp.Core/Debug/netstandard2.0/FSharp.Core.dll
PS C:\Developer\fsharp\tests\ILVerify>

The dll still exists.

@majocha
Copy link
Contributor

majocha commented Jan 30, 2025

Repository path: fsharp looks wrong. On windows it is e.g. : Repository path: E:\repos\fsharp
Then the script tries to execute fsharp\build.sh and fails because the path is relative and should be absolute.

@auduchinok
Copy link
Member Author

Could someone please take a look? 🙂

Copy link
Member

@psfinaki psfinaki left a comment

Choose a reason for hiding this comment

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

Thanks @auduchinok - I've updated the baselines.

@0101 0101 merged commit 4583331 into dotnet:main Feb 3, 2025
33 checks passed
@auduchinok auduchinok deleted the cancellable-setToken branch February 4, 2025 12:25
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.

Non-cancellable metadata access when importing a DLL
4 participants