Skip to content

Haddock deprecate hscolour, tweak options - #5236

Merged
23Skidoo merged 6 commits into
masterfrom
feature/haddock-papercuts
Jun 13, 2018
Merged

Haddock deprecate hscolour, tweak options#5236
23Skidoo merged 6 commits into
masterfrom
feature/haddock-papercuts

Conversation

@harpocrates

@harpocrates harpocrates commented Mar 27, 2018

Copy link
Copy Markdown
Collaborator

Please include the following checklist in your PR:

  • Patches conform to the coding conventions.
  • Any changes that could be relevant to users have been recorded in the changelog.
  • The documentation has been updated, if necessary.
  • If the change is docs-only, [ci skip] is used to avoid triggering the build bots.

Please also shortly describe how you tested your change. Bonus points for added tests!


Small paper-cuts for cabal haddock:

I'm still in the process of testing this.

@harpocrates harpocrates changed the title [WIP] Feature/haddock papercuts Mar 27, 2018
@alexbiehl

Copy link
Copy Markdown
Member

Alec, could you also add the '--quickjump' flag when generating docs for Hackage?

@harpocrates

Copy link
Copy Markdown
Collaborator Author

@alexbiehl Only for Hackage? Is there any disadvantage to always enabling it?

@alexbiehl

alexbiehl commented Mar 27, 2018 via email

Copy link
Copy Markdown
Member
@gbaz

gbaz commented Mar 27, 2018

Copy link
Copy Markdown
Collaborator

Quickjump doesn't work with local docs at the moment, due to ajax restrictions :-/

An alternate local mode that embedded the quickjump data thus bypassing the xhr request, just for local docs, might be quite nice. (in fact, why can't that be done in general?)

@harpocrates

harpocrates commented Mar 27, 2018

Copy link
Copy Markdown
Collaborator Author

I'm sold on enabling it by default only in --for-hackage.

I'll add --quickjump as a separate flag, and --for-hackage will imply it.

@alexbiehl

alexbiehl commented Mar 27, 2018 via email

Copy link
Copy Markdown
Member
@gbaz

gbaz commented Mar 27, 2018

Copy link
Copy Markdown
Collaborator

right -- i'm not suggesting to embed directly. I'm suggesting to use a <link> tag or something to a js file for those cases. So you can still share it. And hackage can still read it (either by embedding the js file itself, or by xhr to a separate json file). just move to a load mechanism that isn't dynamic, but is static with the page, to avoid xhr restrictions.

@23Skidoo

Copy link
Copy Markdown
Member

I'm +1 on always enabling hyperlink-source, btw.

@harpocrates

Copy link
Copy Markdown
Collaborator Author

I am strongly against always enabling hyperlink-source - it can be quite slow for large generated source files. Once haskell/haddock#758 gets fixed, I'll go from "strongly against" to "don't care".

@harpocrates
harpocrates force-pushed the feature/haddock-papercuts branch from 1593a18 to 141cd55 Compare March 27, 2018 18:46
@23Skidoo

Copy link
Copy Markdown
Member

Good point, let's wait for that issue to get fixed.

@harpocrates
harpocrates force-pushed the feature/haddock-papercuts branch from 141cd55 to e3744e7 Compare March 27, 2018 19:21
@alexbiehl

Copy link
Copy Markdown
Member

Thanks Alec!

@harpocrates
harpocrates force-pushed the feature/haddock-papercuts branch from ef185b5 to 22c11f1 Compare March 28, 2018 15:52
@harpocrates

Copy link
Copy Markdown
Collaborator Author

I'll merge as soon as all CI is green.

@23Skidoo Is the deprecation message around hscolour good enough? I looked for other similar instances of deprecation but didn't really find any.

@harpocrates harpocrates changed the title [WIP] Haddock deprecate hscolour, tweak options Mar 28, 2018
@harpocrates

Copy link
Copy Markdown
Collaborator Author

@alexbiehl Which version of Haddock should I expect the since annotation stuff to be in? 2.19.1 or 2.20.0?

@alexbiehl

alexbiehl commented Mar 28, 2018 via email

Copy link
Copy Markdown
Member
@harpocrates
harpocrates force-pushed the feature/haddock-papercuts branch from 5e07162 to b3f153e Compare March 29, 2018 15:00
@harpocrates

harpocrates commented Mar 29, 2018

Copy link
Copy Markdown
Collaborator Author

I let the tests run for 22c11f1 and Travis had only a handful of failures, all with error messages that cannot be related to that commit. Since then, all I've done is bump up the required Haddock for --since-qual (as per Alex's comment).

@23Skidoo Does this look OK to merge now?

@alexbiehl

alexbiehl commented Apr 12, 2018

Copy link
Copy Markdown
Member

This looks good. @23Skidoo can we merge this?

@harpocrates

Copy link
Copy Markdown
Collaborator Author

I've rebased on master. Now that #5261 is merged, I think this should be OK again.

@23Skidoo
23Skidoo force-pushed the feature/haddock-papercuts branch from 17d37ea to 5b9236b Compare June 9, 2018 13:24
@23Skidoo

23Skidoo commented Jun 9, 2018

Copy link
Copy Markdown
Member

Rebased against master.

* warning in hscolour's description
* warning when hscolour is run
* added 'hyperlinked-source' (the name Haddock has for the option) as a
  synonym for 'hyperlink-source'

Follows up comments from #5140.
Now that Haddock has support for package-aware since annotations, we
want to pass in the option that omits the package name on since
annotations for the current package.
This options only works for Haddock >=2.19.
@23Skidoo
23Skidoo force-pushed the feature/haddock-papercuts branch from 9706ff1 to 0a3891e Compare June 13, 2018 22:26
@23Skidoo
23Skidoo merged commit 4e0c701 into master Jun 13, 2018
@23Skidoo
23Skidoo deleted the feature/haddock-papercuts branch June 13, 2018 22:27
@23Skidoo

Copy link
Copy Markdown
Member

Merged, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

4 participants