1426 Commits

Author SHA1 Message Date
github-actions
131fd3669f man: Update 2021-04-27 11:05:32 +01:00
Tomas Janousek
56f810d182 GenerateManpage: Drop all dependencies except base and invoke in CI
pandoc's API changes often enough that distros like Debian were patching
our GenerateManpage.hs to work with their version of pandoc, and it
doesn't build against any Stackage LTS except the recently released
LTS-17. Also, building pandoc from source takes quite some time and
resources.

But for what benefit? We're not using any special pandoc functionality
whatsoever. It's just that it was all in Haskell and the entire build
was orchestrated by cabal, but is all that complexity and resource
consumption worth it? I think not.

(Frankly, this whole thing was just a massive waste of time as the help
text in Config.hs isn't generated at all, so we still need to do this
manually. And then, the default key-bindings in core are unlikely to
change ever again.)

Let's simplify this:

* drop all dependencies except base and just run it through runhaskell

* add a Makefile and GH Actions workflow that invokes this after push

* only ship the results in release tarball, not the scripts which are
  considered our dev infrastructure

Closes: https://github.com/xmonad/xmonad/issues/283
Related: https://github.com/xmonad/xmonad/pull/260
Related: https://github.com/xmonad/xmonad/pull/261
Related: https://github.com/xmonad/xmonad/pull/265
Related: https://github.com/xmonad/xmonad/pull/266
Related: https://github.com/xmonad/xmonad/pull/267
Related: https://github.com/xmonad/xmonad/pull/268
2021-04-27 11:05:32 +01:00
Tomáš Janoušek
46f637e0be
Merge pull request #289 from slotThe/maintainers
Update MAINTAINERS.md: add twitter, website references
2021-04-08 21:14:57 +01:00
slotThe
095d0e37d6 Update MAINTAINERS.md: add twitter, website references
Relevant mailing list discussion for the website part is available at
[1].

[1]: https://mail.haskell.org/pipermail/xmonad/2020-February/015358.html
2021-04-08 19:29:38 +02:00
Tomáš Janoušek
7e798afd11
Merge pull request #288 from slotThe/minimal-pragma
Add `MINIMAL` for `ExtensionClass` and `LayoutClass`
2021-04-07 18:33:07 +01:00
slotThe
669a9aed9e LayoutClass: update documentation
Make it clearer that we in fact do not require implementations for a
minimal complete definition, but that the default implementations have a
certain kind of dependency structure.
2021-04-07 10:12:15 +02:00
slotThe
c869129c71 ExtensionClass: Use MINIMAL pragma 2021-04-07 10:12:14 +02:00
Tomáš Janoušek
b8523a3c9b
Merge pull request #202 from wygulmage/stack_instances
Add Functor, Foldable, and Traversable instances for StackSet.Stack
2021-04-04 09:56:45 +01:00
Tomas Janousek
400730fe3b Disable quickcheck-classes when building with stack
Stack doesn't support automatic flags: it doesn't backtrack when
dependency resolution fails using the default value of an automatic
flag, it just fails the build plan construction. We can't use automatic
flags to check if quickcheck-classes is available, and since the code is
tested by the haskell-ci.yml cabal workflow anyway, let's just disable
it here. It's not worth the hassle trying to enable it for select LTS
versions only. It's too much noise already, actually. :-(

Further reading:
https://cabal.readthedocs.io/en/latest/cabal-package.html#resolution-of-conditions-and-flags
https://github.com/commercialhaskell/stack/issues/1313#issuecomment-157259270
2021-04-03 17:13:25 +01:00
Tomas Janousek
6c5204b91c Simplify quickcheck-classes tests for Stack
We don't need the compat hacks for GHC 8.4.
2021-04-03 17:13:25 +01:00
Tomas Janousek
910d99cb74 Update CHANGES 2021-04-03 17:13:25 +01:00
Tomas Janousek
031bbd6230 Make quickcheck-classes dependency optional 2021-04-03 17:13:25 +01:00
Keith
05e8c204e9 Add quickcheck-classes tests for Stack
The tests are implemented by using a newtype wrapper `TestStack`. This is to
avoid creating `Eq1` and `Show1` instances for `Stack` itself, which are needed
by quickcheck-classes to run with GHC less than 8.5. Tests are automatically
generated by `traversalLaws` and `foldableLaws` using the `Arbitrary` instance
for `TestStack`.
2021-04-03 17:13:25 +01:00
Keith
2c91ea1621 Add Foldable, Functor, and Traversable instances for Stack
`Functor` is provided by DeriveFunctor.
`Foldable` uses `integrate` (`Stack`'s `toList`).
`Traversable` uses the `Reverse` Applicative to traverse the `up` list in
reverse order.
2021-04-03 17:13:25 +01:00
Tomas Janousek
5cdf428f55 ci: Enable -Werror
We don't want to ignore warnings do we?
2021-03-31 12:00:30 +01:00
Tomas Janousek
22b579bd14 Drop deprecated migrateState
migrateState is only necessary when _live_ upgrading from xmonad 0.12,
so I believe we can drop it now.

This fixes a compilation warning that we'd otherwise have to suppress.
2021-03-31 12:00:30 +01:00
Tomas Janousek
14d9fa247a Drop "testing" cabal flag
Since 8863761d660a70984595d9162319801e648b69ec (early 2014), the test
suite is a proper cabal test-suite and needs the "xmonad" library to be
built, and thus the flag serve no purpose.

Related: https://github.com/xmonad/xmonad/issues/283
2021-03-31 12:00:30 +01:00
Tomas Janousek
cfe99998fc ci: Cache pantry (hackage metadata) separately
This further reduces our usage of cache storage by caching the metadata
only once per repo. Now the metadata cache is ~250MB and the individual
caches with built dependencies are ~5M each.

Related: https://github.com/xmonad/X11/pull/75
Related: https://github.com/xmonad/xmonad/issues/283
2021-03-31 12:00:30 +01:00
Tomas Janousek
9fce3805fc ci: Use system GHC in Stack to not waste GH Actions cache space
Stack installation of GHC takes more than a gigabyte, so caching it
wastes space (GitHub docs say it will be aggressively evicted after
reaching the 5G limit) and also time (compression, decompression).

Related: https://github.com/xmonad/X11/pull/75
Related: https://github.com/xmonad/xmonad/issues/283
2021-03-31 12:00:30 +01:00
Tomas Janousek
fd243ca1c1 ci: Refresh tested-with
Related: https://github.com/xmonad/X11/pull/75
Related: https://github.com/xmonad/xmonad/issues/283
2021-03-31 12:00:30 +01:00
Tomas Janousek
c90df53081 tests: Fix build with GHC 9
Related: https://github.com/xmonad/xmonad/issues/283
2021-03-31 12:00:30 +01:00
Tomas Janousek
e4659c2475 ci: Move apt deps to cabal.haskell-ci and regenerate haskell-ci
Related: https://github.com/xmonad/X11/pull/75
Related: https://github.com/xmonad/xmonad/issues/283
2021-03-31 11:59:13 +01:00
Tomas Janousek
caae51c399 ci: Minor cleanup
* rename workflow to Stack

* test all branches (provides feedback before opening a PR)

* split into buildenv deps and stack build

* make the deps list more git-friendly; tweak the deps

* use stack from github environment (I've seen the curl fail intermittently)

* use `*.cabal` to minimize diff between our repos

Related: https://github.com/xmonad/X11/pull/75
Related: https://github.com/xmonad/xmonad/issues/283
2021-03-31 11:58:07 +01:00
Tomas Janousek
fb390fa9cc Revert "Revert "Re-enable lts based testing""
This reverts commit 8a8d5f71b16a929222579b3d3509ed31ae9e124d.

There will be a separate GH Actions workflow for rebuilding the manpage,
and generatemanpage will be dropped from xmonad.cabal (see
https://github.com/xmonad/xmonad/issues/283) therefore the revert no
longer makes sense and the stack workflow can indeed be reverted back to
a working state so we can continue from there.

For more information, see the following revenge revert storm:

Related: https://github.com/xmonad/xmonad/issues/283
Related: https://github.com/xmonad/xmonad/pull/260
Related: https://github.com/xmonad/xmonad/pull/261
Related: https://github.com/xmonad/xmonad/pull/265
Related: https://github.com/xmonad/xmonad/pull/266
Related: https://github.com/xmonad/xmonad/pull/267
Related: https://github.com/xmonad/xmonad/pull/268
2021-03-31 11:52:57 +01:00
Tomáš Janoušek
4a0b166998
Merge pull request #275 from liskin/pr/notifications-obscured-by-floats
Fix obscuring notifications when moving floats
2021-03-21 21:30:36 +00:00
Tomas Janousek
b9ce5b034b Fix obscuring notifications when moving floats
Since 4565e2c90ef5, not only do we raise the floating window to top when
starting dragging, we also restack all other managed windows directly
below it (mouse{Move,Resize}Window now call `float` while dragging,
which invoke `windows` and that restacks all windows). This means that
as soon as we start dragging, all xmonad-managed windows are raised to
the top, obscuring any unmanaged (override-redirect) windows that were
at the top before.

The good thing about 4565e2c90ef5 is that since we refloat and refresh
on every mouse move while dragging, we no longer need the `raiseWindow`.
It was probably only there so that it stays visible when dragging
between Xinerama screens (3cb64d74617), and that's taken care of by
refloating the window on every move. As the refresh restacks everything
anyway, the only function of the `raiseWindow` is to stack windows above
unmanaged ones, which is likely undesirable.

There is still one known issue related to obscuring notifications:
https://github.com/xmonad/xmonad/issues/89
That one is caused by X opening new windows at the top of stacking order
and xmonad then restacking all other windows directly beneath them if
the new window is in the master position of the stack. Some notification
daemons like dunst work around this by raising themselves whenever a new
window is opened
(77bfbc4f7f/src/x11/x.c (L348)).
Fixing this one is considerably more complicated as we'd need to keep
track of (unmanaged) windows that wish to be stacked above new windows,
therefore this won't be addressed here, and probably won't be addressed
in xmonad core ever.

Fixes: https://github.com/xmonad/xmonad/issues/208
Fixes: 4565e2c90ef5 ("fix #63: window jumping to origin position when dragging")
2021-02-16 12:00:28 +00:00
Tomáš Janoušek
a90558c07e
Merge pull request #223 from wygulmage/cleanup-tests
deleted unused 'mul' definition in 'prop_aspect_fits'.
2021-01-26 01:15:01 +01:00
Sibi Prabakaran
56b0f850bc
Merge pull request #200 from wygulmage/strict-rectangle
Make ScreenDetail a newtype and RationalRect strict in its contents
2021-01-23 19:46:15 +05:30
Peter Simons
51a179dc68
Merge pull request #267 from xmonad/revert-266-reenable-lts
Revert "Re-enable lts based testing"
2021-01-20 12:48:44 +01:00
Peter Simons
8a8d5f71b1
Revert "Re-enable lts based testing" 2021-01-20 12:48:13 +01:00
Tomáš Janoušek
4b69a456cc
Merge pull request #266 from xmonad/reenable-lts
Re-enable lts based testing
2021-01-20 12:27:53 +01:00
Sibi Prabakaran
e12d0be1b2
Re-enable lts based testing 2021-01-20 16:20:58 +05:30
Peter Simons
002326ceb1
Merge pull request #265 from xmonad/t/haskell-ci
Generate CI with the haskell-ci utility.
2021-01-19 20:58:01 +01:00
Peter Simons
758e3d85e6 Generate CI with the haskell-ci utility. 2021-01-19 20:48:16 +01:00
Keith
f5bd77a7f8 made ScreenDetail a newtype and RationalRect strict in its contents. 2021-01-19 12:06:07 -05:00
Tomáš Janoušek
519c79a57e
Merge pull request #263 from slotThe/exception-extensible
Control.Exception.Extensible -> Control.Exception
2021-01-17 20:39:00 +01:00
slotThe
0aa40480f9 Control.Exception.Extensible -> Control.Exception
According to its documentation[1], this module simply re-exports
Control.Exception on recent GHC versions.  As we only support recent
versions, this import is unnecessary.

[1] http://hackage.haskell.org/package/extensible-exceptions-0.1.1.4/docs/Control-Exception-Extensible.html
2021-01-12 11:57:34 +01:00
Peter Simons
36dd6afb49
Merge pull request #261 from xmonad/t/switch-stack-builds-to-nightly
stack.yaml: switch from Stackage LTS to Nightly
2021-01-10 19:36:12 +01:00
Peter Simons
3015968ee4 Run CI builds with Stackage Nightly.
Unfortunately, our CI builds have a hard-coded assumption that all kinds of
LTS-X builds can be performed with the same stack.yaml file, which is not true.
We need to use specialized build instructions for each version of the
environment we're building in, e.g. stack-lts-16.yaml, stack-nightly.yaml, and
so on. Making that change is not super hard, but it's not completely trivial
either because the hooks use a hash of the stack file to determine whether the
cash is still valid, etc., and I'm not entirely sure about the best way to
adapt that code to support multiple YAML files.

For the time being, the most important build IMHO is Stackage Nightly,
because (a) we really want to support the nightly snapshot since (b) it can
compile the genmanpage executable relatively easily.
2021-01-09 19:46:50 +01:00
Peter Simons
5bb6c88b41 stack.yaml: switch from Stackage LTS to Nightly
Let's use a moderately recent compiler like ghc-8.10.3
instead of the old 8.8.x branch for development. Same goes
for our dependencies; development should take place with
recent versions of our dependencies.
2021-01-09 18:06:17 +01:00
Tomáš Janoušek
f875a56620
Merge pull request #258 from slotThe/xdg-things
Revise XDG handling
2021-01-07 19:52:51 +01:00
slotThe
70a75e5e3f Update documentation 2021-01-07 17:25:30 +01:00
slotThe
735fb58f6c Revise XDG handling
Improve handling of the whole XDG situation.  This now looks as follows

  1. If all three of xmonad's environment variables (XMONAD_DATA_DIR,
     XMONAD_CONFIG_DIR, and XMONAD_CACHE_DIR) are set, use them.
  2. If there is a build script `build' or configuration `xmonad.hs' in
     `~/.xmonad', set all three directories to `~/.xmonad'.
  3. Otherwise, use XDG_DATA_HOME, XDG_CONFIG_HOME, and
     XDG_CACHE_HOME (or their respective fallbacks).

If none of the above exist, we default to using the XDG_* variables,
creating the necessary directories if needed.
2021-01-07 15:32:02 +01:00
Tomas Janousek
e8f48b77f9 Sync MAINTAINERS.md with reality on GitHub 2021-01-03 14:05:32 +01:00
Sibi Prabakaran
e363c44bb0
Merge pull request #259 from vmchale/master
Accord with new pattern-match
2021-01-01 11:52:44 +05:30
Vanessa McHale
ec1c3e0159 update changelog 2020-12-31 20:19:10 -06:00
Vanessa McHale
2a1a18023a Accord with new pattern-match 2020-12-31 20:17:22 -06:00
Tomas Janousek
ff738988d3 github: Sync test workflow with that of xmonad-contrib 2020-12-16 11:24:15 +00:00
Sibi Prabakaran
fc4657d529
Merge pull request #252 from slotThe/unused-imports
Get rid of unused imports
2020-12-16 10:30:05 +05:30
Tomáš Janoušek
bd961b7866
Merge pull request #255 from felixonmars/patch-1
Correct a typo in Layout.hs
2020-12-16 01:16:05 +00:00