Skip to content

Conversation

@dsyme
Copy link
Contributor

@dsyme dsyme commented Jan 11, 2019

The "debug" versions of everything were busted - FSharp.Core and FSharp.Compiler.{Service,Private} always need to take tailcalls.

@dsyme
Copy link
Contributor Author

dsyme commented Jan 11, 2019

After

build vs debug

and opening VisualFSharp.sln, I am now seeing this in the VS debug trace.

System.IO.FileNotFoundException: Could not find file 'C:\GitHub\dsyme\visualfsharp2\artifacts\bin\FSharp.Core\Debug\netstandard1.6\FSharp.Core.dll'.

I assume a build coreclr will solve it but I thought I'd mention it here

Exception thrown: 'System.IO.FileNotFoundException' in Microsoft.CodeAnalysis.Workspaces.dll
---- DEBUG ASSERTION FAILED ----
---- Assert Short Message ----
Unexpected exception seen in language service
---- Assert Long Message ----
System.IO.FileNotFoundException: Could not find file 'C:\GitHub\dsyme\visualfsharp2\artifacts\bin\FSharp.Core\Debug\netstandard1.6\FSharp.Core.dll'.
File name: 'C:\GitHub\dsyme\visualfsharp2\artifacts\bin\FSharp.Core\Debug\netstandard1.6\FSharp.Core.dll'
   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
   at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share)
   at Roslyn.Utilities.FileUtilities.OpenRead(String fullPath)
   at Microsoft.VisualStudio.LanguageServices.Implementation.ProjectSystem.VisualStudioMetadataReferenceManager.GetStorageInfoFromTemporaryStorage(FileKey moduleFileKey, ITemporaryStreamStorage& storage, Stream& stream, IntPtr& pImage)
   at Microsoft.VisualStudio.LanguageServices.Implementation.ProjectSystem.VisualStudioMetadataReferenceManager.CreateModuleMetadataFromTemporaryStorage(FileKey moduleFileKey, List`1 storages)
   at Microsoft.VisualStudio.LanguageServices.Implementation.ProjectSystem.VisualStudioMetadataReferenceManager.CreateAssemblyMetadataFromTemporaryStorage(FileKey fileKey, List`1 storages)
   at Microsoft.VisualStudio.LanguageServices.Implementation.ProjectSystem.VisualStudioMetadataReferenceManager.GetMetadata(String fullPath, DateTime snapshotTimestamp)
   at Microsoft.VisualStudio.FSharp.Editor.FSharpCheckerProvider.tryGetMetadataSnapshot(String path, DateTime timeStamp)
   at Microsoft.VisualStudio.FSharp.Editor.Assert.Exception(Exception e)
   at Microsoft.VisualStudio.FSharp.Editor.FSharpCheckerProvider.tryGetMetadataSnapshot(String path, DateTime timeStamp)
   at <StartupCode$FSharp-Editor>.$FSharpCheckerProvider.checker@63.Invoke(Tuple`2 tupledArg)
   at Microsoft.FSharp.Compiler.AbstractIL.ILBinaryReader.OpenILModuleReader(String fileName, ILReaderOptions opts)
   at Microsoft.FSharp.Compiler.AbstractIL.ILBinaryReader.Shim.DefaultAssemblyReader.Microsoft-FSharp-Compiler-AbstractIL-ILBinaryReader-Shim-IAssemblyReader-GetILModuleReader(String filename, ILReaderOptions readerOptions)
   at Microsoft.FSharp.Compiler.CompileOps.TcConfig..ctor(TcConfigBuilder data, Boolean validate)
   at Microsoft.FSharp.Compiler.CompileOps.TcConfig.Create(TcConfigBuilder builder, Boolean validate)
   at <StartupCode$FSharp-Compiler-Private>.$IncrementalBuild.TryCreateBackgroundBuilderForProjectOptions@1802-7.Invoke(Unit unitVar)
   at Microsoft.FSharp.Compiler.AbstractIL.Internal.Library.CancellableModule.delay@702.Invoke(CancellationToken ct)
   at Microsoft.FSharp.Compiler.AbstractIL.Internal.Library.CancellableModule.catch@720.Invoke(CancellationToken ct)
   at Microsoft.FSharp.Compiler.AbstractIL.Internal.Library.CancellableModule.bind@662.Invoke(CancellationToken ct)
   at Microsoft.FSharp.Compiler.AbstractIL.Internal.Library.CancellableModule.bind@662.Invoke(CancellationToken ct)
   at Microsoft.FSharp.Compiler.AbstractIL.Internal.Library.CancellableModule.catch@720.Invoke(CancellationToken ct)
   at Microsoft.FSharp.Compiler.AbstractIL.Internal.Library.CancellableModule.bind@662.Invoke(CancellationToken ct)
   at Microsoft.FSharp.Compiler.AbstractIL.Internal.Library.CancellableModule.catch@720.Invoke(CancellationToken ct)
   at Microsoft.FSharp.Compiler.AbstractIL.Internal.Library.CancellableModule.bind@662.Invoke(CancellationToken ct)
   at Microsoft.FSharp.Compiler.AbstractIL.Internal.Library.CancellableModule.bind@662.Invoke(CancellationToken ct)
   at Microsoft.FSharp.Compiler.AbstractIL.Internal.Library.CancellableModule.bind@662.Invoke(CancellationToken ct)
   at <StartupCode$FSharp-Compiler-Private>.$Reactor.EnqueueAndAwaitOpAsync@174-2.Invoke(CompilationThreadToken ctok)
   at <StartupCode$FSharp-Compiler-Private>.$Reactor.loop@70-99.Invoke(FSharpOption`1 _arg2)
   at Microsoft.FSharp.Control.AsyncPrimitives.CallThenInvokeNoHijackCheck[a,b](AsyncActivation`1 ctxt, FSharpFunc`2 userCode, b result1)
   at <StartupCode$FSharp-Core>.$Mailbox.processFirstArrival@314-5.Invoke(AsyncActivation`1 ctxt)
   at <StartupCode$FSharp-Compiler-Private>.$Reactor.loop@57-97.Invoke(AsyncActivation`1 ctxt)
   at <StartupCode$FSharp-Core>.$Mailbox.processFirstArrival@344-11.Invoke(AsyncActivation`1 ctxt)
   at <StartupCode$FSharp-Compiler-Private>.$Reactor.loop@57-97.Invoke(AsyncActivation`1 ctxt)
   at <StartupCode$FSharp-Core>.$Mailbox.processFirstArrival@344-11.Invoke(AsyncActivation`1 ctxt)
   at Microsoft.FSharp.Control.Trampoline.Execute(FSharpFunc`2 firstAction)
   at <StartupCode$FSharp-Core>.$Async.-ctor@167-1.Invoke(Object o)
   at System.Threading.QueueUserWorkItemCallback.WaitCallback_Context(Object state)
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()
   at System.Threading.ThreadPoolWorkQueue.Dispatch()
   at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback()

The thread 0x71f0 has exited with code 0 (0x0).
The thread 0x1c80 has exited with code 0 (0x0).

@majocha
Copy link
Contributor

majocha commented Jan 11, 2019

Ah, that's why it was throwing random stack overflows when debugging Visual F#. Works again with this PR!

@cartermp
Copy link
Contributor

AH shit, yeah this explains what I was seeing too (and why I had to disable one of the analyzers temporarily)

@KevinRansom KevinRansom merged commit 0a72fe2 into dotnet:master Jan 11, 2019
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.

4 participants