Skip to content
This repository was archived by the owner on Oct 7, 2020. It is now read-only.

Remove liquid Haskell result files #900

Merged
merged 2 commits into from
Oct 23, 2018
Merged

Remove liquid Haskell result files #900

merged 2 commits into from
Oct 23, 2018

Conversation

meck
Copy link
Contributor

@meck meck commented Oct 23, 2018

These files get rewritten when the tests are run and dirties the repo.

@meck meck changed the title gitignore liquid haskell result with local ref Remove liquid Haskell result files Oct 23, 2018
Copy link
Collaborator

@lorenzo lorenzo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

makes sense to me

Reorder the test to endsure some liquid products are available
in /test/testdata/liquid/.liquid at first run.
Also add a test to see if the liquid haskell excutable is available.
@meck
Copy link
Contributor Author

meck commented Oct 23, 2018

It seems some tests for liquid Haskell depended on these files by reordering the tests this ensures they are present at first run of tests. Also added a check for the executable

@alanz alanz merged commit 024cde6 into haskell:master Oct 23, 2018
@meck meck deleted the gitignoreliqud branch October 23, 2018 20:49
@jhrcek
Copy link
Collaborator

jhrcek commented Oct 24, 2018

I'm not sure if it's ok that these files were removed.
After I finally managed to install liquidhaskell v 0.8.2.4 I'm getting these failures when running make test with master:

      test/unit/LiquidSpec.hs:38: 
      1) Liquid, liquid haskell plugin, runs the liquid haskell exe
           predicate failed on: ""
    
      test/unit/LiquidSpec.hs:52: 
      2) Liquid, liquid haskell plugin, reads errors from json file
           uncaught exception: IOException of type NoSuchThing (/home/jhrcek/Devel/github.com/jhrcek/haskell-ide-engine/test/testdata/liquid/.liquid/Evens.hs.json: openBinaryFile: does not exist (No such file or directory))
    
      test/unit/LiquidSpec.hs:91: 
      3) Liquid, liquid haskell plugin, reads types from vim.annot file
           uncaught exception: IOException of type NoSuchThing (/home/jhrcek/Devel/github.com/jhrcek/haskell-ide-engine/test/testdata/liquid/.liquid/Evens.hs.vim.annot: openFile: does not exist (No such file or directory))
    
      test/unit/LiquidSpec.hs:105: 
      4) Liquid, liquid haskell plugin, reads types from vim.annot file 2
           uncaught exception: IOException of type UserError (user error (Pattern match failure in do expression at test/unit/LiquidSpec.hs:108:7-13))

I think this should be reverted (except maybe for the findExecutable test, which is useful).
Seeing that i passed in CI, but it's failing for me locally means that either I'm doing something wrong, or CI might be caching some files that cause the tests to pass?

@jhrcek jhrcek mentioned this pull request Oct 24, 2018
@meck
Copy link
Contributor Author

meck commented Oct 24, 2018

Test 1 indicates msg here is empty, that should be the output of the liquid command.

What is which liquid ?

if I run liquid test/testdata/liquid/Evens.hs --json from the project dir manually I get the expected output:

RESULT
[{"start":{"line":9,"column":1},"stop":{"line":9,"column":8},"message":"Error: Liquid Type Mismatch\n  Inferred type\n    VV : {v : Int | v == (7 : int)}\n \n  not a subtype of Required type\n    VV : {VV : Int | VV mod 2 == 0}\n \n  In Context"}]

Test 3-4 fails since they depend on the products produced by test 1

@jhrcek
Copy link
Collaborator

jhrcek commented Oct 24, 2018

@meck sorry for confusion. It turns out that even though I had liquid was installed and present on path, I was missing the z3 SMT solver package. After installing it, all the tests are passing! Thank you

@alanz alanz added this to the prehistory milestone Feb 2, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants