Skip to content
Snippets Groups Projects
  1. May 13, 2018
  2. Dec 14, 2017
  3. Nov 28, 2017
  4. Aug 19, 2017
    • patrickdoc's avatar
      users_guide: Convert mkUserGuidePart generation to a Sphinx extension · cf8ab1ce
      patrickdoc authored and Ben Gamari's avatar Ben Gamari committed
      This removes all dependencies the users guide had on `mkUserGuidePart`.
      The generation of the flag reference table and the various pieces of the
      man page is now entirely contained within the Spinx extension
      `flags.py`. You can see the man page generation on the orphan page
      https://downloads.haskell.org/~ghc/latest/docs/html/users_guide/ghc.html
      
      The extension works by collecting all of the meta-data attached to the
      `ghc-flag` directives and then formatting and displaying it at
      `flag-print` directives. There is a single printing directive that can
      be customized with two options, what format to display (table, list, or
      block of flags) and an optional category to limit the output to
      (verbosity, warnings, codegen, etc.).
      
      New display formats can be added by creating a function
      `generate_flag_xxx` (where `xxx` is a description of the format) which
      takes a list of flags and a category and returns a new `xxx`. Then just
      add a reference in the dispatch table `handlers`. That display can now
      be run by passing `:type: xxx` to the `flag-print` directive.
      
      `flags.py` contains two maps of settings that can be adjusted. The first
      is a canonical list of flag categories, and the second sets default
      categories for files.
      
      The only functionality that Sphinx could not replace was the
      `what_glasgow_exts_does.gen.rst` file. `mkUserGuidePart` actually just
      reads the list of flags from `compiler/main/DynFlags.hs` which Sphinx
      cannot do. As the flag is deprecated, I added the list as a static file
      which can be updated manually.
      
      Additionally, this patch updates every single documented flag with the
      data from `mkUserGuidePart` to generate the reference table.
      
      Fixes #11654 and, incidentally, #12155.
      
      Reviewers: austin, bgamari
      
      Subscribers: rwbarton, thomie
      
      GHC Trac Issues: #11654, #12155
      
      Differential Revision: https://phabricator.haskell.org/D3839
      cf8ab1ce
  5. Jul 24, 2017
  6. Jul 23, 2017
    • Ben Gamari's avatar
      Fix more documentation wibbles · 2dff2c7f
      Ben Gamari authored
      Fixes #14020, #14016, #14015, #14019
      2dff2c7f
    • patrickdoc's avatar
      users-guide: Standardize and repair all flag references · 44b090be
      patrickdoc authored and Ben Gamari's avatar Ben Gamari committed
      This patch does three things:
      
      1.) It simplifies the flag parsing code in `conf.py` to properly display
      flag definitions created by `.. (ghc|rts)-flag::`. Additionally, all flag
      references must include the associated arguments. Documentation has been
      added to `editing-guide.rst` to explain this.
      
      2.) It normalizes all flag definitions to a similar format. Notably, all
      instances of `<>` have been replaced with `⟨⟩`. All references across the
      users guide have been updated to match.
      
      3.) It fixes a couple issues with the flag reference table's generation code,
      which did not handle comma separated flags in the same cell and did not
      properly reference flags with arguments.
      
      Test Plan:
      `SPHINXOPTS = -n` to activate "nitpicky" mode, which reports all broken
      references. All remaining errors are references to flags without any
      documentation.
      
      Reviewers: austin, bgamari
      
      Reviewed By: bgamari
      
      Subscribers: rwbarton, thomie
      
      GHC Trac Issues: #13980
      
      Differential Revision: https://phabricator.haskell.org/D3778
      44b090be
  7. Apr 18, 2017
  8. Feb 02, 2017
  9. Jan 10, 2017
  10. Aug 30, 2016
  11. Jul 04, 2016
  12. May 21, 2016
  13. Jan 21, 2016
    • Sergei Trofimovich's avatar
      sphinx-build: fix python stack overflow (Trac #10950) · 4c11db63
      Sergei Trofimovich authored
      
      Summary:
      commit a034031a did not
      fix problem completely. Stack overflows still occasionally
      happen.
      
      Easy to test by the following Torture Test:
      
        while sphinx-build -T -N -E -a -b html \
              -d docs/users_guide/.doctrees-html \
              -D latex_paper_size=letter \
              docs/users_guide docs/users_guide/build-html/users_guide
        do
          echo again
        done
      
      sphinx build large nested data structures when parses GHC manual
      (docs/users_guide/glasgow_exts.rst is 455KB in size) which
      can't be serialized useing default python call stack depth of 1000
      calls.
      
      The patch increases stack depth 10 times. Survived 2 hours of
      Torture Test.
      
      Signed-off-by: default avatarSergei Trofimovich <siarheit@google.com>
      
      Test Plan: ran Torture Test to make sure it is stable
      
      Reviewers: austin, bgamari
      
      Reviewed By: bgamari
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D1809
      
      GHC Trac Issues: #10950
      4c11db63
  14. Jan 09, 2016
  15. Jan 04, 2016
  16. Nov 18, 2015
  17. Oct 03, 2015
Loading