hackage-server icon indicating copy to clipboard operation
hackage-server copied to clipboard

Notification for deprecated versions of packages

Open lspitzner opened this issue 10 years ago • 8 comments

When browsing the versions of a package, if the currently viewed package is deprecated, there should be a warning (similar to the warning for entirely deprecated packages).

lspitzner avatar Jun 05 '15 19:06 lspitzner

@dzackgarza maybe?

dcoutts avatar Jul 19 '15 05:07 dcoutts

Since this is listed as a "good first issue", could someone with know-how quickly sketch an implementation plan for someone to follow?

Wait, maybe I can do it after 30 seconds of digging:

  • Note that there are now two forms of deprecation:
    • whole-package deprecation (see e.g. accelerate-cuda, which does have a deprecation notice)
    • per-version deprecation. See network's deprecation information, and notice that the deprecated version is highlighted as such in the version list, but the deprecated version's specific page still has no notice (that's why this issue should remain open, although I presume it should have been "closed" for some decent portion of its life).
  • Extend this use of isDeprecated, or rename to isPackageDeprecated and introduce isVersionDeprecated
  • Find where is[Package]Deprecated is defined, and make a similar definition for isVersionDeprecated
  • Consider making the deprecation notice stand out more in the design and layout!

chreekat avatar Mar 28 '18 20:03 chreekat

Looks like you have the right of it!

https://github.com/haskell/hackage-server/blob/986fea22852c6171411b60453f0047405593025e/Distribution/Server/Pages/PackageFromTemplate.hs is the main place to look, to start.

gbaz avatar Mar 28 '18 20:03 gbaz

Consider making the deprecation notice stand out more in the design and layout!

Fwiw, I wanted to try to use a colored box like e.g. the light red one used for the warnings at e.g.

http://hackage.haskell.org/package/bad-package-example-0/candidate

or something like that...

hvr avatar Mar 28 '18 20:03 hvr

WIP is here: https://github.com/chreekat/hackage-server/pull/1

As the commit mentions, I'm having trouble with a Hackage mirror, so I haven't test-compiled the changes yet. :)

chreekat avatar Mar 29 '18 00:03 chreekat

Trouble persists:

Resolving dependencies...
Notice: installing into a sandbox located at
/home/b/src/hackage-server/.cabal-sandbox
Downloading Cabal-2.2.0.1...
Downloading aeson-1.1.2.0...
Downloading safecopy-0.9.4.1...
Configuring aeson-1.1.2.0...
Configuring safecopy-0.9.4.1...
Downloading xss-sanitize-0.3.5.7...
Unexpected response 503for http://objects-us-west-1.dream.io/hackage-mirror/package/xss-sanitize-0.3.5.7.tar.gz

chreekat avatar Apr 03 '18 13:04 chreekat

can't you just set your config to use the main server instead of a mirror?

gbaz avatar Apr 03 '18 13:04 gbaz

Since this is offtopic (oops, my fault) I'll follow up elsewhere.

chreekat avatar Apr 03 '18 13:04 chreekat