Issue 350 in xmonad: Investigate using Dyre for xmonad configuration

Status: Accepted Owner: gwern0 Labels: Milestone-Release1.0 New issue 350 by SpencerJanssen: Investigate using Dyre for xmonad configuration http://code.google.com/p/xmonad/issues/detail?id=350 http://hackage.haskell.org/package/dyre Things we need to know before switching: * Can we make the transition seamless for our users? This means the config file format, location remain unchanged. * Is the maintainer available and cooperative? Will bug reports and patches be attended to in a timely manner? -- You received this message because you are listed in the owner or CC fields of this issue, or because you starred this issue. You may adjust your issue notification preferences at: http://code.google.com/hosting/settings

Comment #1 on issue 350 by gwern0: Investigate using Dyre for xmonad
configuration
http://code.google.com/p/xmonad/issues/detail?id=350
Looking at some of the opts, shouldn't be too hard.
http://hackage.haskell.org/packages/archive/dyre/0.8.2/doc/html/Config-Dyre....
3AprojectName
Going very quickly through the Params record, we'd want a config like:
\x -> Params { projectName = "xmonad",
configDir = Just ".xmonad",
cacheDir = configDir,
realMain = x,
showError =

Comment #2 on issue 350 by gwern0: Investigate using Dyre for xmonad configuration http://code.google.com/p/xmonad/issues/detail?id=350 As to whether Will Donnelly is 'available and cooperative', he has been in my few interactions with him, and presumably his use of github would help with that. Whether he will maintain it in the long run, I cannot say - he hasn't been involved in packages to a great extent or for a notably long period: http://www.google.com/search?hl=en&q=site%3Ahaskell.org+%22will.donnelly@gmail.com% 22&aq=f -- You received this message because you are listed in the owner or CC fields of this issue, or because you starred this issue. You may adjust your issue notification preferences at: http://code.google.com/hosting/settings

Comment #3 on issue 350 by vogt.adam: Investigate using Dyre for xmonad configuration http://code.google.com/p/xmonad/issues/detail?id=350 I can't find a version of dyre on hackage that supports base-3, so somebody either needs to fix dyre in that respect, or we should accept the loss of ghc-6.8 compatiblity (this is particularily a concern if we want to minimize trouble for ubuntu users, which still have ghc-6.8). -- You received this message because you are listed in the owner or CC fields of this issue, or because you starred this issue. You may adjust your issue notification preferences at: http://code.google.com/hosting/settings

Comment #4 on issue 350 by gwern0: Investigate using Dyre for xmonad configuration http://code.google.com/p/xmonad/issues/detail?id=350 I doubt it would be too difficult to get dyre to support base-3. I did a quick dyre.cabal edit to diff --git a/dyre.cabal b/dyre.cabal index 8a6c395..c11e659 100644 --- a/dyre.cabal +++ b/dyre.cabal @@ -41,7 +41,7 @@ library Config.Dyre.Options, Config.Dyre.Compile, Config.Dyre.Relaunch - build-depends: base >= 4 && < 5, process, filepath, + build-depends: base < 4, process, filepath, directory, ghc-paths, old-time, binary, executable-path, xdg-basedir, io-storage and with my GHC 6.10.2 worked fine -- You received this message because you are listed in the owner or CC fields of this issue, or because you starred this issue. You may adjust your issue notification preferences at: http://code.google.com/hosting/settings

Comment #5 on issue 350 by vogt.adam: Investigate using Dyre for xmonad configuration http://code.google.com/p/xmonad/issues/detail?id=350 I have a branch which uses dyre: http://code.haskell.org/~aavogt/xmonad-dyre Compatibility for changes to the type of recompile (which could be left as-is, but the type should suggest what is legal): http://code.haskell.org/~aavogt/XMonadContrib/dyre/ And minor changes that were necessary to dyre (though more need to be made to duplicate xmonad's current behavior, especially with respect to recompilation checking for ~/.xmonad/lib): http://code.haskell.org/~aavogt/dyre.git

Comment #6 on issue 350 by gwern0: Investigate using Dyre for xmonad configuration http://code.google.com/p/xmonad/issues/detail?id=350 aavogt, is Will accepting your Dyre patches?

Comment #7 on issue 350 by vogt.adam: Investigate using Dyre for xmonad configuration http://code.google.com/p/xmonad/issues/detail?id=350 I have not heard either way. That being said, my changes aren't complete and I was more or less asking for help in this (dated Nov 1, 2010): The following darcs repository xmonad uses dyre: http://code.haskell.org/~aavogt/xmonad-dyre/ I'm using ghc-6.12.3 and some part of the recompile seems to die: If I touch ~/.xmonad/xmonad.hs, then (xmonad --restart, or use a keybind to restart (Right True)) the WM exits due to this exception: Configuration '/home/aavogt/.xmonad/xmonad.hs' changed. Recompiling. xmonad: waitForProcess: does not exist (No child processes) The recompile dies with the same exception here, but the result is correct: touch ~/.xmonad/xmonad.hs; xmonad --recompile; xmonad --restart Some feature requests, somewhat related to what's already done in xmonad. (see http://code.google.com/p/xmonad/issues/detail?id=350) 1. there should be a way bypass dyre's recompilation checking; and force that executable to exit once recompilation is done. For the latter I've tried unsuccessfully: - write a global IORef before using dyre, and read it in the realMain which I'm not sure why that doesn't work - set config parameters, which obviously doesn't work since the config in ~/.xmonad/xmonad.hs shouldn't ask for early exit 2. dyre's recompilation checking could look in ./lib given -ilib, which makes changing files in a modular config trigger a recompile Thanks for you help, Adam

Comment #8 on issue 350 by Will.Donnelly: Investigate using Dyre for xmonad configuration http://code.google.com/p/xmonad/issues/detail?id=350 I am terribly sorry, I was completely swamped with coursework these past couple of months. I probably won't be able to work on it this year, but I'll finally have some time to work on it tomorrow.

Comment #9 on issue 350 by vogt.adam: Investigate using Dyre for xmonad configuration http://code.google.com/p/xmonad/issues/detail?id=350 This may or may not belong to dyre's responsibility, but it would be nice to specify that the xmonad.hs is compiled using the correct -package. If Cabal permits, ghc's package names could include those hashes, so multiple xmonad-0.9.2 could coexist (ex. global and user). Confusion resulting from unexpected results from multiple xmonad installs happens often in #xmonad. After a compile failure with restricted package versions fails, a second attempt should be made without the -hide-all-packages. That way multiple versions of xmonad could coexist for a single user, and it may make install errors clearer. The only downside I see is excessive code complexity. Haskell is more consise than my current description and some parts may be in dyre, so it might be worthwhile.

Updates: Cc: vogt.adam Comment #10 on issue 350 by vogt.a...@gmail.com: Investigate using Dyre for xmonad configuration http://code.google.com/p/xmonad/issues/detail?id=350 Changing to dyre will also addresses the rare event that xmonad tries to pass an excessively long string to the new process that replaces it, since if I recall correctly, dyre seems to save the state in '/tmp' (at least by default, which should probably be changed to ~/.xmonad/state or so). The error is the first point below, and today in #xmonad pielgrzym ran into it too. http://xmonad.org/xmonad-docs/xmonad-contrib/XMonad-Actions-WorkspaceCursors...

Comment #11 on issue 350 by vogt.a...@gmail.com: Investigate using Dyre for xmonad configuration http://code.google.com/p/xmonad/issues/detail?id=350 Issue 501 has been merged into this issue.

Comment #12 on issue 350 by woozlet...@gmail.com: Investigate using Dyre for xmonad configuration https://code.google.com/p/xmonad/issues/detail?id=350 I was playing around a little with replacing the baked-in recompilation with that from dyre. Relaunching does not seem to work reliably as recompilation crashes xmonad/X. This only happens when I change the configuration file. My guess is that the relaunch facilities are not compatible with the `executeFile` calls which are currently used. It's the same issue as mentioned in #7. The second feature mentioned there is now the default in Dyre. Configuration '/home/saep/.xmonad/xmonad.hs' changed. Recompiling. xmonad: waitForProcess: does not exist (No child processes) The attached patch still uses the command line arguments to pass the state on restart. I don't think it is worthwile to addres any outstanding issue unless the recompilation works properly. Attachments: recompilation-with-dyre.dpatch 23.3 KB -- You received this message because this project is configured to send all issue notifications to this address. You may adjust your notification preferences at: https://code.google.com/hosting/settings

Updates: Cc: woozlet...@gmail.com Comment #13 on issue 350 by allber...@gmail.com: Investigate using Dyre for xmonad configuration https://code.google.com/p/xmonad/issues/detail?id=350 The "temporarily disable SIGCHLD ignoring" code in recompile (uninstallSignalHandlers, installSignalHandlers) is *not* optional; the error you are getting is a symptom of not disabling it before rebuilding. You will need to find some way to integrate that with Dyre. -- You received this message because this project is configured to send all issue notifications to this address. You may adjust your notification preferences at: https://code.google.com/hosting/settings

Comment #14 on issue 350 by vogt.a...@gmail.com: Investigate using Dyre for xmonad configuration https://code.google.com/p/xmonad/issues/detail?id=350 http://code.haskell.org/~aavogt/xmonad/dyre/ is where the repo in #7 now lives. It does uninstallSignalHandlers/installSignalHandlers around the call to dyre, which avoids the crash. I'm not sure if it's erring on the side of having the SIGCHLD handler not installed for too long. -- You received this message because this project is configured to send all issue notifications to this address. You may adjust your notification preferences at: https://code.google.com/hosting/settings

2009/12/21 Justin Bogner
As of Ubuntu 9.10, which was released october 29th, this is no longer true.
I think the problem is from the Long Term Support releases... -- Ivan Lazar Miljenovic Ivan.Miljenovic@gmail.com IvanMiljenovic.wordpress.com Marie von Ebner-Eschenbach - "Even a stopped clock is right twice a day." - http://www.brainyquote.com/quotes/authors/m/marie_von_ebnereschenbac.html
participants (3)
-
codesite-noreply@google.com
-
Ivan Miljenovic
-
Justin Bogner