Haskell-ide-engine: Configuration of Brittany

Created on 1 Nov 2017  路  6Comments  路  Source: haskell/haskell-ide-engine

Afaict, when used by HIE Brittany does not respect the configuration in ~/.brittany/config.yaml. Could Brittany be made configurable by HIE or used in such a way that the configuration file is respected? This change may be best done in the Brittany library itself

help wanted

Most helpful comment

Seems reasonable.

With readConfigs you currently have to either pass non-null list of potential config locations manually or the behaviour depends on the current working dir. The latter is probably not a good idea, if users have per-project config but hie only has one common instance. So i propose the slightly more involved:

  • expose a variant of readConfigs that never depends on cwd;
  • expose a defaultGlobalConfigPaths binding that returns those, to prevent code duplication or future divergence.

All 6 comments

Ok, it looks like Brittany reads config values in Main.hs. @lspitzner How would you feel about a pull request which moved the readConfigs code into an exported module, so that tools like haskell-ide-engine could use it? It seems best for users that tools using Brittany have the same functionality when used by IDEs as they do when used on the command line.

Seems reasonable.

With readConfigs you currently have to either pass non-null list of potential config locations manually or the behaviour depends on the current working dir. The latter is probably not a good idea, if users have per-project config but hie only has one common instance. So i propose the slightly more involved:

  • expose a variant of readConfigs that never depends on cwd;
  • expose a defaultGlobalConfigPaths binding that returns those, to prevent code duplication or future divergence.

help found :)
Just a heads up, I've started with the Brittany PR so I can then work on this change.

Oops, I haven't realised that someone is working on it and made a PR to Brittany a couple of days ago:
https://github.com/lspitzner/brittany/pull/121

@AlexeyRaga no problem! I'll find something else to help with. Nice work BTW!

I think it should be fixed now. @alanz @MaxGabriel can you confirm and close this issue?

Was this page helpful?
0 / 5 - 0 ratings