Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions glean.cabal.in
Original file line number Diff line number Diff line change
Expand Up @@ -1795,6 +1795,17 @@ test-suite angle-test-misc
main-is: Angle/MiscTest.hs
ghc-options: -main-is Angle.MiscTest

test-suite api
import: test
type: exitcode-stdio-1.0
main-is: ApiTest.hs
ghc-options: -main-is ApiTest
build-depends:
glean:stubs,
glean:core,
glean:if-glean-hs,
glean:schema

test-suite cppexception
import: test
type: exitcode-stdio-1.0
Expand Down
8 changes: 4 additions & 4 deletions glean/glass/tools/Glean/Glass/Test/DemoClient.hs
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ readService = do
hostPort <- Text.pack <$> readerAsk
case Text.breakOn ":" hostPort of
(_, "") -> fail "Not a valid host:port"
(host, portStr) -> case textToInt portStr of
(host, portStr) -> case textToInt (Text.drop 1 portStr) of
Left _ -> fail ("Not a valid port: " <> show portStr)
Right port -> return (HostPort host (fromIntegral port))

Expand Down Expand Up @@ -152,13 +152,13 @@ defCfg = def { processingTimeout = Just 15000 }

type GlassM p a = forall c . ClientChannel c => ThriftM p c GlassService a

svc :: ThriftService GlassService
svc = mkThriftService defService defCfg
svc :: Service -> ThriftService GlassService
svc s = mkThriftService s defCfg

main :: IO ()
main = Glean.withOptions options $ \Options{..} ->
withEventBaseDataplane $ \evp -> do
res <- runThrift evp svc $
res <- runThrift evp (svc optHost) $
case optCommand of
List repo path -> runListSymbols repo path
Describe sym -> runDescribe sym
Expand Down
5 changes: 4 additions & 1 deletion glean/hs/Glean/Query/Angle.hs
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,10 @@ build (Angle m) =
-- > end)
-- > ]
query :: (Type t) => Angle t -> Query t
query = Thrift.angleData . display
query = Thrift.angleData . display . sig
-- adding a type signature ensures that our type matches the type
-- Glean infers. Otherwise these could diverge, leading to
-- deserialization errors or just wrong data.

class AngleVars f r where
-- | Use `vars` to batch up a series of nested `var` calls:
Expand Down
Loading