users_guide: fix sphinx error caused by non-explicit override
ClosedPublic

Authored by watashi on Sep 19 2018, 5:59 AM.

Details

Summary

Encouter following error when make:

Extension error:
The 'ghc-flag' directive is already registered to domain std

as we register ghc-flag to std in add_object_type first and then
overtride it in add_directive_to_domain.

Test Plan
make -C utils/haddock/doc html SPHINX_BUILD=/usr/bin/sphinx-build

Diff Detail

Repository
rGHC Glasgow Haskell Compiler
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
watashi created this revision.Sep 19 2018, 5:59 AM

Hmm, I noticed this earlier as well and fixed it in 4eebc8016f68719e1ccdf460754a97d1f4d6ef05. However, this does seem like a cleaner solution.

@bgamari I will rebase this on top of that then.

This revision was not accepted when it landed; it landed in state Needs Review.Sep 20 2018, 3:07 PM
This revision was automatically updated to reflect the committed changes.

Sadly it looks like this breaks under older sphinx versions. For instance, with 1.4.9 I'm seeing,

Extension error:Extension error:

when adding directive classes, no additional arguments may be givenwhen adding directive classes, no additional arguments may be given

That's sad :-(

I guess we can either revert it or probably have some ugly if check on sphinx version then.

That's sad :-(

I guess we can either revert it or probably have some ugly if check on sphinx version then.

I ended up doing the latter, sadly.