Skip to content
This repository has been archived by the owner on Oct 7, 2020. It is now read-only.

remove installation of Cabal by cabal #1184

Merged
merged 1 commit into from
Apr 21, 2019
Merged

remove installation of Cabal by cabal #1184

merged 1 commit into from
Apr 21, 2019

Conversation

samuelpilz
Copy link
Contributor

The install.hs calls cabal install Cabal-X. This command was copied from the Makefile several months ago.

I have done exhaustive tests on different machies (linux only) and have not seen any effect of this line and hie works even without this command. This PR removes this command from the installation process.

Comments on this change and tests on MacOS and Windows are welcome!

@Anrock
Copy link
Collaborator

Anrock commented Apr 20, 2019

I'll give it a shot on Windows soon. What should i remove to be sure it's working properly?

@fendor
Copy link
Collaborator

fendor commented Apr 21, 2019

Did you measure the installation time? I think, one point was to accelerate the installation.

@samuelpilz
Copy link
Contributor Author

@Anrock on Linux, hie clearing means roughly:

  • remove installed binaries from $HOME/.local/bin: hie, hie-*, cabal, hoogle
  • remove all the caches: $HOME/.stack, $HOME/.cabal, $HOME/.hoogle

Installing:

  • freshly clone the repository
  • stack install.hs build-all
  • let run overnight

@samuelpilz
Copy link
Contributor Author

@fendor It was used to reduce the time during the first startup of hie. However I have noticed no speedup and the first startup was quite quick.

@fendor
Copy link
Collaborator

fendor commented Apr 21, 2019

Alright. Then LGTM.

@fendor fendor requested a review from alanz April 21, 2019 20:22
@alanz
Copy link
Collaborator

alanz commented Apr 21, 2019

I'm happy to merge this, if anyone complains we will know to add it back, or put in instructions to do it.

@alanz alanz merged commit 173cfe3 into haskell:master Apr 21, 2019
@Anrock
Copy link
Collaborator

Anrock commented Apr 21, 2019

Late to the party, but still - most of hies build just fine with build-all.

@samuelpilz samuelpilz deleted the drop-cabal-install-cabal branch April 24, 2019 06:11
@alanz alanz added this to the 2019-04 milestone May 4, 2019
@alanz
Copy link
Collaborator

alanz commented May 5, 2019

So, I found my cabal-helper was not able to work with hie on hie itself anymore, but was reporting that it was building against Cabal-2.4.0.1.

After reverting this commit and re-installing hie, it works again.

So, the reason we did this originally, was to allow cabal-helper to actually work. We need to revert this.

@samuelpilz
Copy link
Contributor Author

I can do that. However, I have been unable to reproduce that behavior. A clean installation of hie does not make cabal-helper require Cabal on my test-vms, which provide the maximum repeatability and isolation I can provide.

@alanz Can you give me instructions on how to reproduce this error? I will go back to my test-environment and figure out what is going on.

@alanz
Copy link
Collaborator

alanz commented May 5, 2019

It comes about trying to load hie itself, and shows cabal-helper complaining to stderr that the exe has two mains in it, one of which is Paths_haskell_ide_engine.

So our current tests do not show this as a problem, and perhaps we should add one for this specific case.

alanz added a commit to alanz/haskell-ide-engine that referenced this pull request May 5, 2019
@alanz
Copy link
Collaborator

alanz commented May 5, 2019

And now I am no longer sure about this. I installed hie using this approach, and it now works where it did not before. But the cabal-helper cache has it's exe called cabal-helper0.9.0.0-Cabal2.4.0.1.

@alanz
Copy link
Collaborator

alanz commented May 5, 2019

So perhaps we should wait for any issues to be raised, and consider this as an option if so.

@samuelpilz
Copy link
Contributor Author

@alanz, I am also very unsure about this, In my tests in an non-clean environment, I got different results every time and were unable to reproduce any issues reliably.

Could you clarify in what state would you prefer to wait. Should we include cabal v1-install Cabal-X in the meantime?

I have a repository that describes a vagrant-vm I use to test the hie binaries and the required environment. I can work this a bit further and publish it to the collaborators here.

@alanz
Copy link
Collaborator

alanz commented May 5, 2019

I think we should keep our fix in reserve, and see if anyone raises an issue against 0.9.0.0 in the meantime.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants