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

Fix Compiler Errors in the Tests #318

Closed
wants to merge 6 commits into from

Conversation

paytonrules
Copy link

I spent a little time working on getting the CI build to pass - in the hope that this would allow a new release of FSAutoComplete.

Unfortunately while I made progress on the compiler errors, I'm more than a little stumped so far on the integration tests. Hopefully you can help.

Eric Smith added 6 commits December 8, 2018 11:46
Locally I get an error FS0041 without the type annotation
I suspect it's possible that that this will fix issues with Octokit in CI, but
I'm not positive. In either case I believe this is supposed to be checked in.
Most of these were are around the StartsWith ActivePattern. The code compiles
locally now (for me, on OSX).
These are just dummies, to see if we can get past the integration tests for
Mono 5.0.1
@paytonrules
Copy link
Author

I figure I can add here - running any integration test manually fails with a bunch of noise at the top. Of course the build fails when you run the ./buildAll script on ErrorTestsJson because it hangs. You can run it manually though.

Attached is the output.json for ErrorTestsJson when you run it manually.

{
  "Kind": "project",
  "Data": {
    "Project": "<absolute path removed>/FsAutoComplete.IntegrationTests/ErrorTestsJson/Test1.fsproj",
    "Files": [
      "<absolute path removed>/FsAutoComplete.IntegrationTests/ErrorTestsJson/FileTwo.fs",
      "<absolute path removed>/FsAutoComplete.IntegrationTests/ErrorTestsJson/Program.fs"
    ],
    "Output": "<absolute path removed>/FsAutoComplete.IntegrationTests/ErrorTestsJson/bin/Debug/Test1.exe",
    "References": [
      "<absolute path removed>/FSharp.Core.dll",
      "<absolute path removed>/System.Core.dll",
      "<absolute path removed>/System.dll",
      "<absolute path removed>/mscorlib.dll"
    ],
    "Logs": {
      "<absolute path removed>/FsAutoComplete.IntegrationTests/ErrorTestsJson/Test1.fsproj": ""
    },
    "OutputType": "exe",
    "Info": {
      "SdkType": "verbose",
      "Data": {}
    },
    "AdditionalInfo": {}
  }
}
null
OPTIONS - FILES: [|"<absolute path removed>/FsAutoComplete.IntegrationTests/ErrorTestsJson/FileTwo.fs";
  "<absolute path removed>/FsAutoComplete.IntegrationTests/ErrorTestsJson/Program.fs"|]
null
OPTIONS - OTHER OPTIONS:
null
--simpleresolution
null
--noframework
null
--out:<absolute path removed>/FsAutoComplete.IntegrationTests/ErrorTestsJson/bin/Debug/Test1.exe
null
--doc:<absolute path removed>/FsAutoComplete.IntegrationTests/ErrorTestsJson/bin/Debug/Test1.XML
null
--fullpaths
null
--flaterrors
null
--target:exe
null
--define:DEBUG
null
--define:TRACE
null
--debug+
null
--optimize-
null
--tailcalls-
null
--platform:x86
null
-r:/Users/eric/Projects/FsAutoComplete/src/FsAutoComplete/bin/Debug/net461/FSharp.Core.dll
null
-r:/Library/Frameworks/Mono.framework/Versions/5.16.0/lib/mono/4.0-api/mscorlib.dll
null
-r:/Library/Frameworks/Mono.framework/Versions/5.16.0/lib/mono/4.0-api/System.dll
null
-r:/Library/Frameworks/Mono.framework/Versions/5.16.0/lib/mono/4.0-api/System.Core.dll
null
OPTIONS - PROJECT REFERENCES: [||]
{
  "Kind": "info",
  "Data": "Synchronous parsing started"
}
{
  "Kind": "errors",
  "Data": {
    "File": "<absolute path removed>/FsAutoComplete.IntegrationTests/ErrorTestsJson/Program.fs",
    "Errors": [
      {
        "FileName": "<absolute path removed>/FsAutoComplete.IntegrationTests/ErrorTestsJson/Program.fs",
        "StartLine": 4,
        "EndLine": 4,
        "StartColumn": 15,
        "EndColumn": 22,
        "Severity": "Error",
        "Message": "The value, namespace, type or module 'FileTwo' is not defined.",
        "Subcategory": "typecheck"
      },
      {
        "FileName": "<absolute path removed>/FsAutoComplete.IntegrationTests/ErrorTestsJson/Program.fs",
        "StartLine": 8,
        "EndLine": 8,
        "StartColumn": 12,
        "EndColumn": 28,
        "Severity": "Error",
        "Message": "Lookup on object of indeterminate type based on information prior to this program point. A type annotation may be needed prior to this program point to constrain the type of the object. This may allow the lookup to be resolved.",
        "Subcategory": "typecheck"
      },
      {
        "FileName": "<absolute path removed>/FsAutoComplete.IntegrationTests/ErrorTestsJson/Program.fs",
        "StartLine": 10,
        "EndLine": 10,
        "StartColumn": 19,
        "EndColumn": 23,
        "Severity": "Error",
        "Message": "This expression was expected to have type\n    'int'    \nbut here has type\n    'string'    ",
        "Subcategory": "typecheck"
      }
    ]
  }
}
null
OPTIONS - FILES: [|"<absolute path removed>/FsAutoComplete.IntegrationTests/ErrorTestsJson/Script.fsx"|]
null
OPTIONS - OTHER OPTIONS:
null
-r:/Users/eric/Projects/FsAutoComplete/src/FsAutoComplete/bin/Debug/net461/FSharp.Core.dll
null
--noframework
null
--warn:3
null
-r:/Library/Frameworks/Mono.framework/Versions/5.16.0/lib/mono/4.5/mscorlib.dll
null
-r:/Library/Frameworks/Mono.framework/Versions/5.16.0/lib/mono/4.5/System.dll
null
-r:/Library/Frameworks/Mono.framework/Versions/5.16.0/lib/mono/4.5/System.Xml.dll
null
-r:/Library/Frameworks/Mono.framework/Versions/5.16.0/lib/mono/4.5/System.Runtime.Remoting.dll
null
-r:/Library/Frameworks/Mono.framework/Versions/5.16.0/lib/mono/4.5/System.Runtime.Serialization.Formatters.Soap.dll
null
-r:/Library/Frameworks/Mono.framework/Versions/5.16.0/lib/mono/4.5/System.Data.dll
null
-r:/Library/Frameworks/Mono.framework/Versions/5.16.0/lib/mono/4.5/System.Drawing.dll
null
-r:/Library/Frameworks/Mono.framework/Versions/5.16.0/lib/mono/4.5/System.Core.dll
null
-r:/Library/Frameworks/Mono.framework/Versions/5.16.0/lib/mono/4.5/Facades/System.Runtime.dll
null
-r:/Library/Frameworks/Mono.framework/Versions/5.16.0/lib/mono/4.5/Facades/System.Linq.dll
null
-r:/Library/Frameworks/Mono.framework/Versions/5.16.0/lib/mono/4.5/Facades/System.Reflection.dll
null
-r:/Library/Frameworks/Mono.framework/Versions/5.16.0/lib/mono/4.5/Facades/System.Linq.Expressions.dll
null
-r:/Library/Frameworks/Mono.framework/Versions/5.16.0/lib/mono/4.5/Facades/System.Threading.Tasks.dll
null
-r:/Library/Frameworks/Mono.framework/Versions/5.16.0/lib/mono/4.5/Facades/System.IO.dll
null
-r:/Library/Frameworks/Mono.framework/Versions/5.16.0/lib/mono/4.5/Facades/System.Net.Requests.dll
null
-r:/Library/Frameworks/Mono.framework/Versions/5.16.0/lib/mono/4.5/Facades/System.Collections.dll
null
-r:/Library/Frameworks/Mono.framework/Versions/5.16.0/lib/mono/4.5/Facades/System.Runtime.Numerics.dll
null
-r:/Library/Frameworks/Mono.framework/Versions/5.16.0/lib/mono/4.5/Facades/System.Threading.dll
null
-r:/Users/eric/Projects/FsAutoComplete/src/FsAutoComplete/bin/Debug/net461/System.ValueTuple.dll
null
-r:/Library/Frameworks/Mono.framework/Versions/5.16.0/lib/mono/4.5/System.Web.dll
null
-r:/Library/Frameworks/Mono.framework/Versions/5.16.0/lib/mono/4.5/System.Web.Services.dll
null
-r:/Library/Frameworks/Mono.framework/Versions/5.16.0/lib/mono/4.5/System.Windows.Forms.dll
null
-r:/Library/Frameworks/Mono.framework/Versions/5.16.0/lib/mono/4.5/System.Numerics.dll
null
OPTIONS - PROJECT REFERENCES: [||]
{
  "Kind": "info",
  "Data": "Synchronous parsing started"
}
{
  "Kind": "errors",
  "Data": {
    "File": "<absolute path removed>/FsAutoComplete.IntegrationTests/ErrorTestsJson/Script.fsx",
    "Errors": [
      {
        "FileName": "<absolute path removed>/FsAutoComplete.IntegrationTests/ErrorTestsJson/Script.fsx",
        "StartLine": 8,
        "EndLine": 8,
        "StartColumn": 13,
        "EndColumn": 20,
        "Severity": "Error",
        "Message": "The value or constructor 'unnamed' is not defined.",
        "Subcategory": "typecheck"
      }
    ]
  }
}
{
  "Kind": "helptext",
  "Data": {
    "Name": "func",
    "Overloads": [
      [
        {
          "Signature": "val func : x:int -> int",
          "Comment": ""
        }
      ]
    ],
    "AdditionalEdit": null
  }
}
{
  "Kind": "completion",
  "Data": [
    {
      "Name": "func",
      "ReplacementText": "func",
      "Glyph": "Method",
      "GlyphChar": "M",
      "NamespaceToOpen": null
    }
  ]
}
{
  "Kind": "helptext",
  "Data": {
    "Name": "func",
    "Overloads": [
      [
        {
          "Signature": "val func : x:int -> int",
          "Comment": ""
        }
      ]
    ],
    "AdditionalEdit": null
  }
}
{
  "Kind": "completion",
  "Data": [
    {
      "Name": "func",
      "ReplacementText": "func",
      "Glyph": "Method",
      "GlyphChar": "M",
      "NamespaceToOpen": null
    }
  ]
}
{
  "Kind": "info",
  "Data": "quitting..."
}

@enricosada
Copy link
Contributor

Hi @paytonrules sorry for late review.

i made the ci green with PR #319 , sorry i didnt see your PR, otherwise i had just pushed some more commit here.

The issue with integration tests is that the project files of the tests use an older version of msbuild (verison 4 for vs2010) who make the projectcracker (on .NET, the old FSC project cracker) crash at runtime, because it load wrong msbuild assemblies.

It will be replaced by new loader (based on https://github.com/enricosada/dotnet-proj-info/ ), i am now refactoring the project loading code from FSAC to dotnet-proj-info to allow sharing to others who need it (like fable, ref https://github.com/enricosada/dotnet-proj-info/issues/16 ), and making a more robust and feature compled.

Sorry for the duplicated work, my bad.

@enricosada enricosada closed this Dec 31, 2018
@paytonrules
Copy link
Author

No problem about the duplicated work, @enricosada, it happens.

Interestingly I still get a couple compiler errors when I run ./build.sh All on OSX. The commits 05074d7 and 4dfc92d fix those problems. I could create a separate PR for those, but I don't entirely understand why you aren't seeing them, as they are straightforward compiler errors.

The F# version is 4.1 if that helps.

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.

2 participants