Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backpack #359

Merged
merged 40 commits into from
Feb 7, 2018
Merged

Backpack #359

merged 40 commits into from
Feb 7, 2018

Conversation

piyush-kurur
Copy link
Member

We can merge this provided appveyor builds workout. @Mistuke, Can you help?

Currently I am in the process of moving from stack to cabal new-build. Part of the reason is also to try out backpack but currently I am only trying to get the build system up. The idea is the following.

  • Download and check binary ghc-8.2.2 and cabal-install-2.0.0.1 for the build
  • Run the cabal new-build and other new-* commands
  • Use cabal.config from stackage as cabal.package.freeze files to confirm buildability w.r.t stack

You can see how this is handled in Unix by looking at the travis script. It makes use of the ./scripts/stack-freeze.sh command. Currently this is not ported to windows as we need to remove raaz from the freeze file for it to work which is done using sed. Instead on appveyor, there is a appveyor/cabal.project.freeze that is used (this is generated locally and commited).

The problem I am having is that ansiterminal package is not building. Can you check this out?

@Mistuke
Copy link
Contributor

Mistuke commented Feb 6, 2018

Unfortunately you're hitting two bugs in the released cabal versions. new-build has a weird way of building the temporary store path, it tends to double the path, if your original path is C:\foo\bar it makes the temp store dir C:\foo\bar\store\incoming\foo\bar. essentially reducing the MAX_PATH limit from 260 to 130.

The path you're installing the package into is longer than 130 so it fails. See haskell/cabal#4978 which I have been working on but have been distracted by high priority tickets in the compiler.

What has been accepted already is a workaround that's in place in never versions of cabal haskell/cabal#4977 but no released binaries have this yet, so it has to be built from source.

Cabal-install does support a global flag --store-dir to change the store directory. So you can use it to put the store on a shorter path. But I had trouble getting it to work haskell/cabal#5069 and haven't had the time to look at it yet. Perhaps it will work for you though so it's worth a try.

Finally this has become a bigger issue now with backpack, so I'm backporting parts of my experimental I/O manager back into 8.6, so at least MAX_PATH limitations will be gone from base and compiler and any haskell program compiled with 8.6. But that of course won't help you right now :)

@Mistuke
Copy link
Contributor

Mistuke commented Feb 6, 2018

On the short term, lobbying for a new cabal binary may be the easiest way.

As a side note, if you don't want to have to manage your ghc and cabal installations on appveyor, you can use my chocolatey packages https://chocolatey.org/packages/ghc , appveyor seems to include choco support by default.

This is how cabal runs the CI https://github.com/haskell/cabal/blob/master/appveyor.yml#L4

It would just require these two lines

  - choco install -y ghc --version 8.2.2
  - refreshenv

that will automatically pull in the latest compatible cabal for that compiler version, which would be 2.0.0.2

@piyush-kurur
Copy link
Member Author

Thanks @Mistuke for the update. Will the lobying work ;-). Do you think that it makes sense to merge?
Windows build will be broken till the appropriate cabal is released.

@Mistuke
Copy link
Contributor

Mistuke commented Feb 6, 2018 via email

@piyush-kurur
Copy link
Member Author

Is store-dir in a released version ? The cabal-2.0.0.1 that I have (linux version) does not seem to have it.

@Mistuke
Copy link
Contributor

Mistuke commented Feb 6, 2018 via email

@piyush-kurur
Copy link
Member Author

Okey it is in 2.0.0.1 (tested on linux) but unfortunately cabal on appveyor via choclatey is 2.0.0.0. Is there a way to change this ?

@Mistuke
Copy link
Contributor

Mistuke commented Feb 6, 2018 via email

@piyush-kurur
Copy link
Member Author

Thanks.

@Mistuke
Copy link
Contributor

Mistuke commented Feb 6, 2018

I've uploaded the new cabal, should take around 30 mins for it to pass automatic validation https://chocolatey.org/packages/cabal/2.0.0.1 once it does restarting the appveyor build should pull in the latest one.

@piyush-kurur piyush-kurur merged commit ed84614 into master Feb 7, 2018
@piyush-kurur
Copy link
Member Author

@Mistuke everything is working yaaaahhoooo!! thanks.

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

Successfully merging this pull request may close these issues.

2 participants