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

Exception when compiling a project that uses FSharp.Data.TypeProviders.SqlDataConnection #904

Closed
Tarmil opened this issue Feb 7, 2018 · 2 comments

Comments

@Tarmil
Copy link
Member

Tarmil commented Feb 7, 2018

Stack trace:

FSC: error : Global error 'The exception has been reported. This internal exception should now be caught at an error recovery point on the stack. Original message: ImportILTypeRef: unexpected local scopeDb.fs (67,22--67,57) IsSynthetic=false)' at    at Microsoft.FSharp.Compiler.ErrorLogger.ErrorLoggerExtensions.ErrorLogger.Error[b](ErrorLogger x, Exception exn)
   at Microsoft.FSharp.Compiler.Import.ImportTypeRefData(ImportMap env, range m, ILScopeRef scoref, String[] path, String typeName)
   at Microsoft.FSharp.Compiler.Import.ImportILTypeRefUncached(ImportMap env, range m, ILTypeRef tref)
   at Microsoft.FSharp.Compiler.Import.ImportILTypeRef(ImportMap env, range m, ILTypeRef tref)
   at Microsoft.FSharp.Compiler.SourceCodeServices.FSharpExprConvert.ConvILCall(cenv cenv, ExprTranslationEnv env, Boolean isNewObj, ValUseFlag valUseFlags, ILMethodRef ilMethRef, FSharpList`1 enclTypeArgs, FSharpList`1 methTypeArgs, FSharpList`1 callArgs, range m)
   at Microsoft.FSharp.Compiler.SourceCodeServices.FSharpExprConvert.ConvExprPrim(cenv cenv, ExprTranslationEnv env, Expr expr)
   at Microsoft.FSharp.Compiler.SourceCodeServices.FSharpExprConvert.ConvLetBind(cenv cenv, ExprTranslationEnv env, Binding bind)
   at Microsoft.FSharp.Compiler.SourceCodeServices.FSharpExprConvert.ConvExprPrimLinear(cenv cenv, ExprTranslationEnv env, Expr expr, FSharpFunc`2 contf)
   at Microsoft.FSharp.Compiler.SourceCodeServices.FSharpExprConvert.ConvExprPrim(cenv cenv, ExprTranslationEnv env, Expr expr)
   at Microsoft.FSharp.Compiler.SourceCodeServices.FSharpExprConvert.ConvExprOnDemand@1039.Invoke(Unit unitVar0)
   at Microsoft.FSharp.Compiler.SourceCodeServices.FSharpExpr.get_E()
   at Microsoft.FSharp.Compiler.SourceCodeServices.BasicPatterns.|Let|_|(FSharpExpr e)
   at WebSharper.Compiler.FSharp.CodeReader.scan@1141(Environment env, String containingMethodName, Dictionary`2 vars, List`1 quotations, FSharpExpr expr)
   at WebSharper.Compiler.FSharp.CodeReader.scanExpression(Environment env, String containingMethodName, FSharpExpr expr)
   at WebSharper.Compiler.FSharp.ProjectReader.transformClass(Lazy`1 sc, Compilation comp, ResolveFuncArgs ac, SymbolReader sr, Dictionary`2 classAnnots, TypeAnnotation parentAnnot, FSharpEntity cls, List`1 members)
   at WebSharper.Compiler.FSharp.ProjectReader.transformClass(Lazy`1 sc, Compilation comp, ResolveFuncArgs ac, SymbolReader sr, Dictionary`2 classAnnots, TypeAnnotation parentAnnot, FSharpEntity cls, List`1 members)
   at WebSharper.Compiler.FSharp.ProjectReader.transformAssembly@1072-3.Invoke(FSharpImplementationFileContents file)
   at Microsoft.FSharp.Collections.SeqModule.Iterate[T](FSharpFunc`2 action, IEnumerable`1 source)
   at WebSharper.Compiler.FSharp.ProjectReader.transformAssembly(Compilation comp, String assemblyName, FSharpCheckProjectResults checkResults)
   at WebSharper.Compiler.FSharp.WebSharperFSharpCompiler.Compile(Task`1 prevMeta, String[] argv, String path, String assemblyName)
   at WebSharper.FSharp.Program.Compile$cont@97-1(WsConfig config, String thisName, WebSharperFSharpCompiler compiler, FSharpList`1 paths, AssemblyResolver aR, Unit unitVar)
   at WebSharper.FSharp.Program.Compile$cont@59(WsConfig config, WarnSettings warnSettings, String thisName, Unit unitVar)
   at WebSharper.FSharp.Program.compileMain$cont@212(String[] argv, Unit unitVar)
   at WebSharper.FSharp.Program.main(String[] argv)

So this is in the part of the compiler that goes through server-side code to look for quotations to compile. I think we should catch this and show a warning.

@Tarmil Tarmil added the bug label Feb 7, 2018
@Tarmil
Copy link
Member Author

Tarmil commented Feb 7, 2018

Somehow this issue disappeared after deleting bin and obj and recompiling. I'll leave this issue open because I'd still like to investigate what caused it in the first place some time.

@Tarmil
Copy link
Member Author

Tarmil commented Feb 22, 2018

Fixed by e678907

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

No branches or pull requests

2 participants