fix build with assistant disabled and webapp enabled

The webapp modules cannot build with the assistant disabled, so make the
webapp be under the assistant build flag.

Sponsored-by: Jarkko Kniivilä on Patreon
This commit is contained in:
Joey Hess 2022-06-29 14:11:20 -04:00
parent 46faf74d90
commit 02ef3d6a64
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
5 changed files with 68 additions and 57 deletions

View file

@ -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 <id@joeyh.name> Tue, 28 Jun 2022 14:49:17 -0400

View file

@ -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

View file

@ -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]]

View file

@ -515,12 +515,6 @@ Executable git-annex
Includes: Utility/libkqueue.h
Other-Modules: Utility.DirWatcher.Kqueue
if flag(Dbus)
if (os(linux))
Build-Depends: dbus (>= 0.10.7), fdo-notify (>= 0.3)
CPP-Options: -DWITH_DBUS -DWITH_DESKTOP_NOTIFY -DWITH_DBUS_NOTIFICATIONS
Other-Modules: Utility.DBus
if flag(Webapp)
Build-Depends:
yesod (>= 1.4.3),
@ -575,6 +569,12 @@ Executable git-annex
Utility.Yesod
Utility.WebApp
if flag(Dbus)
if (os(linux))
Build-Depends: dbus (>= 0.10.7), fdo-notify (>= 0.3)
CPP-Options: -DWITH_DBUS -DWITH_DESKTOP_NOTIFY -DWITH_DBUS_NOTIFICATIONS
Other-Modules: Utility.DBus
if flag(Pairing)
Build-Depends: network-multicast, network-info
CPP-Options: -DWITH_PAIRING

View file

@ -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