Comments (9)
This is a known shortcoming but not a very bad one. GHC_PACKAGE_PATH used to be working for everything. With cabal 1.16, this variable became forbidden for cabal while still working for ghc. This lead to a "complete rewrite" of hsenv. In particular, there are mutiple tests for the different versions of ghc etc.
Unfortunately, the emacs module does not use an hsenv binary. It is in effect a complete reimplementation in emacs lisp of <dir>/.hsenv/bin/activate
. To do it properly it would have to mimick the tests for all the ghc versions.
As @tmhedberg mentioned in other issues, we do not know if hsenv will be needed much longer as cabal talks about doing sandboxing itsels. Therefore, I am not really willing to spend that much time rewriting hsenv.el.
On the bright side, everything works inside of emacs except for cabal with version greater than 1.16. So the only thing you cannot do easily is install packages. IMHO, this is an event rare enought that I can drop to a shell and use activate instead of relying on emacs for it.
Feel free to write a pull request to fix it.
from hsenv.
Just to reinforce what @dudebout said, the GHC_PACKAGE_PATH
variable has been quite a thorn in our collective sides since it was "forcibly deprecated" in Cabal. Older versions of Cabal (which are unfortunately not old enough to have fallen completely out of use) require it to be set in order to work properly with hsenv, while newer versions (as you have seen) will refuse to run if it is set. So anything hsenv-related that invokes Cabal must be able to configure itself differently depending on which version of Cabal is available; there is no mechanism that works correctly for all versions of Cabal. This means that additional logic must be added in various places in order to ensure portability across multiple versions.
In any case, a pull request would indeed be welcomed. :)
from hsenv.
Thanks. Makes sense. I'll try to spend a couple hours with Elisp this weekend and send a pull request if I get anywhere.
from hsenv.
Actually, not being able to use Cabal from within Emacs is a huge issue if you're trying to use something IDE-like (I'm building something like that) from within Emacs. Fortunately, #27 fixes this.
from hsenv.
huge is a little strong ;-)
from hsenv.
Well, the correct phrasing would be "completely unusable". Since Scion (WIP) automatically configures a package using Cabal and thus it would break for every single package.
from hsenv.
I believe this is now fixed thanks to #27. Can any Emacs users confirm this?
from hsenv.
Confirmed fixed.
from hsenv.
Thanks.
from hsenv.
Related Issues (20)
- Couldn't parse package identifiers depends HOT 7
- Can't find modules in emacs buffer inside hsenv HOT 15
- On OS X, `sed -r` fails. HOT 1
- [Presentation-layer-only] Use a default environment name HOT 4
- BSD sed command issue under OS X HOT 2
- Launching a sub shell in a modified environment instead of sourcing an activate file HOT 8
- possible future thing for nice sandbox handling HOT 4
- bad build state problem HOT 7
- Replace cURL with HTTP library for GHC tarball download HOT 4
- "MyMonad" should be renamed to Hsenv HOT 3
- Documentation is stale HOT 5
- `hsenv --help` should show activate and deactivate info HOT 2
- hsenvwrapper? HOT 2
- add ghc 7.8 support! HOT 9
- OSX Hsenv fails to install
- Use MultiDexApplication HOT 1
- hsenv segfaults on OS X when using the --ghc flag HOT 5
- Strange package.cache issue with GHC 7.10.1 HOT 3
- Is this fork being maintained? HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hsenv.