diff --git a/CHANGELOG b/CHANGELOG index 6810b10036..d48aaf1ad4 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -5,6 +5,8 @@ git-annex (10.20220625) UNRELEASED; urgency=medium * stack.yaml: Updated to lts-19.13 * --backend is no longer a global option, and is only accepted by commands that actually need it. + * Fix building with the Assistant build flag disabled but the Webapp + build flag enabled. -- Joey Hess Tue, 28 Jun 2022 14:49:17 -0400 diff --git a/Utility/Matcher.hs b/Utility/Matcher.hs index 1772c230b3..567522b59e 100644 --- a/Utility/Matcher.hs +++ b/Utility/Matcher.hs @@ -34,6 +34,8 @@ module Utility.Matcher ( import Common +import Data.Kind + {- A Token can be an Operation of an arbitrary type, or one of a few - predefined peices of syntax. -} data Token op = Operation op | And | Or | Not | Open | Close @@ -136,7 +138,7 @@ matchM m v = matchMrun m $ \o -> o v {- More generic running of a monadic Matcher, with full control over running - of Operations. Mostly useful in order to match on more than one - parameter. -} -matchMrun :: forall o (m :: * -> *). Monad m => Matcher o -> (o -> m Bool) -> m Bool +matchMrun :: forall o (m :: Type -> Type). Monad m => Matcher o -> (o -> m Bool) -> m Bool matchMrun m run = go m where go MAny = return True diff --git a/doc/bugs/can__39__t_build_without_assistant.mdwn b/doc/bugs/can__39__t_build_without_assistant.mdwn index 22171a2275..7cb17ece2a 100644 --- a/doc/bugs/can__39__t_build_without_assistant.mdwn +++ b/doc/bugs/can__39__t_build_without_assistant.mdwn @@ -30,3 +30,10 @@ I don't know haskell, but try to make optional building of Assistant, see [patch ### Have you had any luck using git-annex before? (Sometimes we get tired of reading bug reports all day and a lil' positive end note does wonders) Yes, use it for several years and have approx 100G repo with 10k+ files. Works fine. +> You had the webapp flag enabled and the assistant disabled. +> That does not make sense; the assistant is part of the webapp. +> That explains why it failed to build. Disabling both webapp and assistant +> works, or only webapp and not assistant. +> +> Ok, fixed it to not build the webapp when the assistant flag is disabled. +> [done]] --[[Joey]] diff --git a/git-annex.cabal b/git-annex.cabal index 93edbdd94b..99e313f862 100644 --- a/git-annex.cabal +++ b/git-annex.cabal @@ -514,6 +514,60 @@ Executable git-annex C-Sources: Utility/libkqueue.c Includes: Utility/libkqueue.h Other-Modules: Utility.DirWatcher.Kqueue + + if flag(Webapp) + Build-Depends: + yesod (>= 1.4.3), + yesod-static (>= 1.5.1), + yesod-form (>= 1.4.8), + yesod-core (>= 1.6.0), + path-pieces (>= 0.2.1), + warp (>= 3.2.8), + warp-tls (>= 3.2.2), + wai, + wai-extra, + blaze-builder, + clientsession, + template-haskell, + shakespeare (>= 2.0.11) + CPP-Options: -DWITH_WEBAPP + Other-Modules: + Command.WebApp + Assistant.Threads.WebApp + Assistant.Threads.PairListener + Assistant.WebApp + Assistant.WebApp.Common + Assistant.WebApp.Configurators + Assistant.WebApp.Configurators.AWS + Assistant.WebApp.Configurators.Delete + Assistant.WebApp.Configurators.Edit + Assistant.WebApp.Configurators.Fsck + Assistant.WebApp.Configurators.IA + Assistant.WebApp.Configurators.Local + Assistant.WebApp.Configurators.Pairing + Assistant.WebApp.Configurators.Preferences + Assistant.WebApp.Configurators.Ssh + Assistant.WebApp.Configurators.Unused + Assistant.WebApp.Configurators.Upgrade + Assistant.WebApp.Configurators.WebDAV + Assistant.WebApp.Control + Assistant.WebApp.DashBoard + Assistant.WebApp.Documentation + Assistant.WebApp.Form + Assistant.WebApp.Gpg + Assistant.WebApp.MakeRemote + Assistant.WebApp.Notifications + Assistant.WebApp.OtherRepos + Assistant.WebApp.Page + Assistant.WebApp.Pairing + Assistant.WebApp.Repair + Assistant.WebApp.RepoId + Assistant.WebApp.RepoList + Assistant.WebApp.SideBar + Assistant.WebApp.Types + Assistant.MakeRepo + Utility.Yesod + Utility.WebApp if flag(Dbus) if (os(linux)) @@ -521,60 +575,6 @@ Executable git-annex CPP-Options: -DWITH_DBUS -DWITH_DESKTOP_NOTIFY -DWITH_DBUS_NOTIFICATIONS Other-Modules: Utility.DBus - if flag(Webapp) - Build-Depends: - yesod (>= 1.4.3), - yesod-static (>= 1.5.1), - yesod-form (>= 1.4.8), - yesod-core (>= 1.6.0), - path-pieces (>= 0.2.1), - warp (>= 3.2.8), - warp-tls (>= 3.2.2), - wai, - wai-extra, - blaze-builder, - clientsession, - template-haskell, - shakespeare (>= 2.0.11) - CPP-Options: -DWITH_WEBAPP - Other-Modules: - Command.WebApp - Assistant.Threads.WebApp - Assistant.Threads.PairListener - Assistant.WebApp - Assistant.WebApp.Common - Assistant.WebApp.Configurators - Assistant.WebApp.Configurators.AWS - Assistant.WebApp.Configurators.Delete - Assistant.WebApp.Configurators.Edit - Assistant.WebApp.Configurators.Fsck - Assistant.WebApp.Configurators.IA - Assistant.WebApp.Configurators.Local - Assistant.WebApp.Configurators.Pairing - Assistant.WebApp.Configurators.Preferences - Assistant.WebApp.Configurators.Ssh - Assistant.WebApp.Configurators.Unused - Assistant.WebApp.Configurators.Upgrade - Assistant.WebApp.Configurators.WebDAV - Assistant.WebApp.Control - Assistant.WebApp.DashBoard - Assistant.WebApp.Documentation - Assistant.WebApp.Form - Assistant.WebApp.Gpg - Assistant.WebApp.MakeRemote - Assistant.WebApp.Notifications - Assistant.WebApp.OtherRepos - Assistant.WebApp.Page - Assistant.WebApp.Pairing - Assistant.WebApp.Repair - Assistant.WebApp.RepoId - Assistant.WebApp.RepoList - Assistant.WebApp.SideBar - Assistant.WebApp.Types - Assistant.MakeRepo - Utility.Yesod - Utility.WebApp - if flag(Pairing) Build-Depends: network-multicast, network-info CPP-Options: -DWITH_PAIRING diff --git a/stack.yaml b/stack.yaml index 4b97f255f5..623080a477 100644 --- a/stack.yaml +++ b/stack.yaml @@ -1,10 +1,10 @@ flags: git-annex: production: true - assistant: true + assistant: false pairing: true torrentparser: true - webapp: true + webapp: false magicmime: false dbus: false debuglocks: false