bitemyapp / bloodhound

Haskell Elasticsearch client and query DSL
bitemyapp.com
BSD 3-Clause "New" or "Revised" License
424 stars 118 forks source link

post-Aeson disaster release #111

Closed bitemyapp closed 8 years ago

bitemyapp commented 8 years ago
$ stack test bloodhound:doctests
bloodhound-0.10.0.0: unregistering (local file changes: src/Database/Bloodhound/Types.hs)
bloodhound-0.10.0.0: build (lib + test)
Preprocessing library bloodhound-0.10.0.0...
[3 of 5] Compiling Database.Bloodhound.Types ( src/Database/Bloodhound/Types.hs, .stack-work/dist/x86_64-linux/Cabal-1.22.5.0/build/Database/Bloodhound/Types.o )
In-place registering bloodhound-0.10.0.0...
Preprocessing test suite 'doctests' for bloodhound-0.10.0.0...
bloodhound-0.10.0.0: copy/register
Installing library in
/home/callen/work/bloodhound/.stack-work/install/x86_64-linux/lts-5.1/7.10.3/lib/x86_64-linux-ghc-7.10.3/bloodhound-0.10.0.0-5u94YzqKDWx4wX2dRohqIF
Registering bloodhound-0.10.0.0...
bloodhound-0.10.0.0: test (suite: doctests)

src/Database/Bloodhound/Types.hs:2099:34:
    No instance for (ToJSON (NonEmpty Text)) arising from a use of ‘.=’
    In the expression: fieldName .= terms
    In the expression: [fieldName .= terms]
    In an equation for ‘conjoined’: conjoined = [fieldName .= terms]

src/Database/Bloodhound/Types.hs:2266:32:
    No instance for (ToJSON (NonEmpty SimpleQueryFlag))
      arising from a use of ‘.=’
    In the expression: "flags" .= simpleQueryStringFlags
    In the expression:
      ["fields" .= simpleQueryStringField,
       "default_operator" .= simpleQueryStringOperator,
       "analyzer" .= simpleQueryStringAnalyzer,
       "flags" .= simpleQueryStringFlags, ....]
    In an equation for ‘maybeAdd’:
        maybeAdd
          = ["fields" .= simpleQueryStringField,
             "default_operator" .= simpleQueryStringOperator,
             "analyzer" .= simpleQueryStringAnalyzer, ....]

src/Database/Bloodhound/Types.hs:2286:5:
    No instance for (ToJSON (NonEmpty FieldName))
      arising from a use of ‘toJSON’
    In the expression: toJSON fieldNames
    In an equation for ‘toJSON’:
        toJSON (FofFields fieldNames) = toJSON fieldNames
    In the instance declaration for ‘ToJSON FieldOrFields’

src/Database/Bloodhound/Types.hs:2470:33:
    No instance for (ToJSON (NonEmpty StopWord))
      arising from a use of ‘.=’
    In the expression: "stop_words" .= stopwords
    In the expression:
      ["like_text" .= text, "percent_terms_to_match" .= percent,
       "min_term_freq" .= mtf, "max_query_terms" .= mqt, ....]
    In an equation for ‘base’:
        base
          = ["like_text" .= text, "percent_terms_to_match" .= percent,
             "min_term_freq" .= mtf, ....]

src/Database/Bloodhound/Types.hs:2489:27:
    No instance for (FromJSON (NonEmpty StopWord))
      arising from a use of ‘.:?’
    In the second argument of ‘(<*>)’, namely ‘o .:? "stop_words"’
    In the first argument of ‘(<*>)’, namely
      ‘MoreLikeThisFieldQuery <$> o .: "like_text" <*> pure fn
       <*> o .:? "percent_terms_to_match"
       <*> o .:? "min_term_freq"
       <*> o .:? "max_query_terms"
       <*> o .:? "stop_words"’
    In the first argument of ‘(<*>)’, namely
      ‘MoreLikeThisFieldQuery <$> o .: "like_text" <*> pure fn
       <*> o .:? "percent_terms_to_match"
       <*> o .:? "min_term_freq"
       <*> o .:? "max_query_terms"
       <*> o .:? "stop_words"
       <*> o .:? "min_doc_freq"’

src/Database/Bloodhound/Types.hs:2505:29:
    No instance for (ToJSON (NonEmpty FieldName))
      arising from a use of ‘.=’
    In the expression: "fields" .= fields
    In the expression:
      ["like_text" .= text, "fields" .= fields,
       "percent_terms_to_match" .= percent, "min_term_freq" .= mtf, ....]
    In an equation for ‘base’:
        base
          = ["like_text" .= text, "fields" .= fields,
             "percent_terms_to_match" .= percent, ....]

src/Database/Bloodhound/Types.hs:2509:33:
    No instance for (ToJSON (NonEmpty StopWord))
      arising from a use of ‘.=’
    In the expression: "stop_words" .= stopwords
    In the expression:
      ["like_text" .= text, "fields" .= fields,
       "percent_terms_to_match" .= percent, "min_term_freq" .= mtf, ....]
    In an equation for ‘base’:
        base
          = ["like_text" .= text, "fields" .= fields,
             "percent_terms_to_match" .= percent, ....]

src/Database/Bloodhound/Types.hs:2523:27:
    No instance for (FromJSON (NonEmpty FieldName))
      arising from a use of ‘.:?’
    In the second argument of ‘(<*>)’, namely ‘o .:? "fields"’
    In the first argument of ‘(<*>)’, namely
      ‘MoreLikeThisQuery <$> o .: "like_text" <*> o .:? "fields"’
    In the first argument of ‘(<*>)’, namely
      ‘MoreLikeThisQuery <$> o .: "like_text" <*> o .:? "fields"
       <*> o .:? "percent_terms_to_match"’

src/Database/Bloodhound/Types.hs:2528:27:
    No instance for (FromJSON (NonEmpty StopWord))
      arising from a use of ‘.:?’
    In the second argument of ‘(<*>)’, namely ‘o .:? "stop_words"’
    In the first argument of ‘(<*>)’, namely
      ‘MoreLikeThisQuery <$> o .: "like_text" <*> o .:? "fields"
       <*> o .:? "percent_terms_to_match"
       <*> o .:? "min_term_freq"
       <*> o .:? "max_query_terms"
       <*> o .:? "stop_words"’
    In the first argument of ‘(<*>)’, namely
      ‘MoreLikeThisQuery <$> o .: "like_text" <*> o .:? "fields"
       <*> o .:? "percent_terms_to_match"
       <*> o .:? "min_term_freq"
       <*> o .:? "max_query_terms"
       <*> o .:? "stop_words"
       <*> o .:? "min_doc_freq"’

/cc @MichaelXavier @MHova @crough this is where I'm at on things. Not sure why doctests is fucking me over, build and unit tests pass fine rn.

Finished in 21.2762 seconds
171 examples, 0 failures

If anyone has ideas, please pipe up. I don't know why doctests is making this unpleasant.

fizruk commented 8 years ago

@bitemyapp I think doctest uses a global package index and thus might be using a different version of aeson. I am not sure though.

Which branch should I check out to reproduce this?

fizruk commented 8 years ago

@bitemyapp if you're referring to the master branch, it seems to pass doctests on Travis (although it has some other dependency problems with GHC 7.8).

bitemyapp commented 8 years ago

@fizruk Wut?

screenshot from 2016-03-02 17-39-27

MHova commented 8 years ago

Sorry I've been MIA for a while.

The failures at https://travis-ci.org/bitemyapp/bloodhound/builds/112934635 and https://travis-ci.org/bitemyapp/bloodhound/builds/113271103 are all of the form:

--  Failure when adding dependencies:    

      aeson: needed (>=0.11.1 && <0.12), 0.10.0.0 found (latest version available)

    needed for package: bloodhound-0.10.0.0

The command "stack build" exited with 1.

Is the TravisCI server unable to download aeson 11 for some reason? Is there a "nuke TravisCI environment" button we need to press? Is TravisCI using the stack-7.8.yaml file for some reason?

bitemyapp commented 8 years ago

@MHova oh bah. Well when I fix that, the real error will be what I mentioned.

bitemyapp commented 8 years ago

Bounced and added stack update.

fizruk commented 8 years ago

@bitemyapp I meant that GHC 7.10 builds were passing, with doctests. So I assumed the problem was only local to you. I didn't know that you were referring to the GHC 7.8 builds.

bitemyapp commented 8 years ago

@fizruk maybe so! That would be pretty funny (ha ha ha...) if so after my nuking dist / stack clean'ing but thems the breaks I guess. I'm going to keep kicking the build around and we'll see if I can get us to a releasable state.

MHova commented 8 years ago

https://travis-ci.org/bitemyapp/bloodhound/builds/113344981

happy-everything-went-better-than-expected

bitemyapp commented 8 years ago

Hahahaha, the doctests still fail on my computer, even with rm -rf ./.stack-work and stack clean.

Okay then. Well, we're on track for a release soon then, I just need to find out wtf is going on with my local setup.

dmjio commented 8 years ago

@bitemyapp any word on release :)

bitemyapp commented 8 years ago

@dmjio been out the door for awhile: http://hackage.haskell.org/package/bloodhound

bitemyapp commented 8 years ago

aeson (>=0.11.1 && <0.12)

dmjio commented 8 years ago

Doh! had 0.10.0.0 in my stack.yml