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

Haddock deprecate hscolour, tweak options #5236

Merged
merged 6 commits into from
Jun 13, 2018
Merged

Conversation

harpocrates
Copy link
Collaborator

@harpocrates harpocrates commented Mar 27, 2018

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 [WIP] Haddock deprecate hscolour, tweak options Mar 27, 2018
@alexbiehl
Copy link
Member

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

@harpocrates
Copy link
Collaborator Author

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

@alexbiehl
Copy link
Member

alexbiehl commented Mar 27, 2018 via email

@gbaz
Copy link
Collaborator

gbaz commented Mar 27, 2018

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
Copy link
Collaborator Author

harpocrates commented Mar 27, 2018

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
Copy link
Member

alexbiehl commented Mar 27, 2018 via email

@gbaz
Copy link
Collaborator

gbaz commented Mar 27, 2018

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
Member

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

@harpocrates
Copy link
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".

@23Skidoo
Copy link
Member

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

@alexbiehl
Copy link
Member

Thanks Alec!

@harpocrates
Copy link
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 Haddock deprecate hscolour, tweak options Mar 28, 2018
@harpocrates
Copy link
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
Copy link
Member

alexbiehl commented Mar 28, 2018 via email

@harpocrates
Copy link
Collaborator Author

harpocrates commented Mar 29, 2018

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
Copy link
Member

alexbiehl commented Apr 12, 2018

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

@harpocrates
Copy link
Collaborator Author

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

@23Skidoo
Copy link
Member

23Skidoo commented Jun 9, 2018

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 merged commit 4e0c701 into master Jun 13, 2018
@23Skidoo 23Skidoo deleted the feature/haddock-papercuts branch June 13, 2018 22:27
@23Skidoo
Copy link
Member

Merged, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants