haskell / hackage-server

Hackage-Server: A Haskell Package Repository
http://hackage.haskell.org
Other
415 stars 198 forks source link

Documentation not generated when a candidate package is corrected and re-uploaded #512

Open harendra-kumar opened 8 years ago

harendra-kumar commented 8 years ago

I noticed that Haddock for a given version number is generated only once even if the package having the same version is uploaded again after some correction. For a given version hackage always uses the haddock generated on first upload. If the new upload has an additional module, the new module will not have its haddock generated. If the new upload changed documentation it will not be reflected.

I tried deleting the previous candidate before uploading the new but it did not work. As long as the version remains the same it still picks up the old documentation.

To avoid this issue I had to change the version number of the package and then upload a candidate with new version.

harendra-kumar commented 8 years ago

I was worried that when I publish this package the documentation will remain broken. But it seems when you publish the documentation is generated again. But this is still an important issue since new users have to go through frustration and waste time because of this quirk.

gbaz commented 8 years ago

cc @davean

Blaisorblade commented 8 years ago

Have you tried triggering a rebuild via the instructions below (quoted from https://github.com/haskell/hackage-server/issues/515#issuecomment-231360358)?

There actually is a button for "delete documentation and trigger rebuild" (click "edit package information", then the package version under "Manage documentation", then "delete documentation and trigger rebuild".) However, this is designed not to trigger a rebuild if there is a failed build report, likely for the reason I pointed out above: if it didn't succeed once, it won't succeed on round two.

andreasabel commented 7 years ago

Even when I delete the package candidate and upload a fresh tarball, I see the old package description. I think reuploading a package candidate should simply scrap the old one completely.

hvr commented 7 years ago

@andreasabel if you really mean the description (i.e. the content from the description: ... field), then what you're experiencing may be an effect of our CDN and its not-too-instant expiration TTL...

Try if curl -X PURGE <url-to-trigger-expiry> helps.