Giter Club home page Giter Club logo

hup's Introduction

hup's People

Contributors

phlummox avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

silky

hup's Issues

Improve existing Makefile/add documentation of QEMU image

Testing uses a Docker image running hackage-server. A QEMU image (Alpine Linux, just running that same Docker image) also is available.

Document where these are available and how they can be used for testing, and
in the Makefile, link to a more permanent location for the QEMU image. (Currently
it's stashed in the attachments for the last Hup release, 0.3.0.2.)

broken link in README

Refers to "phadej's script", at URL https://github.com/phadej/binary-orphans/blob/master/hackage-docs.sh, which no longer exists.

Proposed fix:
I'm guessing this is probably the same script:
https://github.com/phadej/aeson-compat/blob/a341c99edd0b4a59f2390a5be738fad91c602b3d/hackage-docs.sh. So, update the README to refer to it.

Also: a more permanent URL for ekmett's script might be: https://github.com/ekmett/lens/blob/854f29026e106a096d5af19b6221d8a7807591bc/scripts/hackage-docs.sh

Windows builds fail due to Shelly being broken on Windows

Versions of Shelly from 1.8.0 onwards are broken on Windows (and thus builds for Hup are broken, too): see this bug. This was only recently fixed in the Shelly github repo, and a fixed version hasn't made it onto Hackage, yet.

A workaround for this would be to use the Shelly Github repo itself as a dependency (possible for Stack, I don't know whether cabal permits this yet), but for CI purposes, I'm just going to refrain from using recent versions of Shelly til the fix makes it onto Hackage.

So this means Shelly 1.7.2 is the most recent, non-broken version on Hackage; but that version's dependencies (in particular, from what I can tell, time (>=1.3 && <1.9)) apparently stop it being built with versions of GHC more recent than 8.6.5. Again, there are probably fixes for people who really want to get it built (e.g. loosening the bounds), but for CI purposes, I'm just not going to build on versions of GHC more recent than 8.6.5, until Hackage has a working version of Shelly again.

So my current task for Hup is to get CI builds working on Linux, Mac and Windows using GitHub Actions. Some non-x86 architectures and static binaries would be nice, too. We'll see.

Error running 'cabal configure'

I have problems using hup to upload documentation for log-warper package. I run the following command:

$ hup docboth -u shersh --password=<my password> --verbose

And I see this output:

haddock --hyperlinked-source
build dependencies docs
stack haddock --only-dependencies
Haddock index for snapshot packages already up to date at:
/home/fenx/.stack/snapshots/x86_64-linux/lts-9.17/8.0.2/doc/index.html
configuring
cabal configure --builddir=/tmp/tmpThreadId11804289383846930886/dist --package-db=clear --package-db=global --package-db=/home/fenx/.stack/snapshots/x86_64-linux/lts-9.17/8.0.2/pkgdb --package-db=/home/fenx/programming/haskell/serokell/log-warper/.stack-work/install/x86_64-linux/lts-9.17/8.0.2/pkgdb -v2
/home/fenx/.stack/programs/x86_64-linux/ghc-8.2.1/bin/ghc --numeric-version
looking for tool ghc-pkg near compiler in
/home/fenx/.stack/programs/x86_64-linux/ghc-8.2.1/bin
found ghc-pkg in /home/fenx/.stack/programs/x86_64-linux/ghc-8.2.1/bin/ghc-pkg
/home/fenx/.stack/programs/x86_64-linux/ghc-8.2.1/bin/ghc-pkg --version
/home/fenx/.stack/programs/x86_64-linux/ghc-8.2.1/bin/ghc --supported-languages
/home/fenx/.stack/programs/x86_64-linux/ghc-8.2.1/bin/ghc --info
cabal: ghc-pkg dump failed
hup: 
Ran commands: 
which stack
which cabal
which haddock
which ghc
stack path --programs
which stack
appendToPath: /home/fenx/.stack/programs/x86_64-linux/ghc-8.2.1/bin
withTmpDir
rm -f /tmp/tmpThreadId11804289383846930886
mkdir /tmp/tmpThreadId11804289383846930886
echo 'haddock --hyperlinked-source'
haddock --hyperlinked-source
which haddock
echo 'build dependencies docs'
echo 'stack haddock --only-dependencies'
stack haddock --only-dependencies
which stack
stack path --snapshot-pkg-db
which stack
stack path --local-pkg-db
which stack
echo 'configuring'
echo 'cabal configure --builddir=/tmp/tmpThreadId11804289383846930886/dist --package-db=clear --package-db=global --package-db=/home/fenx/.stack/snapshots/x86_64-linux/lts-9.17/8.0.2/pkgdb --package-db=/home/fenx/programming/haskell/serokell/log-warper/.stack-work/install/x86_64-linux/lts-9.17/8.0.2/pkgdb -v2'
cabal configure --builddir=/tmp/tmpThreadId11804289383846930886/dist --package-db=clear --package-db=global --package-db=/home/fenx/.stack/snapshots/x86_64-linux/lts-9.17/8.0.2/pkgdb --package-db=/home/fenx/programming/haskell/serokell/log-warper/.stack-work/install/x86_64-linux/lts-9.17/8.0.2/pkgdb -v2
which cabal
rm -rf /tmp/tmpThreadId11804289383846930886

Exception: error running: cabal configure --builddir=/tmp/tmpThreadId11804289383846930886/dist --package-db=clear --package-db=global --package-db=/home/fenx/.stack/snapshots/x86_64-linux/lts-9.17/8.0.2/pkgdb --package-db=/home/fenx/programming/haskell/serokell/log-warper/.stack-work/install/x86_64-linux/lts-9.17/8.0.2/pkgdb -v2
exit status: 1
stderr: cabal: ghc-pkg dump failed

Maybe it's not a hup problem. I have the following stack version:

$ stack --version
Version 1.6.1, Git revision f25811329bbc40b0c21053a8160c56f923e1201b (5435 commits) x86_64 hpack-0.20.0

Release static executables

Proposed change to repo: build static executables and include them on the Releases page.

Advantages: gives users another way of installing hup.

Disadvantages: gives users another way of installing hup.

  • extra code for probably little benefit

Alternatives: don't do it

Tell about 'docboth' explicitly in README

Thanks for amazing tool! It's really a shame that Hackage often fails to build packages :( For me only your tool hup is working for documentation uploading (because I'm using stack).

I just want to recommend to tell about hup docboth command explicitly in the beginning because I think this is the main command for most users.

So they need just to type hup docboth -u USER -p PASSWORD and everything works!

I tried to run without -u option and saw

Exception: HttpExceptionRequest Request {
  host                 = "hackage.haskell.org"
  port                 = 443
  secure               = True
  requestHeaders       = [("Content-Type","application/x-tar"),("Content-Encoding","gzip")]
  path                 = "/package/log-warper-1.7.3/docs"
  queryString          = ""
  method               = "PUT"
  proxy                = Nothing
  rawBody              = False
  redirectCount        = 10
  responseTimeout      = ResponseTimeoutDefault
  requestVersion       = HTTP/1.1
}
 IncompleteHeaders

which wasn't very helpful.

pre-emptively remove README.md from extra-source-files

So apparently this is an issue everyone knows about: although Hackage displays markdown from README and ChangeLog files, it's a very limited subset. So anything complex (like tables) will render badly. So I'm going to remove README.md from the hackage-uploaded source.

If issues like #477 on hackage ever get fixed, then maybe re-visit this.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.