elm-lang / elm-make

A build tool for Elm projects
BSD 3-Clause "New" or "Revised" License
175 stars 45 forks source link

Documentation error when there's obvious @docs pragmas #95

Closed athanclark closed 8 years ago

athanclark commented 8 years ago

Ran into this error while updating Jessica Kerr's elm-param-parsing library -

If you clone this repo, and issue elm-make src/UrlParameterParser.elm, you'll get this error:

-- DOCUMENTATION ERROR ------------------------------ src/UrlParameterParser.elm

The following exports do not appear in your module documentation: ParseResult
parseSearchString

 6│>{-|
 7│>
 8│># Method
 9│>@docs parseSearchString
10│>
11│># Return type
12│>@docs ParseResult
13│>
14│> -}

All exports must be listed in the module documentation after a @docs keyword.
Learn more at <http://package.elm-lang.org/help/documentation-format>

Detected errors in 1 module.

I truncated the actual documentation string for brevity, but still... this error is frustrating. It's asking for @docs pragmas, when they're obviously there. What is the underlying issue with this version of the library that would cause this error?

athanclark commented 8 years ago

@fresheyeball helped me tremendously on this one, here's the culprit: https://github.com/athanclark/elm-param-parsing/pull/1/files

evancz commented 8 years ago

I guess this is a problem with the parser for doc comments. That code lives in elm-compiler, so do you mind opening an issue there named "Doc comments with odd indentation cause parse problems" and share basically the same content, emphasizing the fact that the space is the problem?

Sorry for the trouble!