[ dropping misc@ from CC list ]

On 2022/04/03 11:25, Ashlen wrote:
> With the previous emails in mind, I have a diff for the build script in
> the ports tree if it would help. My xmonad.hs hardly changes these days.
> If the build script actually recompiled xmonad every time instead of
> quitting if xmonad.hs hasn't changed, I don't think this issue would
> come up in the future.

How about comparing the date of /usr/local/bin/xmonad as well?
If libraries have changed such that a rebuild is needed, that binary
ought to have been updated too.

if [ "${output_file}" -nt xmonad.hs -a "${output_file}" -nt 
/usr/local/bin/xmonad ]; then
...

Or is it fast enough anyway? I couldn't tell, there seem to be other problems:

| Install notice:
| XMonad is now compiled using `cabal v2-build`. If you rely on a custom
| xmonad.hs configuration file, you should switch to using
| ~/.xmonad/build script. An example is included in
| /usr/local/share/examples/xmonad-0.17.0

Looks like it should be ~/.config/xmonad/build rather than ~/.xmonad/build,
but also it doesn't seem to actually work:

| $ Xnest :1 &
| [1] 13846
| $ DISPLAY=:1 xmonad
| XMonad is recompiling and replacing itself with another XMonad process 
because the current process is called "xmonad" but the compiled configuration 
should be called "xmonad-x86_64-openbsd"
| XMonad will use build script at "/home/sthen/.config/xmonad/build" to 
recompile.
| XMonad recompiling because a custom build script is being used.
| Errors detected while compiling xmonad config: 
/home/sthen/.config/xmonad/xmonad.hs
| $ /home/sthen/.config/xmonad/build 
/home/sthen/.cache/xmonad/xmonad-x86_64-openbsd
| cabal: Unknown package "exe".
| 
| 
| Please check the file for errors.
| 
| /home/sthen/.cache/xmonad/xmonad-x86_64-openbsd: executeFile: does not exist 
(No such file or directory)
...

Reply via email to