Commit graph

43910 commits

Author SHA1 Message Date
Joey Hess
9e2e5bc79b
relocate BLOCK.txt to move convenient location 2023-08-02 11:58:07 -04:00
Joey Hess
f1842b616a
fix stack build on windows
For whatever reason, putting Win32-2.13.4.0 in stack.yaml results in
stack blowing up with many unrelated dependency problems.
But making git-annex depend on that version lets stack resolve deps.
2023-08-02 11:50:12 -04:00
Joey Hess
7d81b3b0d9
pin win32 to working version 2023-08-02 10:48:23 -04:00
Joey Hess
9a60f5b65f
fix build on windows 2023-08-02 10:43:20 -04:00
Joey Hess
8adafdd013
avoid cpp failure on windows
Seems that while the module is not imported by anything on windows, it
still gets cpped, and MIN_VERSION_unix is not defined so it failed to
preprocess.
2023-08-02 10:08:00 -04:00
Joey Hess
19d95c9bb8
enable TypeOperators
more warnings about ~ needing it in a future ghc release
2023-08-02 09:47:42 -04:00
Joey Hess
28864f0bb2
add back utf8-string to setup build deps
Needed on Windows since Utility.FileSystemEncoding uses it
2023-08-02 09:29:23 -04:00
Joey Hess
3a52b4c4c3
fix hang when built with unix-2.8
git-annex test hang when running git-annex add in an adjusted unlocked
branch. I couldn't seem to reproduce the hang outside the test suite.

Seems that the code added in 26a9ea12d1
was buggy, and as that commit was made without testing it, building with
unix-2.8 exposed the bug.

I don't fully understand the bug, which involves fdToHandle
and then closing the fd, vs closing the handle. May somehow involve
laziness or forcing around the S.hGet? Using hClose solved it
in any case.

(Also eliminated checkcontentfollowssymlinks to fix a build warning
when it's not used.)
2023-08-01 20:22:28 -04:00
Joey Hess
6da6449fff
stack.yaml: Update to build with ghc-9.6.2 and aws-0.24
This enables some new features that need the new aws.

Use http-client-restricted-0.1.0 because it uses the crypton side of the
cryptonite/crypton fork, which seems to be needed for ghc-9.6.2.

Dependency on connection removed because of the cryptonite/crypton fork.
This avoids needing a build flag. It was only used to throw a typed
exception in Utility.Url, which nothing depended on.

Used a fork of bloomfilter because it's not being maintained and no longer
builds as-of this ghc version. (I have been trying to contact its
maintainer about it, and emailed him today suggesting I take over the
package.)

Sponsored-by: Brock Spratlen on Patreon
2023-08-01 18:53:26 -04:00
Joey Hess
68c9b08faf
fix build with unix-2.8.0
Changed the parameters to openFd. So needed to add a small wrapper
library to keep supporting older versions as well.
2023-08-01 18:41:27 -04:00
Joey Hess
4ef16f53ed
enable TypeOperators 2023-08-01 18:39:01 -04:00
Joey Hess
aa5e333cb7
fix whitespace
Thanks to a compile warning from new ghc
2023-08-01 18:36:54 -04:00
Joey Hess
11db986781
enable TypeOperators
The use of ‘~’ without TypeOperators
    will become an error in a future GHC release.

says new ghc
2023-08-01 18:33:39 -04:00
Joey Hess
eb8e30a2f1
fix build with unix-2.8.0
got the arguments the wrong way around when I wrote this

also squelch a build warning
2023-08-01 18:27:12 -04:00
Joey Hess
63f76d0ac3
fix build with unix-2.8.0
It made UserInfo into a pattern to discourage manually constructing
them, so just to use UserInfo in a type signature of a function that
consumes them, have to import the new ByteString module.
2023-08-01 17:47:30 -04:00
Joey Hess
d76f088dc4
fix build on windows 2023-08-01 17:39:24 -04:00
Joey Hess
3b825eb7a6
rewrap 2023-08-01 15:47:05 -04:00
Joey Hess
fb640bc2f4
support building with unix-compat 0.7
It removed System.PosixCompat.User.
2023-08-01 15:17:43 -04:00
Joey Hess
1bc7792101
Merge branch 'master' of ssh://git-annex.branchable.com 2023-08-01 15:17:07 -04:00
Joey Hess
393275c105
Setup.hs: Stop installing man pages, desktop files, and the git-annex-shell and git-remote-tor-annex symlinks
Anything still relying on that, eg via cabal v1-install will need to
change to using make install-home. Which was added back in 2019 in
6491b62614 because cabal new-build
(now the default) already didn't use Setup in a way that let its
installation of those things work.

Notably this means Setup does not need to depend on unix-compat, which is
useful because in 0.7 it removed System.PosixCompat.User, which Setup
needed to determine where to install the desktop files. See
https://github.com/haskell-pkg-janitors/unix-compat/issues/3
2023-08-01 15:08:56 -04:00
xvorsx@a3fc1a0cf228782f624e5eb21ba8a664227b6c60
e9b8e09b2c 2023-08-01 06:36:50 +00:00
nobodyinperson
8740a46f02 Add missing formatting backtick 2023-08-01 05:32:19 +00:00
Joey Hess
fa92383993
onlyingroup
* Support "onlyingroup=" in preferred content expressions.
* Support --onlyingroup= matching option.

Sponsored-by: Jack Hill on Patreon
2023-07-31 14:43:58 -04:00
Joey Hess
a17ece1428
foo 2023-07-31 14:03:18 -04:00
Joey Hess
a5606f1c43
comment 2023-07-31 14:01:33 -04:00
Joey Hess
d2a87d4a1b
comment 2023-07-31 13:50:12 -04:00
Joey Hess
a7ae014eb6
mention --explain
Sponsored-by: Dartmouth College's DANDI project
2023-07-31 13:28:02 -04:00
Joey Hess
473d66132d
display explanations in --debug too
When --explain is not enabled. This can be useful debugging information
as well.

Sponsored-by: Dartmouth College's DANDI project
2023-07-31 13:06:40 -04:00
Joey Hess
846384fc3a
--explain for numcopies checks
And closed the todo as completed.

Sponsored-by: Dartmouth College's DANDI project
2023-07-31 12:53:17 -04:00
nobodyinperson
2fb9a24b48 Added a comment: onlyingroup also useful for offline backup drives 2023-07-31 04:40:43 +00:00
nobodyinperson
e26f371bac Added a comment 2023-07-30 06:53:58 +00:00
branch
03a5f3ec6b 2023-07-29 21:35:16 +00:00
nobodyinperson
02c5f1e3a8 Added a comment: No built-in way for dropping all old versions of a file AFAIK 2023-07-29 17:43:41 +00:00
nobodyinperson
33dac74dfa Suggest that git annex diffdriver fetches content to diff 2023-07-29 17:07:22 +00:00
mario
2503ff17db Added a comment: Dropping all older versions of a file 2023-07-29 12:57:03 +00:00
aragilar
732532ba49 Added a comment 2023-07-28 02:47:42 +00:00
nobodyinperson
daa4dd8951 Added a comment: --explain is very helpful 👍 2023-07-27 15:22:47 +00:00
Joey Hess
588cda3833
Merge branch 'master' of ssh://git-annex.branchable.com 2023-07-26 15:44:47 -04:00
Joey Hess
499d014123
improve match explanations
Using == and != proved too hard to read, so went with [TRUE] and [FALSE]
after the term. I would kind of liked to have used emojis for a green
check and red X, but probably that is too fancy to be a good idea.

Make --explain output be inside [ ] with whitespace around them, to
avoid it ending with eg "[FALSE]]" and to make it easier to visually
find the start of it.

Sponsored-by: Dartmouth College's DANDI project
2023-07-26 15:37:03 -04:00
Joey Hess
08071a1b90
improve match result display simplifier
Sponsored-by: Dartmouth College's DANDI project
2023-07-26 15:28:57 -04:00
Joey Hess
70de4a7e6d
fix bug in match result display simplifier
Sponsored-by: Dartmouth College's DANDI project
2023-07-26 15:28:49 -04:00
Joey Hess
518a51a8a0
--explain for preferred/required content matching
And annex.largefiles and annex.addunlocked.

Also git-annex matchexpression --explain explains why its input
expression matches or fails to match.

When there is no limit, avoid explaining why the lack of limit
matches. This is also done when no preferred content expression is set,
although in a few cases it defaults to a non-empty matcher, which will
be explained.

Sponsored-by: Dartmouth College's DANDI project
2023-07-26 14:50:04 -04:00
nobodyinperson
e20c7ceb35 Added a comment: Workaround for listing dead remotes 2023-07-26 17:40:56 +00:00
aragilar
20a449db12 2023-07-26 12:56:21 +00:00
Joey Hess
ba1c222912
Merge branch 'master' of ssh://git-annex.branchable.com 2023-07-25 17:02:18 -04:00
Joey Hess
f25eeedeac
initial implementation of --explain
Currently it only displays explanations of options like --in and --copies.

In the future, it should explain preferred content expression evaluation
and other decisions.

The explanations of a few things could be better. In particular,
"standard" will just appear as-is (or as "!standard" if it doesn't
match), rather than explaining why the standard preferred content expression
for the group matches or not.

Currently as implemented, it goes to stdout, and so commands like
git-annex find that have custom output will not display --explain
information. Perhaps that should change, dunno.

Sponsored-by: Dartmouth College's DANDI project
2023-07-25 16:52:57 -04:00
Joey Hess
cf40e2d4b6
Revert "use existing debug machinery for explain"
This reverts commit 409572c9e4.
2023-07-25 15:53:50 -04:00
Joey Hess
409572c9e4
use existing debug machinery for explain
explain is a kind of debug message, but not formatted in the same way.
So it makes sense to reuse the debug machinery for it, since that is
already quite optimised.

Sponsored-by: Dartmouth College's DANDI project
2023-07-25 15:47:58 -04:00
Joey Hess
fbf19338be
remove excess doubled parens in match description
Sponsored-by: Dartmouth College's DANDI project
2023-07-25 13:55:01 -04:00
Joey Hess
f280d38045
parenthesize match description as needed to avoid ambiguity
While avoiding most unncessary parens.

Once case where unncessary parens are not avoided is:

	not ( ( not foo and baz ) )

It would be good eventually to remove doubled parens like these.

Sponsored-by: Dartmouth College's DANDI project
2023-07-25 13:40:23 -04:00