karun012 / arion

MIT License
46 stars 7 forks source link

Switch to ide-backend or something similar #28

Open karun012 opened 9 years ago

karun012 commented 9 years ago

I think we need to switch to ide-backend or something similar soon. It will be easier to work on issues like #18, #22, #9 (zen-mode), etc.

I am not sure if I can pick it up this week. May be I can do it sometime next week. I couldn't get ide-backend to work in a sample project. Does anyone have a sample that I can look at?

@davidsiefert @mwotton @sol

karun012 commented 9 years ago

Update: Created a branch https://github.com/karun012/arion/tree/ide-backend-switch

I haven't been able to get ide-backend installed in my sandbox. If anyone can find a way to do it please let me know. I did not check in the change to the .cabal file.

karun012 commented 9 years ago

Tried every single version. Here's what happens when I add ide-backend to arion.cabal and do an install --only-dependencies:

Configuring binary-0.7.4.0...
Configuring crypto-api-0.13.2...
Configuring data-accessor-mtl-0.2.0.4...
Configuring filemanip-0.3.6.3...
Configuring fingertree-0.1.0.2...
Configuring pretty-show-1.6.8.2...
Building crypto-api-0.13.2...
Building binary-0.7.4.0...
Building data-accessor-mtl-0.2.0.4...
Building filemanip-0.3.6.3...
Building pretty-show-1.6.8.2...
Building fingertree-0.1.0.2...
Installed data-accessor-mtl-0.2.0.4
Installed filemanip-0.3.6.3
Installed fingertree-0.1.0.2
Installed pretty-show-1.6.8.2
Installed crypto-api-0.13.2
Installed binary-0.7.4.0
Configuring bytestring-trie-0.2.4.1...
Configuring pureMD5-2.1.2.1...
Configuring Cabal-ide-backend-1.23.0.0...
Building pureMD5-2.1.2.1...
Building bytestring-trie-0.2.4.1...
Installed bytestring-trie-0.2.4.1
Installed pureMD5-2.1.2.1
Configuring ide-backend-common-0.9.1...
Building ide-backend-common-0.9.1...
Installed ide-backend-common-0.9.1
Building Cabal-ide-backend-1.23.0.0...
Installed Cabal-ide-backend-1.23.0.0
Configuring ide-backend-0.9.0.7...
Building ide-backend-0.9.0.7...
Failed to install ide-backend-0.9.0.7
Build log ( .../.cabal-sandbox/logs/ide-backend-0.9.0.7.log ):
Configuring ide-backend-0.9.0.7...
Building ide-backend-0.9.0.7...
Preprocessing library ide-backend-0.9.0.7...

IdeSession/Cabal.hs:22:8:
    Could not find module `Data.Proxy'
    It is a member of the hidden package `tagged-0.6'.
    Perhaps you need to add `tagged' to the build-depends in your .cabal file.
    Use -v to see a list of the files searched for.
cabal: Error: some packages failed to install:
ide-backend-0.9.0.7 failed during the building phase. The exception was:
ExitFailure 1
mwotton commented 9 years ago

sounds like an ide-backend bug :) do you know how to use a cabal sandbox add-source to fix it in place? grab me later today if not.

On Wed, Apr 8, 2015 at 6:35 AM Karun notifications@github.com wrote:

Tried every single version. Here's what happens:

Configuring binary-0.7.4.0... Configuring crypto-api-0.13.2... Configuring data-accessor-mtl-0.2.0.4... Configuring filemanip-0.3.6.3... Configuring fingertree-0.1.0.2... Configuring pretty-show-1.6.8.2... Building crypto-api-0.13.2... Building binary-0.7.4.0... Building data-accessor-mtl-0.2.0.4... Building filemanip-0.3.6.3... Building pretty-show-1.6.8.2... Building fingertree-0.1.0.2... Installed data-accessor-mtl-0.2.0.4 Installed filemanip-0.3.6.3 Installed fingertree-0.1.0.2 Installed pretty-show-1.6.8.2 Installed crypto-api-0.13.2 Installed binary-0.7.4.0 Configuring bytestring-trie-0.2.4.1... Configuring pureMD5-2.1.2.1... Configuring Cabal-ide-backend-1.23.0.0... Building pureMD5-2.1.2.1... Building bytestring-trie-0.2.4.1... Installed bytestring-trie-0.2.4.1 Installed pureMD5-2.1.2.1 Configuring ide-backend-common-0.9.1... Building ide-backend-common-0.9.1... Installed ide-backend-common-0.9.1 Building Cabal-ide-backend-1.23.0.0... Installed Cabal-ide-backend-1.23.0.0 Configuring ide-backend-0.9.0.7... Building ide-backend-0.9.0.7... Failed to install ide-backend-0.9.0.7 Build log ( .../.cabal-sandbox/logs/ide-backend-0.9.0.7.log ): Configuring ide-backend-0.9.0.7... Building ide-backend-0.9.0.7... Preprocessing library ide-backend-0.9.0.7...

IdeSession/Cabal.hs:22:8: Could not find module Data.Proxy' It is a member of the hidden packagetagged-0.6'. Perhaps you need to add `tagged' to the build-depends in your .cabal file. Use -v to see a list of the files searched for. cabal: Error: some packages failed to install: ide-backend-0.9.0.7 failed during the building phase. The exception was: ExitFailure 1

— Reply to this email directly or view it on GitHub https://github.com/karun012/arion/issues/28#issuecomment-90761053.

karun012 commented 9 years ago

I tried this:

git clone https://github.com/ekmett/tagged
cabal sandbox add-source <path to the cloned repo>
cabal install --only-dependencies

Same problem. Then I tried this:

git clone https://github.com/ekmett/tagged
cabal sandbox add-source <path to the cloned repo>
cabal install tagged
cabal install --only-dependencies

Didn't work.

karun012 commented 9 years ago

Wait a minute! @mwotton did you want me to do add-source ide-backend?

karun012 commented 9 years ago

Okay! Cloned ide-backend. Fixed the .cabal file. Added it as a source and it worked...Thank you @mwotton

karun012 commented 9 years ago

Update: Tried to call a few functions to see if a session (IdeSession) was created. Here's what happened:

arion: user error (Could not find ide-backend-server)

Doh!

mwotton commented 9 years ago

Yes - clone ide-backend locally, add it as a source to arion, then monkey with ide-backend.cabal. is possible --allow-newer would work, but I'd just change the tagged line in the cabal file and see

Karun notifications@github.com wrote:

Waitaminute!@mwottondidyouwantmetodoadd-sourceide-backend?ReplytothisemaildirectlyorviewitonGitHub.

karun012 commented 9 years ago

Yup. That worked. Update in my previous comment...

karun012 commented 9 years ago

@mwotton May be ghc api :)