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

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

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