Skip to content

NullReferenceException in ProjectCracker #795

Closed

Description

@haf

Steps:

  1. Install mono 5.2 from their clickety-click installer
  2. Ensure PATH contains /Library/Frameworks/Mono.framework/Versions/Current/Commands – if you manage your own PATH.
  3. forge new project
  4. suave
  5. .
  6. Repro
  7. ./build.sh
  8. open folder in latest ionide, with latest ionide-fsharp with debugging enabled in the user settings and F#'s "cache" cleared
[17:32:11 DEBUG] RES (077) <- {project} in 25 ms: Kind={"project"}
Data={"Project":"/Users/h/dev/haf/_scratch/paket-repro/Repro/Repro.fsproj","Files":[],"Output":"null","References":["/Library/Frameworks/Mono.framework/Versions/5.2.0/lib/mono/4.5/FSharp.Core.dll"],"Logs":{"/Users/h/dev/haf/_scratch/paket-repro/Repro/Repro.fsproj":"Microsoft.Build.Exceptions.InvalidProjectFileException: /Users/h/dev/haf/_scratch/paket-repro/Repro/Repro.fsproj: Object reference not set to an instance of an object\n  at Microsoft.FSharp.Compiler.SourceCodeServices.ProjectCrackerTool.ProjectCrackerTool+FSharpProjectFileInfo..ctor (System.String fsprojFileName, Microsoft.FSharp.Core.FSharpOption`1[T] properties, Microsoft.FSharp.Core.FSharpOption`1[T] enableLogging) [0x00129] in <599ca64506d737baa745038345a69c59>:0 \n  at Microsoft.FSharp.Compiler.SourceCodeServices.ProjectCrackerTool.ProjectCrackerTool.getOptions@387 (System.Boolean enableLogging, Microsoft.FSharp.Collections.FSharpList`1[T] properties, System.String file) [0x0000f] in <599ca64506d737baa745038345a69c59>:0 \n  at Microsoft.FSharp.Compiler.SourceCodeServices.ProjectCrackerTool.ProjectCrackerTool.getOptions (System.String file, System.Boolean enableLogging, Microsoft.FSharp.Collections.FSharpList`1[T] properties) [0x00005] in <599ca64506d737baa745038345a69c59>:0 \n  at Microsoft.FSharp.Compiler.SourceCodeServices.ProjectCrackerTool.ProjectCrackerTool.crackOpen (System.String[] argv) [0x000cc] in <599ca64506d737baa745038345a69c59>:0 "},"OutputType":"exe","Info":{"SdkType":"verbose","Data":{}},"AdditionalInfo":{}}
[17:32:11 DEBUG] REQ (078) -> {parse}, File = "~/Repro/Repro.fs"
Data={"FileName":"/Users/h/dev/haf/_scratch/paket-repro/Repro/Repro.fs","IsAsync":true,"Lines":["module MyWebApi.Program","","open Suave","open Suave.Successful","","[<EntryPoint>]","let main argv =","  startWebServer defaultConfig (OK \"Hello World!\")","  0"],"Version":23}
[17:32:11 DEBUG] RES (078) <- {parse} in 27 ms: Kind={"errors"}
Data={"File":"/Users/h/dev/haf/_scratch/paket-repro/Repro/Repro.fs","Errors":[{"FileName":"/Users/h/dev/haf/_scratch/paket-repro/Repro/Repro.fs","StartLine":3,"EndLine":3,"StartColumn":6,"EndColumn":11,"Severity":"Error","Message":"The namespace or module 'Suave' is not defined.","Subcategory":"typecheck"},{"FileName":"/Users/h/dev/haf/_scratch/paket-repro/Repro/Repro.fs","StartLine":4,"EndLine":4,"StartColumn":6,"EndColumn":11,"Severity":"Error","Message":"The namespace or module 'Suave' is not defined.","Subcategory":"typecheck"},{"FileName":"/Users/h/dev/haf/_scratch/paket-repro/Repro/Repro.fs","StartLine":8,"EndLine":8,"StartColumn":3,"EndColumn":17,"Severity":"Error","Message":"The value or constructor 'startWebServer' is not defined.","Subcategory":"typecheck"}]}

Possibly related fsprojects/Paket#2616 dotnet/core#862 ionide/ionide-vscode-fsharp#514 ?

Activity

  1. Krzysztof-Cieslak commented on Aug 27, 2017

    @Krzysztof-Cieslak
    Contributor
  2. enricosada commented on Sep 4, 2017

    @enricosada
    Contributor

    added ionide/FsAutoComplete#203 to make sure FSAC error out the project request, if project cracker fails somehow.

  3. haf commented on Sep 4, 2017

    @haf
    Author
  4. dsyme commented on Oct 3, 2017

    @dsyme
    Contributor

    My understanding is that this is fixed in master via #812 - @vasily-kirichenko please reopen if that's not the case

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions