Git Product home page Git Product logo

Comments (14)

7sharp9 avatar 7sharp9 commented on July 16, 2024

I have seen this error myself with the laters version 0.0.0.20 in the F# addin, Ill try and get a better reproduction and my own stack trace.

Once it occurs you have to restart Xamarin Studio to get the checker working correctly again.

from fsharp-compiler-docs.

7sharp9 avatar 7sharp9 commented on July 16, 2024

Heres the stack trace I captured while randomly highlighting usage within the F#Binding project:

System.Exception: Could not find requested input '(startup (1,0--1,80) IsSynthetic=false,
 "/Users/dave/code/fsb/FSharp.CompilerBinding/LanguageService.fs", false)' 

 named 'FileNames' in set [(0, Available('(startup (1,0--1,80) IsSynthetic=false, /Users/dave/code/fsb/monodevelop/MonoDevelop.FSharpBinding/PowerPack/CodeDomVisitor.fs, False)' 

 as of 20/02/2014 15:19:28)); (1, Available('(startup (1,0--1,80) IsSynthetic=false, /Users/dave/code/fsb/monodevelop/MonoDevelop.FSharpBinding/PowerPack/CodeDomGenerator.fs, False)' 
 as of 20/02/2014 15:19:28)); (2, Available('(startup (1,0--1,80) IsSynthetic=false, /Users/dave/code/fsb/monodevelop/MonoDevelop.FSharpBinding/PowerPack/CodeProvider.fs, False)' 
 as of 20/02/2014 15:19:28)); ... ]

  at Microsoft.FSharp.Compiler.IncrementalBuild.GetSlotByInput[Tuple`3] (System.String name, System.Tuple`3 input, Microsoft.FSharp.Compiler.PartialBuild build, Microsoft.FSharp.Core.FSharpFunc`2 equals) [0x00000] in <filename unknown>:0 
  at Microsoft.FSharp.Compiler.IncrementalFSharpBuild+IncrementalBuilder.GetSlotOfFileName (System.String filename) [0x00000] in <filename unknown>:0 
  at Microsoft.FSharp.Compiler.IncrementalFSharpBuild+IncrementalBuilder.GetParseResultsForFile (System.String filename) [0x00000] in <filename unknown>:0 
  at <StartupCode$FSharp-Compiler-Service>[email protected] (Microsoft.FSharp.Core.Unit unitVar0) [0x00000] in <filename unknown>:0 
  at Microsoft.FSharp.Compiler.SourceCodeServices.Reactor+RunAsyncOp@248[System.Tuple`2[Microsoft.FSharp.Compiler.SourceCodeServices.ParseFileResults,Microsoft.FSharp.Compiler.SourceCodeServices.CheckFileResults]].Invoke (Microsoft.FSharp.Core.Unit unitVar0) [0x00000] in <filename unknown>:0 

No specific repo, just usage over a period of time.

from fsharp-compiler-docs.

rneatherway avatar rneatherway commented on July 16, 2024

Interesting. This means that we are somehow requesting information for a
file that doesn't exist. I have seen this in Emacs on my work machine that
has a strange root filesystem setup. The result is that some files have
multiple different full paths and so are not recognised by
FSharp.Compiler.Service when referred to by different ones at different
times.

In your case the filename seems to be "FileNames" which is pretty strange.
We might be able to track down when it happens by guarding calls into
FSharp.Compiler.Service with a File.Exists check.

On Fri, Feb 21, 2014 at 2:43 PM, Dave Thomas [email protected]:

Heres the stack trace I captured while randomly highlighting usage within
the F#Binding project:

System.Exception: Could not find requested input '(startup (1,0--1,80) IsSynthetic=false,
"/Users/dave/code/fsb/FSharp.CompilerBinding/LanguageService.fs", false)'

named 'FileNames' in set [(0, Available('(startup (1,0--1,80) IsSynthetic=false, /Users/dave/code/fsb/monodevelop/MonoDevelop.FSharpBinding/PowerPack/CodeDomVisitor.fs, False)'

as of 20/02/2014 15:19:28)); (1, Available('(startup (1,0--1,80) IsSynthetic=false, /Users/dave/code/fsb/monodevelop/MonoDevelop.FSharpBinding/PowerPack/CodeDomGenerator.fs, False)'
as of 20/02/2014 15:19:28)); (2, Available('(startup (1,0--1,80) IsSynthetic=false, /Users/dave/code/fsb/monodevelop/MonoDevelop.FSharpBinding/PowerPack/CodeProvider.fs, False)'
as of 20/02/2014 15:19:28)); ... ]

at Microsoft.FSharp.Compiler.IncrementalBuild.GetSlotByInput[Tuple3](System.String name, System.Tuple3 input, Microsoft.FSharp.Compiler.PartialBuild build, Microsoft.FSharp.Core.FSharpFunc2 equals) [0x00000] in <filename unknown>:0 at Microsoft.FSharp.Compiler.IncrementalFSharpBuild+IncrementalBuilder.GetSlotOfFileName (System.String filename) [0x00000] in <filename unknown>:0 at Microsoft.FSharp.Compiler.IncrementalFSharpBuild+IncrementalBuilder.GetParseResultsForFile (System.String filename) [0x00000] in <filename unknown>:0 at <StartupCode$FSharp-Compiler-Service>[email protected] (Microsoft.FSharp.Core.Unit unitVar0) [0x00000] in <filename unknown>:0 at Microsoft.FSharp.Compiler.SourceCodeServices.Reactor+RunAsyncOp@248[System.Tuple2[Microsoft.FSharp.Compiler.SourceCodeServices.ParseFileResults,Microsoft.FSharp.Compiler.SourceCodeServices.CheckFileResults]].Invoke (Microsoft.FSharp.Core.Unit unitVar0) [0x00000] in :0

Reply to this email directly or view it on GitHubhttps://github.com//issues/59#issuecomment-35735751
.

from fsharp-compiler-docs.

7sharp9 avatar 7sharp9 commented on July 16, 2024

@rneatherway In both cases the filename is FileNames. I guess a guard will have to be put in GetBackgroundCheckResultsForFileInProject. Getting a repo is difficult, Ive not seen the issues for a few days but it has been reported via bugzilla.

from fsharp-compiler-docs.

rneatherway avatar rneatherway commented on July 16, 2024

Yes I agree that it shouldn't crash, so we should add a guard there. Also a
bug in fsharpbinding though, I wonder where it is getting "FileNames" from.

On Mon, Feb 24, 2014 at 8:34 AM, Dave Thomas [email protected]:

@rneatherway https://github.com/rneatherway In both cases the filename
is FileNames. I guess a guard will have to be put in
GetBackgroundCheckResultsForFileInProject

Reply to this email directly or view it on GitHubhttps://github.com//issues/59#issuecomment-35866257
.

from fsharp-compiler-docs.

7sharp9 avatar 7sharp9 commented on July 16, 2024

Ive never managed to replicated it with a debugger attached to find out.

from fsharp-compiler-docs.

 avatar commented on July 16, 2024

Yes, we should discover where 'FileNames' is coming from

from fsharp-compiler-docs.

 avatar commented on July 16, 2024

This bug appeared in the Visual F# Power Tools and is because the InvalidateConfiguration method on InteractiveChecker is not being called correctly for the project when project configuration changes, e.g. files are added/removed.

See this FSharpVSPowerTools pull request: fsprojects-archive/zzarchive-VisualFSharpPowerTools#72

and the follow up to use InvalidateConfiguration instead of InvalidateAl

fsprojects-archive/zzarchive-VisualFSharpPowerTools#83

We should still fix the compiler service to be more robust for requests for files taht are not part of the project, but the primary fix is to call InvalidateConfiguration correctly in fsharpbinding code.

from fsharp-compiler-docs.

7sharp9 avatar 7sharp9 commented on July 16, 2024

I can certainly put a fix in to invalidate on add/remove fs files. When I got that error no configuration change occurred though, well, no files were added/removed anyway.

from fsharp-compiler-docs.

rneatherway avatar rneatherway commented on July 16, 2024

@dsyme This is because we are calling FCS with filenames that are not in the project. In this case this is literally (and bizarrely) FileNames. In my testing on my work computer, I have a strange overlayed filesystem so that /auto/users and /users are the same folder. When /users/<path>/Program.fs is in the project, sometimes resolving it to a full path gives /auto/users/<path>/Program.fs and the call to FCS with this filename instead gives the Could not find requested input error.

from fsharp-compiler-docs.

rneatherway avatar rneatherway commented on July 16, 2024

I agree that we also want the InvalidateConfiguration fix by the way, but I believe that is a separate issue that leads to another way of calling FCS with a filename that it doesn't recognise.

from fsharp-compiler-docs.

 avatar commented on July 16, 2024

"FileNames" is the name of the node in the incremental computation graph, see https://github.com/fsharp/fsharp/blob/master/src/fsharp/vs/IncrementalBuild.fs#L1639

Do we have a consistent repro for this? Certainly I suspect the missing InvalidateConfiguration - there are no uses of either InvalidateAll or InvalidateConfiguration in the current fsharpbinding.

If there ar other causes of lookups on files that are not in the project, we need to get isolated repros for those.

from fsharp-compiler-docs.

rneatherway avatar rneatherway commented on July 16, 2024

Ah! Thanks for the link. I agree that this would seem to be the problem.

On Sun, Mar 2, 2014 at 5:55 PM, Don Syme [email protected] wrote:

"FileNames" is the name of the node in the incremental computation graph,
see
https://github.com/fsharp/fsharp/blob/master/src/fsharp/vs/IncrementalBuild.fs#L1639

Do we have a consistent repro for this? Certainly I suspect the missing
InvalidateConfiguration - there are no uses of either InvalidateAll or
InvalidateConfiguration in the current fsharpbinding.

If there ar other causes of lookups on files that are not in the project,
we need to get isolated repros for those.

Reply to this email directly or view it on GitHubhttps://github.com//issues/59#issuecomment-36460764
.

from fsharp-compiler-docs.

 avatar commented on July 16, 2024

Closing this as it was a problem with how FCS was being used. The error message will be improved in the next FCS update

from fsharp-compiler-docs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.