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

yesod-core-1.6.8 can't compile its test suite #1563

Closed
peti opened this Issue Oct 15, 2018 · 1 comment

Comments

Projects
None yet
2 participants
@peti
Copy link

peti commented Oct 15, 2018

Citing the relevant bits from https://hydra.nixos.org/build/82806602:

Building test suite 'test-routes' for yesod-core-1.6.8..
[ 1 of 11] Compiling Yesod.Routes.Class ( Yesod/Routes/Class.hs, dist/build/test-routes/test-routes-tmp/Yesod/Routes/Class.o )
[ 2 of 11] Compiling Yesod.Routes.TH.Types ( Yesod/Routes/TH/Types.hs, dist/build/test-routes/test-routes-tmp/Yesod/Routes/TH/Types.o )
[ 3 of 11] Compiling Yesod.Routes.TH.RouteAttrs ( Yesod/Routes/TH/RouteAttrs.hs, dist/build/test-routes/test-routes-tmp/Yesod/Routes/TH/RouteAttrs.o )
[ 4 of 11] Compiling Yesod.Routes.TH.RenderRoute ( Yesod/Routes/TH/RenderRoute.hs, dist/build/test-routes/test-routes-tmp/Yesod/Routes/TH/RenderRoute.o )
[ 5 of 11] Compiling Yesod.Routes.TH.Dispatch ( Yesod/Routes/TH/Dispatch.hs, dist/build/test-routes/test-routes-tmp/Yesod/Routes/TH/Dispatch.o )
[ 6 of 11] Compiling Yesod.Routes.TH.ParseRoute ( Yesod/Routes/TH/ParseRoute.hs, dist/build/test-routes/test-routes-tmp/Yesod/Routes/TH/ParseRoute.o )
[ 7 of 11] Compiling Yesod.Routes.TH  ( Yesod/Routes/TH.hs, dist/build/test-routes/test-routes-tmp/Yesod/Routes/TH.o )
[ 8 of 11] Compiling Yesod.Routes.Overlap ( Yesod/Routes/Overlap.hs, dist/build/test-routes/test-routes-tmp/Yesod/Routes/Overlap.o )
[ 9 of 11] Compiling Yesod.Routes.Parse ( Yesod/Routes/Parse.hs, dist/build/test-routes/test-routes-tmp/Yesod/Routes/Parse.o )
[10 of 11] Compiling Hierarchy        ( test/Hierarchy.hs, dist/build/test-routes/test-routes-tmp/Hierarchy.o )
[11 of 11] Compiling Main             ( test/RouteSpec.hs, dist/build/test-routes/test-routes-tmp/Main.o )
test/RouteSpec.hs:(57,1)-(102,16): Splicing declarations
    do texts_aXKZ <- [t| [Text] |]
       let resLeaves_aXL0
             = map
                 ResourceLeaf
                 [Resource "RootR" [] (Methods Nothing ["GET"]) ["foo", "bar"] True,
                  Resource
                    "BlogPostR"
                    [Static "blog", Dynamic $ ConT ''Text]
                    (Methods Nothing ["GET", "POST"])
                    []
                    True,
                  Resource
                    "WikiR" [Static "wiki"] (Methods (Just texts_aXKZ) []) [] True,
                  Resource
                    "SubsiteR"
                    [Static "subsite"]
                    (Subsite (ConT ''MySub) "getMySub")
                    []
                    True,
                  Resource
                    "SubparamR"
                    [Static "subparam", Dynamic $ ConT ''Int]
                    (Subsite (ConT ''MySubParam) "getMySubParam")
                    []
                    True]
           resParent_aXL1
             = ResourceParent
                 "ParentR"
                 True
                 [Static "foo", Dynamic $ ConT ''Text]
                 [ResourceLeaf
                    $ Resource "ChildR" [] (Methods Nothing ["GET"]) ["child"] True]
           ress_aXL2 = resParent_aXL1 : resLeaves_aXL0
       rrinst_aXL3 <- mkRenderRouteInstance [] (ConT ''MyApp) ress_aXL2
       rainst_aXL4 <- mkRouteAttrsInstance [] (ConT ''MyApp) ress_aXL2
       prinst_aXL5 <- mkParseRouteInstance [] (ConT ''MyApp) ress_aXL2
       dispatch_aXL8 <- mkDispatchClause
                          MkDispatchSettings
                            {mdsRunHandler = [| runHandler |],
                             mdsSubDispatcher = [| subDispatch dispatcher |],
                             mdsGetPathInfo = [| fst |], mdsMethod = [| snd |],
                             mdsSetPathInfo = [| \ p_aXL6 (_, m_aXL7) -> (p_aXL6, m_aXL7) |],
                             mds404 = [| pack "404" |], mds405 = [| pack "405" |],
                             mdsGetHandler = defaultGetHandler, mdsUnwrapper = return}
                          ress_aXL2
       return
         $ InstanceD
             Nothing
             []
             (ConT ''Dispatcher `AppT` ConT ''MyApp `AppT` ConT ''MyApp)
             [FunD (mkName "dispatcher") [dispatch_aXL8]]
             : prinst_aXL5 : rainst_aXL4 : rrinst_aXL3
  ======>
    instance Dispatcher MyApp MyApp where
      dispatcher env1894_aXSS req1894_aXST
        = helper1894_aXSU (fst req1894_aXST)
        where
            helper1894_aXSU
              ((ghc-prim-0.5.2.0:GHC.Types.:) "foo"
                                              ((ghc-prim-0.5.2.0:GHC.Types.:) (Web.PathPieces.fromPathPiece -> Just dyn_aXSV)
                                                                              rest_aXSW))
              = helperParentR_aXSX rest_aXSW
              where
                  helperParentR_aXSX ghc-prim-0.5.2.0:GHC.Types.[]
                    = case snd req1894_aXST of
                        "GET"
                          -> (((runHandler (getChildR dyn_aXSV)) env1894_aXSS)
                                (Just ((ParentR dyn_aXSV) ChildR)))
                               req1894_aXST
                        _ -> (((runHandler (pack "405")) env1894_aXSS)
                                (Just ((ParentR dyn_aXSV) ChildR)))
                               req1894_aXST
                  helperParentR_aXSX _
                    = (((runHandler (pack "404")) env1894_aXSS) Nothing) req1894_aXST
            helper1894_aXSU ghc-prim-0.5.2.0:GHC.Types.[]
              = case snd req1894_aXST of
                  "GET"
                    -> (((runHandler getRootR) env1894_aXSS) (Just RootR)) req1894_aXST
                  _ -> (((runHandler (pack "405")) env1894_aXSS) (Just RootR))
                         req1894_aXST
            helper1894_aXSU
              ((ghc-prim-0.5.2.0:GHC.Types.:) "blog"
                                              ((ghc-prim-0.5.2.0:GHC.Types.:) (Web.PathPieces.fromPathPiece -> Just dyn_aXSY)
                                                                              ghc-prim-0.5.2.0:GHC.Types.[]))
              = case snd req1894_aXST of
                  "GET"
                    -> (((runHandler (getBlogPostR dyn_aXSY)) env1894_aXSS)
                          (Just (BlogPostR dyn_aXSY)))
                         req1894_aXST
                  "POST"
                    -> (((runHandler (postBlogPostR dyn_aXSY)) env1894_aXSS)
                          (Just (BlogPostR dyn_aXSY)))
                         req1894_aXST
                  _ -> (((runHandler (pack "405")) env1894_aXSS)
                          (Just (BlogPostR dyn_aXSY)))
                         req1894_aXST
            helper1894_aXSU
              ((ghc-prim-0.5.2.0:GHC.Types.:) "wiki"
                                              (Web.PathPieces.fromPathMultiPiece -> Just multi_aXSZ))
              = (((runHandler (handleWikiR multi_aXSZ)) env1894_aXSS)
                   (Just (WikiR multi_aXSZ)))
                  req1894_aXST
            helper1894_aXSU
              ((ghc-prim-0.5.2.0:GHC.Types.:) "subsite" restPath_aXT0)
              = (((((subDispatch dispatcher) runHandler)
                     (\ sub_aXT3 -> getMySub sub_aXT3))
                    (\ sroute_aXT4 -> SubsiteR sroute_aXT4))
                   env1894_aXSS)
                  (((\ p_aXT1 (_, m_aXT2) -> (p_aXT1, m_aXT2)) restPath_aXT0)
                     req1894_aXST)
            helper1894_aXSU
              ((ghc-prim-0.5.2.0:GHC.Types.:) "subparam"
                                              ((ghc-prim-0.5.2.0:GHC.Types.:) (Web.PathPieces.fromPathPiece -> Just dyn_aXT5)
                                                                              restPath_aXT6))
              = (((((subDispatch dispatcher) runHandler)
                     (\ sub_aXT9 -> (getMySubParam sub_aXT9) dyn_aXT5))
                    (\ sroute_aXTa -> (SubparamR dyn_aXT5) sroute_aXTa))
                   env1894_aXSS)
                  (((\ p_aXT7 (_, m_aXT8) -> (p_aXT7, m_aXT8)) restPath_aXT6)
                     req1894_aXST)
            helper1894_aXSU _
              = (((runHandler (pack "404")) env1894_aXSS) Nothing) req1894_aXST
    instance ParseRoute MyApp where
      parseRoute
        = (\ f_aXSP x_aXSQ
             -> (f_aXSP ghc-prim-0.5.2.0:GHC.Tuple.()) x_aXSQ ::
             (() -> ([Text], [(Text, Text)]) -> Maybe (YRC.Route a_aXSR))
             -> ([Text], [(Text, Text)]) -> Maybe (YRC.Route a_aXSR))
            helper_aXSO
        where
            helper_aXSO env8419_aXSg req8419_aXSh
              = helper8419_aXSi (fst req8419_aXSh)
              where
                  helper8419_aXSi
                    ((ghc-prim-0.5.2.0:GHC.Types.:) "foo"
                                                    ((ghc-prim-0.5.2.0:GHC.Types.:) (Web.PathPieces.fromPathPiece -> Just dyn_aXSk)
                                                                                    rest_aXSm))
                    = helperParentR_aXSn rest_aXSm
                    where
                        helperParentR_aXSn ghc-prim-0.5.2.0:GHC.Types.[]
                          = ((((\ _ _ x_aXSl _ -> x_aXSl) ((error "mdsGetHandler") dyn_aXSk))
                                env8419_aXSg)
                               (Just ((ParentR dyn_aXSk) ChildR)))
                              req8419_aXSh
                        helperParentR_aXSn _
                          = ((((\ _ _ x_aXSj _ -> x_aXSj) (error "mds404")) env8419_aXSg)
                               Nothing)
                              req8419_aXSh
                  helper8419_aXSi ghc-prim-0.5.2.0:GHC.Types.[]
                    = ((((\ _ _ x_aXSo _ -> x_aXSo) (error "mdsGetHandler"))
                          env8419_aXSg)
                         (Just RootR))
                        req8419_aXSh
                  helper8419_aXSi
                    ((ghc-prim-0.5.2.0:GHC.Types.:) "blog"
                                                    ((ghc-prim-0.5.2.0:GHC.Types.:) (Web.PathPieces.fromPathPiece -> Just dyn_aXSp)
                                                                                    ghc-prim-0.5.2.0:GHC.Types.[]))
                    = ((((\ _ _ x_aXSq _ -> x_aXSq) ((error "mdsGetHandler") dyn_aXSp))
                          env8419_aXSg)
                         (Just (BlogPostR dyn_aXSp)))
                        req8419_aXSh
                  helper8419_aXSi
                    ((ghc-prim-0.5.2.0:GHC.Types.:) "wiki"
                                                    (Web.PathPieces.fromPathMultiPiece -> Just multi_aXSr))
                    = ((((\ _ _ x_aXSs _ -> x_aXSs)
                           ((error "mdsGetHandler") multi_aXSr))
                          env8419_aXSg)
                         (Just (WikiR multi_aXSr)))
                        req8419_aXSh
                  helper8419_aXSi
                    ((ghc-prim-0.5.2.0:GHC.Types.:) "subsite" restPath_aXSt)
                    = (((((\ _runHandler_aXSw _getSub_aXSx toMaster_aXSy _env_aXSz
                             -> ((fmap toMaster_aXSy) . parseRoute))
                            (\ _ _ x_aXSA _ -> x_aXSA))
                           (\ sub_aXSB -> getMySub sub_aXSB))
                          (\ sroute_aXSC -> SubsiteR sroute_aXSC))
                         env8419_aXSg)
                        (((\ p_aXSu (_, q_aXSv) -> (p_aXSu, q_aXSv)) restPath_aXSt)
                           req8419_aXSh)
                  helper8419_aXSi
                    ((ghc-prim-0.5.2.0:GHC.Types.:) "subparam"
                                                    ((ghc-prim-0.5.2.0:GHC.Types.:) (Web.PathPieces.fromPathPiece -> Just dyn_aXSD)
                                                                                    restPath_aXSE))
                    = (((((\ _runHandler_aXSH _getSub_aXSI toMaster_aXSJ _env_aXSK
                             -> ((fmap toMaster_aXSJ) . parseRoute))
                            (\ _ _ x_aXSL _ -> x_aXSL))
                           (\ sub_aXSM -> (getMySubParam sub_aXSM) dyn_aXSD))
                          (\ sroute_aXSN -> (SubparamR dyn_aXSD) sroute_aXSN))
                         env8419_aXSg)
                        (((\ p_aXSF (_, q_aXSG) -> (p_aXSF, q_aXSG)) restPath_aXSE)
                           req8419_aXSh)
                  helper8419_aXSi _
                    = ((((\ _ _ x_aXSj _ -> x_aXSj) (error "mds404")) env8419_aXSg)
                         Nothing)
                        req8419_aXSh
    instance RouteAttrs MyApp where
      routeAttrs (ParentR _ ChildR {}) = Set.fromList [pack "child"]
      routeAttrs RootR {} = Set.fromList [pack "foo", pack "bar"]
      routeAttrs BlogPostR {} = Set.fromList []
      routeAttrs WikiR {} = Set.fromList []
      routeAttrs SubsiteR {} = Set.fromList []
      routeAttrs SubparamR {} = Set.fromList []
    instance RenderRoute MyApp where
      data YRC.Route MyApp
        = ParentR Text ParentR |
          RootR |
          BlogPostR Text |
          WikiR [Text] |
          SubsiteR (YRC.Route MySub) |
          SubparamR Int (YRC.Route MySubParam)
        deriving (Show, Eq, Read)
      renderRoute (ParentR dyn_aXS2 child_aXS3)
        = (\ (a_aXS5, b_aXS6)
             -> (((pack "foo")
                    ghc-prim-0.5.2.0:GHC.Types.:
                      ((Web.PathPieces.toPathPiece dyn_aXS2)
                         ghc-prim-0.5.2.0:GHC.Types.: a_aXS5)), 
                 b_aXS6))
            (childRender_aXS4 child_aXS3)
        where
            childRender_aXS4 ChildR = ([], [])
      renderRoute RootR = ([], [])
      renderRoute (BlogPostR dyn_aXS7)
        = (((pack "blog")
              ghc-prim-0.5.2.0:GHC.Types.:
                ((Web.PathPieces.toPathPiece dyn_aXS7)
                   ghc-prim-0.5.2.0:GHC.Types.: [])), 
           [])
      renderRoute (WikiR dyn_aXS8)
        = (((pack "wiki")
              ghc-prim-0.5.2.0:GHC.Types.:
                (Web.PathPieces.toPathMultiPiece dyn_aXS8)), 
           [])
      renderRoute (SubsiteR sub_aXS9)
        = (\ (a_aXSa, b_aXSb)
             -> (((pack "subsite") ghc-prim-0.5.2.0:GHC.Types.: a_aXSa), 
                 b_aXSb))
            (renderRoute sub_aXS9)
      renderRoute (SubparamR dyn_aXSc sub_aXSd)
        = (\ (a_aXSe, b_aXSf)
             -> (((pack "subparam")
                    ghc-prim-0.5.2.0:GHC.Types.:
                      ((Web.PathPieces.toPathPiece dyn_aXSc)
                         ghc-prim-0.5.2.0:GHC.Types.: a_aXSe)), 
                 b_aXSf))
            (renderRoute sub_aXSd)
    data ParentR
      = ChildR
      deriving (Show, Read, Eq)

test/RouteSpec.hs:230:26: error:
    • Exception when trying to run compile-time code:
        test/fixtures/routes_with_line_continuations: openFile: does not exist (No such file or directory)
      Code: parseRoutesFile
              "test/fixtures/routes_with_line_continuations"
    • In the untyped splice:
        $(parseRoutesFile "test/fixtures/routes_with_line_continuations")
    |
230 |                 routes = $(parseRoutesFile "test/fixtures/routes_with_line_continuations")
    |                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

@snoyberg snoyberg closed this in 6eb91bd Oct 15, 2018

@snoyberg

This comment has been minimized.

Copy link
Member

snoyberg commented Oct 15, 2018

Thanks for the report, it should be addressed in the just-released 1.6.8.1. Let me know if the problem persists.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.