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

missing docs on MANY new packages!!!! #145

Closed
cartazio opened this issue Oct 27, 2013 · 27 comments
Closed

missing docs on MANY new packages!!!! #145

cartazio opened this issue Oct 27, 2013 · 27 comments

Comments

@cartazio
Copy link
Contributor

Have we fixed this in hackage server head? when is it getting rolled out and haddocked regenerated?

http://hackage.haskell.org/package/cabal-debian-3.8.3 is a new example of this problem i just found :(

@blitzcode
Copy link

I also noticed missing documentation for a lot of packages like OpenGL and GLFW-b, have to rely on the docs of older versions or the ones I have installed locally. This is rather annoying as Hoogle has links to the main Hackage pages, and I then have to manually locate the alternative ones. A fix would be much appreciated!

@balta2ar
Copy link

balta2ar commented Nov 4, 2013

Confirm the problem. Here is another package with missing docs: http://hackage.haskell.org/package/http-streams-0.7.0.2

@istathar
Copy link

istathar commented Nov 5, 2013

To @balta2ar's comment, it's not a problem with the package in question; it renders fine locally (as mirrored at http://research.operationaldynamics.com/projects/http-streams/doc/Network-Http-Client.html) and the part that was spliced out of the package, http-common is fine on Hackage — ie http://hackage.haskell.org/package/http-common-0.7.0.1/docs/Network-Http-Types.html is fine.

AfC

@z0w0
Copy link

z0w0 commented Nov 6, 2013

helm-0.5.0 is missing docs too, they build fine locally.

@funrep
Copy link

funrep commented Nov 6, 2013

I confirm this problem too, verbalexpressions which I uploaded recently is missing docs too. Thought I first had to build docs locally, but then realized that cabal's sdist doesnt pack them into the package anyway.

@cartazio
Copy link
Contributor Author

cartazio commented Nov 6, 2013

#56 would be a workaround ... we just need to make it discoverable

@istathar
Copy link

istathar commented Nov 9, 2013

Why should it need a workaround? Hackage 1 never had any problems with any of these packages.

@cartazio
Copy link
Contributor Author

cartazio commented Nov 9, 2013

well, then write the patch needed, whatever it is. In the mean time, thats a workaround, upload your own docs :)

@dcoutts
Copy link
Contributor

dcoutts commented Nov 27, 2013

Note that we're now running a new doc builder client which should resolve some of these issues (it's currently going through a big backlog). For the things not resolved, it does at least generate build logs (see /package/foo-1.0/reports/$n/log) so we can see what's wrong. Mostly I expect this will now be missing C libs which we'll need to add to the builder machine.

In particular, as a test case I've deleted the broken docs for http://hackage.haskell.org/package/verbalexpressions-1.0.0.0, so keep an eye on http://hackage.haskell.org/package/verbalexpressions-1.0.0.0/reports/ and http://hackage.haskell.org/package/verbalexpressions-1.0.0.0/reports/1/log

@dcoutts
Copy link
Contributor

dcoutts commented Nov 27, 2013

Note also, that if you find packages with broken docs, one can delete them and the doc builder should automatically retry. e.g.

curl -X DELETE http://you:passwd@hackage.haskell.org/package/helm-0.5.0

You have to be in the maintainer or trustee group to do this. So this would be a good task for trustees, speaking of which, we ought to recruit a few! http://hackage.haskell.org/packages/trustees/

@funrep
Copy link

funrep commented Nov 28, 2013

I tried to upload docs to the verbalexpressions package but I got this error:

$ curl -X PUT -d @dist/doc.tar http://usr:passwd@hackage.haskell.org/package/verbalexpressions-1.0.0.0/docs
Unexpected content-type: For this resource the content-type was expected to be application/x-tar, rather than application/x-www-form-urlencoded

What format should the file I gonna upload be? I just made the dist/doc a tar since I thought that was the accepted format reading the server API.

I also tried the script which was presented in issue #56 but got the following error:

$ sh build-docs.sh 
build-docs.sh: 8: build-docs.sh: Syntax error: "(" unexpected

I changed the parentheses to quotes since I thought it seemed like a string but then I got this error:

$ sh build-docs.sh
http://hackage.haskell.org/package/verbalexpressions-1.0.0.1 404
http://hackage.haskell.org/package/verbalexpressions-1.0.0.1/candidate 404
Found no uploaded version
Resolving dependencies...
Configuring verbalexpressions-1.0.0.1...
build-docs.sh: 72: build-docs.sh: Bad substitution

I really don't know bash so I thought I rather ask here how to upload docs by hand.

@dcoutts
Copy link
Contributor

dcoutts commented Nov 28, 2013

@klrr to answer the curl question, are indeed uploading the right format (ie a tar file), so all you need to do is tell the server that that is what you're doing. By default curl tells the server that it is sending the results of a html form (application/x-www-form-urlencoded), so you just need to override that and tell it the type you're actually sending (ie tar)

To do that is the -H flag to specify the 'Content-Type header, -H 'Content-Type: application/x-tar':

curl -X PUT -H 'Content-Type: application/x-tar' -d @dist/doc.tar http://usr:passwd@hackage.haskell.org/package/verbalexpressions-1.0.0.0/docs

@dcoutts
Copy link
Contributor

dcoutts commented Nov 28, 2013

As for using verbalexpressions as a test case, we can now see that the new doc builder is more useful than the old, because it uploads a report and a build log:

So the report says that regex-pcre failed to build, and verbalexpressions depends on that. Looking at the log we can see why: the pcre C lib is missing on the build machine.

So any of the admins with access to the build machine can fix this by installing that C lib, then grepping the reports for affected packages:

$ grep 'DependencyFailed regex-pcre' /srv/hackage/var/build/results/*.report -l
/srv/hackage/var/build/results/aeson-schema-0.2.0.1.report
/srv/hackage/var/build/results/anatomy-0.4.report
/srv/hackage/var/build/results/atomo-0.4.0.2.report
/srv/hackage/var/build/results/hark-0.2.report
/srv/hackage/var/build/results/hellage-0.1.1.report
/srv/hackage/var/build/results/hyakko-0.6.5.report
/srv/hackage/var/build/results/verbalexpressions-1.0.0.0.report

Then to trigger their rebuild, the admin has to remove these packages from the failed file, and then the doc builder will have another go.

@funrep
Copy link

funrep commented Nov 28, 2013

@dcoutts Thanks for the quick reply! I then couldn't upload it since it was in wrong format but I changed it to ustar format as suggested in issue #56. Now I get the following error though which I don't really get since doc.tar is not empty at all.

$ curl -X PUT -H 'Content-Type: application/x-tar' -d @dist/doc.tar http://foo:bar@hackage.haskell.org/package/verbalexpressions-1.0.0.0/docs
Warning: Couldn't read data from file "dist/doc.tar", this makes an empty
Warning: POST.
Invalid documentation tarball: truncated tar archive

@dcoutts
Copy link
Contributor

dcoutts commented Nov 28, 2013

@klrr does dist/doc.tar exist? Is it a valid tarball. The fact that curl cannot read from it suggests it's either missing, or wrong permissions or something.

BTW, you may prefer to just hold off, I've installed the pcre C lib dev files on the builder machine and prodded the builder to try again, and verbalexpressions is on the builder's TODO list again.

@funrep
Copy link

funrep commented Nov 28, 2013

The problem was that it was that I specified wrong path, when I ran with correct path to the file it said it was in wrong format although I used the ustar format. I'll just wait for the bot now though, thanks for all help!

@banacorn
Copy link

banacorn commented Dec 3, 2013

+1

@xich
Copy link

xich commented Dec 9, 2013

How often are the docs rebuilt? I thought it was every night, but I uploaded a package a couple days ago that still doesn't have them, so I'm wondering if something is wrong. I tried to find build logs, but I can't find a link anywhere. Manually visiting the link (suggested above): http://hackage.haskell.org/package/scotty-0.6.0/reports/ gives an empty list.

Or is this just a case of a backlog and I should be more patient? ;-)

@dcoutts
Copy link
Contributor

dcoutts commented Dec 9, 2013

@xich I've not checked specifically, but the likely answer is it falls into the corner case where no report is generated, which is if the solver cannot find a solution. This doc builder instance is using 7.6.3, and does not allow reinstalling core packages.

Technically the problem here is that the build report format has to be extended to be able to describe the case when no solution can be found (so we don't even know the deps that a package was trying to use for example).

@z0w0
Copy link

z0w0 commented Dec 9, 2013

Helm also didn't have any build reports yet still failed to build. I just deleted the docs using the API and it worked on the next build, so I'd give that a try @xich.

@xich
Copy link

xich commented Dec 12, 2013

@dcoutts If I were to volunteer to try to extend the build report format to handle this case, could you point me to a place to get started?

@z0w0 Thanks... I tried doing that, to no avail. (The deletion seemed to happen, but after a few days, still no docs.)

@cartazio
Copy link
Contributor Author

@xich the best way to get @dcoutts to explain stuff is to pester him to explain on IRC on #hackage, then paste the notes to a github ticket for yourself or others :)

@plaprade
Copy link

I'm having issues with the following packages right now:

http://hackage.haskell.org/package/haskoin-util-0.0.1
http://hackage.haskell.org/package/haskoin-crypto-0.0.1
http://hackage.haskell.org/package/haskoin-protocol-0.0.1

The documentations are not showing up. I also have no reports displaying under /:package/reports which makes debugging the issue somewhat harder.

I had the tests missing in the tarball of haskoin-util-0.0.1, so I added them and re-uploaded the new package as haskoin-util-0.0.1.1 and the documentation showed up. I removed a benchmarks section from the cabal file of haskoin-crypto-0.0.1 and re-uploaded it as haskoin-crypto-0.0.1.1 and the documentation showed up. Now, hoping to have learned from my previous mistakes, I have uploaded haskoin-protocol-0.0.1 but no documentation is showing up. The tarball builds fine locally, including the documentation.

I just tried to issue a docs delete command:

curl -X DELETE http://PhilippeLaprade:xxx@hackage.haskell.org/package/haskoin-protocol-0.0.1/docs

I'll be waiting a few hours to see if anything happens. I'll try to find some time to install hackage-server and look at what's going on.

Cheers

@dcoutts
Copy link
Contributor

dcoutts commented Dec 18, 2013

@xich yes, look at the BuildReport type in Distribution.Server.Features.BuildReports.BuildReport.

As you can see, the current representation expects a list of dependencies that we tried to build the package against. In the case that we could not even find a solution then of course we cannot provide that.

So, we would need to extend the InstallOutcome to add an option for not finding a satisfactory set of dependencies, and in that case the flagAssignment and dependencies should be allowed to be empty, or not present. It's an interesting Q if they should be required to be empty, or if them being partially present is useful to express the case that one tried with certain constraints (e.g. constraining to the versions of the core/platform packages from a specific ghc/HP release).

@plaprade
Copy link

I don't know if this is relevant, but I seem to have fixed my problem by changing the dependency formats in my cabal files. Instead of using == 0.1.* I used >= 0.1 && < 0.2. I uploaded two more packages which built successfully on the first try.

@gbaz
Copy link
Contributor

gbaz commented Apr 24, 2015

I think we can close this now, since we have our builders more carefully manged?

@gbaz
Copy link
Contributor

gbaz commented Oct 23, 2016

closing in favor of #478 which we've made great strides on

@gbaz gbaz closed this as completed Oct 23, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests