GithubHelp home page GithubHelp logo

elixir-lang / ex_doc Goto Github PK

View Code? Open in Web Editor NEW
1.4K 1.4K 315.0 12.37 MB

ExDoc produces HTML and EPUB documentation for Elixir projects

Home Page: http://elixir-lang.org

License: Other

Elixir 64.65% CSS 13.08% JavaScript 17.24% HTML 3.38% Shell 0.05% Handlebars 1.60%

ex_doc's People

Contributors

alco avatar allyraza avatar angelikatyborska avatar archdragon avatar cristineguadelupe avatar cw789 avatar cybrox avatar davidoliver avatar dependabot[bot] avatar dignifiedquire avatar eksperimental avatar ericmj avatar garazdawi avatar jonatanklosko avatar josevalim avatar jwarwick avatar lexmag avatar milmazz avatar nscyclone avatar paulo-valim avatar pdilyard avatar rafaelfranca avatar robertdober avatar simonprev avatar timothyvanderaerden avatar tmbb avatar viniciusmuller avatar whatyouhide avatar wojtekmach avatar zachallaun avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ex_doc's Issues

Kernel.++/2 doesn't autolink

Kernel.++/2 doesn't appear to auto-link in the docs. Probably need to update the regex for discovering functions. Should also validate other special forms.

Problems compiling ex_doc

$ mix -v
Elixir 0.10.4-dev

/projects/ex_doc$ mix compile
** (ArgumentError) argument error
:io.put_chars(#PID<0.24.0>, :unicode, [<<109, 97, 107, 101, 58, 32, 34, 112, 114, 105, 118, 47, 109, 97, 114, 107, 100, 111, 119, 110, 46, 115, 111, 34, 32, 228, 114, 32, 102, 228, 114, 115, 107, 46, 10>>, 10])
/projects/elixir/lib/mix/lib/mix/tasks/compile.ex:78: Mix.Tasks.Compile."-run/1-fun-2-"/2
/projects/elixir/lib/elixir/lib/enum.ex:675: Enum."-map/2-lc$^0/1-0-"/2
/projects/elixir/lib/mix/lib/mix/tasks/compile.ex:77: Mix.Tasks.Compile.run/1
/projects/elixir/lib/mix/lib/mix/cli.ex:61: Mix.CLI.run_task/2

Autolink erlang functions

Autolink erlang functions in the docs (of the form :module.fun/arity) to the erlang manual pages.

I've almost got a working version of this and will submit a PR soon.

Module list should be consistent

Right now, e.g. GenServer.Behaviour shows up with its full module name in the module list. This is of course because there's no GenServer parent module, but the behavior is rather confusing to someone not in the know; it gives the impression that other modules don't have submodules (e.g. Kernel.SpecialForms isn't in the list). With the current behavior, submodules also aren't very discoverable in general.

I see two ways to deal with this:

  • List all modules in the list with their full name. This makes modules a lot more discoverable when just browsing through the list and adds no confusion. It does have the potential to be overwhelming when there are lots of modules and lots of hierarchies, however.
  • Consistently put modules under their parent module. This would mean that e.g. GenServer would either not be clickable or would just show a page saying "nothing here". This doesn't really solve the discoverability issue, though.

Thoughts? Any other ideas?

Build problem on Ubuntu

Attempting to do a mix compile, and get this:

david@ubuntu:~/ex_doc$ mix compile
git submodule update --init
Submodule 'sundown' () registered for path 'sundown'
From git://github.com/vmg/sundown
 * [new branch]      gh-pages   -> origin/gh-pages
 * [new branch]      master     -> origin/master
Submodule path 'sundown': checked out '975df6267cbc798ecfcb6948364cd978dc2bf36f'
cd sundown && make
make[1]: Entering directory `/home/david/ex_doc/sundown'
gcc -c -g -O3 -fPIC -Wall -Werror -Wsign-compare -Isrc -Ihtml   -c -o src/markdown.o src/markdown.c
gcc -c -g -O3 -fPIC -Wall -Werror -Wsign-compare -Isrc -Ihtml   -c -o src/stack.o src/stack.c
gcc -c -g -O3 -fPIC -Wall -Werror -Wsign-compare -Isrc -Ihtml   -c -o src/buffer.o src/buffer.c
gcc -c -g -O3 -fPIC -Wall -Werror -Wsign-compare -Isrc -Ihtml   -c -o src/autolink.o src/autolink.c
gcc -c -g -O3 -fPIC -Wall -Werror -Wsign-compare -Isrc -Ihtml   -c -o html/html.o html/html.c
gcc -c -g -O3 -fPIC -Wall -Werror -Wsign-compare -Isrc -Ihtml   -c -o html/html_smartypants.o html/html_smartypants.c
gcc -c -g -O3 -fPIC -Wall -Werror -Wsign-compare -Isrc -Ihtml   -c -o html/houdini_html_e.o html/houdini_html_e.c
gcc -c -g -O3 -fPIC -Wall -Werror -Wsign-compare -Isrc -Ihtml   -c -o html/houdini_href_e.o html/houdini_href_e.c
gcc -g -O3 -Wall -Werror  -shared -Wl src/markdown.o src/stack.o src/buffer.o src/autolink.o html/html.o html/html_smartypants.o html/houdini_html_e.o html/houdini_href_e.o -o libsundown.so.1
gcc: error: unrecognized command line option ‘-Wl’
make[1]: *** [libsundown.so.1] Error 1
make[1]: Leaving directory `/home/david/ex_doc/sundown'
make: *** [sundown/libsundown.so] Error 2

gcc -version gives me this:

gcc (Ubuntu/Linaro 4.7.2-2ubuntu1) 4.7.2

mix docs error

Hello,

Tried to build docs with mix docs but getting error:

** (UndefinedFunctionError) undefined function: :supervisor.__info__/1
    :supervisor.__info__(:attributes)
    deps/ex_doc/lib/ex_doc/retriever.ex:208: ExDoc.Retriever.callbacks_of/1
    deps/ex_doc/lib/ex_doc/retriever.ex:203: ExDoc.Retriever."-callback_implementations/1-fun-1-"/1
    /home/shk/work/elixir/lib/elixir/lib/enum.ex:675: Enum."-map/2-lc$^0/1-0-"/2
    deps/ex_doc/lib/ex_doc/retriever.ex:203: ExDoc.Retriever.callback_implementations/1
    deps/ex_doc/lib/ex_doc/retriever.ex:88: ExDoc.Retriever.generate_node/3
    /home/shk/work/elixir/lib/elixir/lib/enum.ex:675: Enum."-map/2-lc$^0/1-0-"/2
    /home/shk/work/elixir/lib/elixir/lib/enum.ex:675: Enum."-map/2-lc$^0/1-0-"/2

Any ideas?

Ubuntu Build Problem

This may be related to #31

I had a report in the book errata page:

Fetching and building the ex_doc dependency leads to errors on ubuntu 13.04.

Fix is to edit deps/ex_doc/sundown/Makefile and remove the "-Wl" on line 44, then run mix deps.compile to fix up.--Ant Skelton

Wrong instructions for CLI usage

A weird thing happened. I clearly remember changing the README here because I was able to generate docs for a project that way. And it corresponds with the usage docstring.

Today I was getting this error on two different projects – https://github.com/elixir-lang/ex_doc/blob/master/lib/ex_doc/retriever.ex#L53-L54. If you examine the code path leading to this line, it doesn't add the directory where the beams are to the load path. So the user still needs to run ex_doc with elixir -pa path/to/ebin ex_doc <project name> <version> path/to/ebin.

I thought ex_doc would append the path automatically. Users don't have to know it relies on Code.ensure_loaded?.

Provide a docs.all task

The idea of the docs.all task is to go through all dependencies in a project and generate their documentation inside docs/PROJECT. Then generate an index file with links to each project and put it in docs/index.html. This way, developers will have easy access to the documentation of all dependencies in a given project.

In order for this to work, we should also change the default target of the mix docs task to be docs/PROJECT.

Missing file?

Hey, I'm trying to create some docs here.

Seems like ex_docs are looking for a file that can't be found. Did we loose it somewhere along the line, or should I have it from somewhere else?

$ mix docs

=ERROR REPORT==== 31-May-2013::23:14:38 ===
Error in process <0.79.0> with exit value: {{badmatch,{error,{load_failed,"Failed to load NIF library: '/home/kitofr/code/elixir/issues/deps/ex_doc/share/markdown.so: cannot open shared object file: No such file or directory'"}}},[{'Elixir.Markdown'...

Create custom mix task that will create/checkout gh-pages branch, generate, then push

I think it would be a good idea to make publishing docs as quickly as possible. With github project pages we can publish static html quickly.

I would like to create a mix task named docs.publish or docs.gh-pages that would

  1. verify we are in a git repo
  2. either create or checkout an orphan branch named gh-pages in a directory called "docs"
  3. run "mix docs"
  4. push that branch to github

I'm looking for a nod of approval before I write the code and create a PR.
I think adding it to ex_doc directly instead of another package would make this easy for folks to get in the habit of publishing docs.

Autolinking

We should inspect the documentation source and provide autolinking. For example, if we mention a function as function/2, we should automatically add a documentation link for it. The same for external functions as External.function/2.

Issues in the current implementation

The current implementation of ExDoc contains a series of issues, I would like to fix in the long term. The most prominent consequence of those issues is the difficulty in testing, either because the APIs are not well exposed or because the different modules are too coupled. The main issues are:

  1. ExDoc as the main driver for logic. Initially we have thought about having ExDoc driving the main logic by simply calling functions on the formatter. This approach limits greatly what the compiler can achieve. My proposal is to change ExDoc to simply call: formatter.run(data, config) and let the formatter do whatever it pleases. This will make it easy to unit test ExDoc, because we can simply create a dummy formatter that returns the given data and config. Data is meant to be the information returned from the retriever and config is the current ExDoc config record.

  2. The ExDoc.Retriever module was created with ExDoc in mind. Its only API is get_docs which expects a bunch of files, which, once again, make them hard to test. Instead I would like the retriever to work against a list of modules names, which is possible because aliases in Elixir can exist without the underlying module existing, like ThisIsUnknown. Again, the direct benefit is that testability becomes, because we can simply pass a module for testing, instead of having to generate actual beam files. My proposed API for this module would be:

    ExDoc.Retriever.docs_from_dir(dir, config)
    ExDoc.Retriever.docs_from_files(files, config)
    ExDoc.Retriever.docs_from_modules(files, config)

    docs_from_dir should simply do a wildcard on the given directory for ebin fles, which are then passed to files which then calls modules. I would also like to change the ExDoc.Retriever to return the full list of docs, without nesting or segregation by protocols or records. Nesting and segregation should be done by the underlying formatter on whatever way it pleases. We could provide helpers for such functionality either as extra functions in ExDoc.Retriever.

  3. Finally, since those changes will likely move more logic into the formatter, I would like to split the current formatter in two modules. One that will do the required assembling and another one only with the templates. Today, both templates and assembling are in the same module, which cases confusion. For example, it would be wise to still keep the parts that write to disk decoupled from the template, so we can test the template without a need to read and write to disk.

As the main goal here is provide a well documented and tested project, it is important to document and update tests as we go, getting rid of the old, coupled tests in favor of new ones.

Build fail on MacOSX

I build according to "Using ExDoc via command line" in README and I get the following error message.

/Users/yuki_ito/dev% git clone [email protected]:elixir-lang/ex_doc.git
Cloning into 'ex_doc'...
remote: Counting objects: 1293, done.
remote: Compressing objects: 100% (738/738), done.
remote: Total 1293 (delta 520), reused 1274 (delta 507)
Receiving objects: 100% (1293/1293), 388.55 KiB | 186 KiB/s, done.
Resolving deltas: 100% (520/520), done.
/Users/yuki_ito/dev% cd ex_doc/
/Users/yuki_ito/dev/ex_doc% mix compile
git submodule update --init
Submodule 'sundown' (git://github.com/vmg/sundown.git) registered for path 'sundown'
Cloning into 'sundown'...
Submodule path 'sundown': checked out '975df6267cbc798ecfcb6948364cd978dc2bf36f'
cd sundown && make
gcc -c -g -O3 -fPIC -Wall -Werror -Wsign-compare -Isrc -Ihtml   -c -o src/markdown.o src/markdown.c
gcc -c -g -O3 -fPIC -Wall -Werror -Wsign-compare -Isrc -Ihtml   -c -o src/stack.o src/stack.c
gcc -c -g -O3 -fPIC -Wall -Werror -Wsign-compare -Isrc -Ihtml   -c -o src/buffer.o src/buffer.c
gcc -c -g -O3 -fPIC -Wall -Werror -Wsign-compare -Isrc -Ihtml   -c -o src/autolink.o src/autolink.c
gcc -c -g -O3 -fPIC -Wall -Werror -Wsign-compare -Isrc -Ihtml   -c -o html/html.o html/html.c
gcc -c -g -O3 -fPIC -Wall -Werror -Wsign-compare -Isrc -Ihtml   -c -o html/html_smartypants.o html/html_smartypants.c
gcc -c -g -O3 -fPIC -Wall -Werror -Wsign-compare -Isrc -Ihtml   -c -o html/houdini_html_e.o html/houdini_html_e.c
gcc -c -g -O3 -fPIC -Wall -Werror -Wsign-compare -Isrc -Ihtml   -c -o html/houdini_href_e.o html/houdini_href_e.c
gcc -g -O3 -Wall -Werror  -shared -Wl src/markdown.o src/stack.o src/buffer.o src/autolink.o html/html.o html/html_smartypants.o html/houdini_html_e.o html/houdini_href_e.o -o libsundown.so.1
ln -f -s libsundown.so.1 libsundown.so
gcc -c -g -O3 -fPIC -Wall -Werror -Wsign-compare -Isrc -Ihtml   -c -o examples/sundown.o examples/sundown.c
gcc -g -O3 -Wall -Werror  examples/sundown.o src/markdown.o src/stack.o src/buffer.o src/autolink.o html/html.o html/html_smartypants.o html/houdini_html_e.o html/houdini_href_e.o -o sundown
gcc -c -g -O3 -fPIC -Wall -Werror -Wsign-compare -Isrc -Ihtml   -c -o examples/smartypants.o examples/smartypants.c
gcc -g -O3 -Wall -Werror  examples/smartypants.o src/markdown.o src/stack.o src/buffer.o src/autolink.o html/html.o html/html_smartypants.o html/houdini_html_e.o html/houdini_href_e.o -o smartypants
gcc -g -O3 -fPIC -Isundown/src -Isundown/html -I/usr/local/lib/erlang/erts-5.10.1/include -shared -dynamiclib -undefined dynamic_lookup -o share/markdown.so sundown/html/html.o sundown/html/html_smartypants.o sundown/html/houdini_html_e.o sundown/html/houdini_href_e.o sundown/src/buffer.o sundown/src/autolink.o sundown/src/stack.o sundown/src/markdown.o src/markdown_nif.c src/render_ansi.c

Compiled lib/ex_doc/cli.ex

=ERROR REPORT==== 15-May-2013::19:36:48 ===
Error in process <0.68.0> with exit value: {{badmatch,{error,{load_failed,"Failed to load NIF library: 'dlopen(/Users/yuki_ito/dev/ex_doc/share/markdown.so, 2): no suitable image found.  Did find:\n  /Users/yuki_ito/dev/ex_doc/share/markdown.so:... 


=ERROR REPORT==== 15-May-2013::19:36:48 ===
The on_load function for module Elixir-Markdown returned {{badmatch,
                                                           {error,
                                                            {load_failed,
                                                             "Failed to load NIF library: 'dlopen(/Users/yuki_ito/dev/ex_doc/share/markdown.so, 2): no suitable image found.  Did find:\n\t/Users/yuki_ito/dev/ex_doc/share/markdown.so: mach-o, but wrong architecture'"}}},
                                                          [{'Elixir-Markdown',
                                                            init,0,
                                                            [{file,...},
                                                             {...}]},
                                                           {code_server,
                                                            '-handle_on_load/4-fun-0-',
                                                            1,
                                                            [{...}|...]}]}
Compiled lib/markdown.ex
Compiled lib/mix_docs.ex
Compiled lib/ex_doc.ex
Compiled lib/ex_doc/html_formatter.ex
Compiled lib/ex_doc/retriever.ex
Generated ex_doc.app

I use Max OS X 10.7.4, Erlang R16B and Elixir master branch.

iex info

/Users/yuki_ito/% iex
Erlang R16B (erts-5.10.1) [source] [smp:4:4] [async-threads:10] [hipe] [kernel-poll:false]

Interactive Elixir (0.8.3.dev) - press Ctrl+C to exit (type h() ENTER for help)

gcc info

/Users/yuki_ito% gcc --version
i686-apple-darwin11-llvm-gcc-4.2 (GCC) 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.11.00)
Copyright (C) 2007 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Include @specs in Documentation?

Hi, is it possible to include any @specs in the docs ? If its possible and you'd consider a PR could you give me a hint of how it might be done? I can't see how to get them out of __ info __ or otherwise retrieve the @specs and @types for a module.

Behaviour signatures removed from Elixir?

In elixir-lang/elixir@d33463d, @josevalim removed the signature info from the Behaviour docs. This is generating a match error in ExDoc.Retriever.get_callback/4, where we use the signature information in the ExDoc.FunctionNode. Does this information live some other place in the beam file? Or is there a better way to capture it for the docs?

Can't generate documentation on OS X Lion

Crashes with the following error:

** (UndefinedFunctionError) undefined function: Macro.to_string/1
    Macro.to_string({:main,0,[{:args,[line: 2],nil}]})
    /Users/chee/elixir/issues/deps/ex_doc/lib/templates/detail_template.eex:3: ExDoc.HTMLFormatter.detail_template/1
    /Users/chee/elixir/issues/deps/ex_doc/lib/templates/module_template.eex:88: ExDoc.HTMLFormatter."-module_template/6-lc$^5/1-5-"/1
    /Users/chee/elixir/issues/deps/ex_doc/lib/templates/module_template.eex:88: ExDoc.HTMLFormatter.module_template/6
    /Users/chee/elixir/issues/deps/ex_doc/lib/ex_doc.ex:81: ExDoc.generate_module_page/4
    /Users/chee/elixir/issues/deps/ex_doc/lib/ex_doc.ex:75: ExDoc.generate_list/5
    lists.erl:1323: :lists.foreach/2
    /Users/chee/elixir/lib/elixir/lib/enum.ex:284: Enum.each/2


Adding user's guides

We'd like to be able to add user's guides to our documentation, like Erlang has.

The current plan is to allow passing a list of markdown files to ex_doc which will be used as the user's guide. Directories can be passed as well, those are expanded to the files in them (alphabetically).

Umbrella project support

Placing the ExDoc dependency in the mix.exs file at the root of an umbrella project and running mix docs does not generate documentation for each application found within your apps directory.

It would be awesome to be able to manipulate documentation at the umbrella level!

Can't compile ExDoc on Windows

tovmasyan@input255 ~/ex_doc
$ mix test
src/markdown.c:1:0: error: -fPIC ignored for target (all code is position indepe
ndent) [-Werror]
cc1.exe: all warnings being treated as errors
make[1]: *** [src/markdown.o] Error 1
make: *** [sundown/libsundown.so] Error 2
cd sundown && make
make[1]: Entering directory /u/ex_doc/sundown' gcc -c -g -O3 -fPIC -Wall -Werror -Wsign-compare -Isrc -Ihtml -c -o src/markdo wn.o src/markdown.c make[1]: Leaving directory/u/ex_doc/sundown'

=ERROR REPORT==== 1-Jul-2013::17:42:14 ===
Error in process <0.73.0> with exit value: {{badmatch,{error,{load_failed,"Faile
d to load NIF library u:/ex_doc/share/markdown: '├Н├е ├н├а├й├д├е├н ├│├к├а├з├а├н├
н├╗├й ├м├о├д├│├л├╝.'"}}},[{'Elixir.Markdown',init,0,[{file,"u:/ex_doc/lib/markdo
wn.ex"},{line,6}]},{code_server,'-handle_on_load/4-fun-0-'...

=ERROR REPORT==== 1-Jul-2013::17:42:14 ===
The on_load function for module Elixir.Markdown returned {{badmatch,
{error,
{load_failed,
"Failed to load NIF
library u:/ex_doc/share/markdown: '├Н├е ├н├а├й├д├е├н ├│├к├а├з├а├н├н├╗├й ├м├о├д├
│├л├╝.'"}}},
[{'Elixir.Markdown',
init,0,
[{file,...},
{...}]},
{code_server,
'-handle_on_load/4-f
un-0-',
1,
[{...}|...]}]}

=ERROR REPORT==== 1-Jul-2013::17:42:14 ===
Error in process <0.75.0> with exit value: {{badmatch,{error,{load_failed,"Faile
d to load NIF library u:/ex_doc/share/markdown: '├Н├е ├н├а├й├д├е├н ├│├к├а├з├а├н├
н├╗├й ├м├о├д├│├л├╝.'"}}},[{'Elixir.Markdown',init,0,[{file,"u:/ex_doc/lib/markdo
wn.ex"},{line,6}]},{code_server,'-handle_on_load/4-fun-0-'...

=ERROR REPORT==== 1-Jul-2013::17:42:14 ===
The on_load function for module Elixir.Markdown returned {{badmatch,
{error,
{load_failed,
"Failed to load NIF
library u:/ex_doc/share/markdown: '├Н├е ├н├а├й├д├е├н ├│├к├а├з├а├н├н├╗├й ├м├о├д├
│├л├╝.'"}}},
[{'Elixir.Markdown',
init,0,
[{file,...},
{...}]},
{code_server,
'-handle_on_load/4-f
un-0-',
1,
[{...}|...]}]}

=ERROR REPORT==== 1-Jul-2013::17:42:14 ===
Error in process <0.77.0> with exit value: {{badmatch,{error,{load_failed,"Faile
d to load NIF library u:/ex_doc/share/markdown: '├Н├е ├н├а├й├д├е├н ├│├к├а├з├а├н├
н├╗├й ├м├о├д├│├л├╝.'"}}},[{'Elixir.Markdown',init,0,[{file,"u:/ex_doc/lib/markdo
wn.ex"},{line,6}]},{code_server,'-handle_on_load/4-fun-0-'...

=ERROR REPORT==== 1-Jul-2013::17:42:14 ===
The on_load function for module Elixir.Markdown returned {{badmatch,
{error,
{load_failed,
"Failed to load NIF
library u:/ex_doc/share/markdown: '├Н├е ├н├а├й├д├е├н ├│├к├а├з├а├н├н├╗├й ├м├о├д├
│├л├╝.'"}}},
[{'Elixir.Markdown',
init,0,
[{file,...},
{...}]},
{code_server,
'-handle_on_load/4-f
un-0-',
1,
[{...}|...]}]}

=ERROR REPORT==== 1-Jul-2013::17:42:14 ===
Error in process <0.85.0> with exit value: {{badmatch,{error,{load_failed,"Faile
d to load NIF library u:/ex_doc/share/markdown: '├Н├е ├н├а├й├д├е├н ├│├к├а├з├а├н├
н├╗├й ├м├о├д├│├л├╝.'"}}},[{'Elixir.Markdown',init,0,[{file,"u:/ex_doc/lib/markdo
wn.ex"},{line,6}]},{code_server,'-handle_on_load/4-fun-0-'...

=ERROR REPORT==== 1-Jul-2013::17:42:14 ===
The on_load function for module Elixir.Markdown returned {{badmatch,
{error,
{load_failed,
"Failed to load NIF
library u:/ex_doc/share/markdown: '├Н├е ├н├а├й├д├е├н ├│├к├а├з├а├н├н├╗├й ├м├о├д├
│├л├╝.'"}}},
[{'Elixir.Markdown',
init,0,
[{file,...},
{...}]},
{code_server,
'-handle_on_load/4-f
un-0-',
1,
[{...}|...]}]}
F
=ERROR REPORT==== 1-Jul-2013::17:42:15 ===
Error in process <0.88.0> with exit value: {{badmatch,{error,{load_failed,"Faile
d to load NIF library u:/ex_doc/share/markdown: '├Н├е ├н├а├й├д├е├н ├│├к├а├з├а├н├
н├╗├й ├м├о├д├│├л├╝.'"}}},[{'Elixir.Markdown',init,0,[{file,"u:/ex_doc/lib/markdo
wn.ex"},{line,6}]},{code_server,'-handle_on_load/4-fun-0-'...

F
=ERROR REPORT==== 1-Jul-2013::17:42:15 ===
The on_load function for module Elixir.Markdown returned {{badmatch,
{error,
{load_failed,
"Failed to load NIF
library u:/ex_doc/share/markdown: '├Н├е ├н├а├й├д├е├н ├│├к├а├з├а├н├н├╗├й ├м├о├д├
│├л├╝.'"}}},
[{'Elixir.Markdown',
init,0,
[{file,...},
{...}]},
{code_server,
'-handle_on_load/4-f
un-0-',
1,
[{...}|...]}]}

=ERROR REPORT==== 1-Jul-2013::17:42:15 ===
Error in process <0.91.0> with exit value: {{badmatch,{error,{load_failed,"Faile
d to load NIF library u:/ex_doc/share/markdown: '├Н├е ├н├а├й├д├е├н ├│├к├а├з├а├н├
н├╗├й ├м├о├д├│├л├╝.'"}}},[{'Elixir.Markdown',init,0,[{file,"u:/ex_doc/lib/markdo
wn.ex"},{line,6}]},{code_server,'-handle_on_load/4-fun-0-'...

=ERROR REPORT==== 1-Jul-2013::17:42:15 ===
The on_load function for module Elixir.Markdown returned {{badmatch,
{error,
{load_failed,
"Failed to load NIF
library u:/ex_doc/share/markdown: '├Н├е ├н├а├й├д├е├н ├│├к├а├з├а├н├н├╗├й ├м├о├д├
│├л├╝.'"}}},
[{'Elixir.Markdown',
init,0,
[{file,...},
{...}]},
{code_server,
'-handle_on_load/4-f
un-0-',
1,
[{...}|...]}]}
F
=ERROR REPORT==== 1-Jul-2013::17:42:16 ===
Error in process <0.97.0> with exit value: {{badmatch,{error,{load_failed,"Faile
d to load NIF library u:/ex_doc/share/markdown: '├Н├е ├н├а├й├д├е├н ├│├к├а├з├а├н├
н├╗├й ├м├о├д├│├л├╝.'"}}},[{'Elixir.Markdown',init,0,[{file,"u:/ex_doc/lib/markdo
wn.ex"},{line,6}]},{code_server,'-handle_on_load/4-fun-0-'...

=ERROR REPORT==== 1-Jul-2013::17:42:16 ===
The on_load function for module Elixir.Markdown returned {{badmatch,
{error,
{load_failed,
"Failed to load NIF
library u:/ex_doc/share/markdown: '├Н├е ├н├а├й├д├е├н ├│├к├а├з├а├н├н├╗├й ├м├о├д├
│├л├╝.'"}}},
[{'Elixir.Markdown',
init,0,
[{file,...},
{...}]},
{code_server,
'-handle_on_load/4-f
un-0-',
1,
[{...}|...]}]}
F

=ERROR REPORT==== 1-Jul-2013::17:37:27 ===
The on_load function for module Elixir.Markdown returned {{badmatch,
{error,
{load_failed,
"Failed to load NIF
library u:/ex_doc/share/markdown: '├Н├е ├н├а├й├д├е├н ├│├к├а├з├а├н├н├╗├й ├м├о├д├
│├л├╝.'"}}},
[{'Elixir.Markdown',
init,0,
[{file,...},
{...}]},
{code_server,
'-handle_on_load/4-f
un-0-',
1,
[{...}|...]}]}
F
=ERROR REPORT==== 1-Jul-2013::17:37:28 ===
Error in process <0.151.0> with exit value: {{badmatch,{error,{load_failed,"Fail
ed to load NIF library u:/ex_doc/share/markdown: '├Н├е ├н├а├й├д├е├н ├│├к├а├з├а├н
├н├╗├й ├м├о├д├│├л├╝.'"}}},[{'Elixir.Markdown',init,0,[{file,"u:/ex_doc/lib/markd
own.ex"},{line,6}]},{code_server,'-handle_on_load/4-fun-0-'...

=ERROR REPORT==== 1-Jul-2013::17:37:28 ===
The on_load function for module Elixir.Markdown returned {{badmatch,
{error,
{load_failed,
"Failed to load NIF
library u:/ex_doc/share/markdown: '├Н├е ├н├а├й├д├е├н ├│├к├а├з├а├н├н├╗├й ├м├о├д├
│├л├╝.'"}}},
[{'Elixir.Markdown',
init,0,
[{file,...},
{...}]},
{code_server,
'-handle_on_load/4-f
un-0-',
1,
[{...}|...]}]}
F
=ERROR REPORT==== 1-Jul-2013::17:37:30 ===
Error in process <0.155.0> with exit value: {{badmatch,{error,{load_failed,"Fail
ed to load NIF library u:/ex_doc/share/markdown: '├Н├е ├н├а├й├д├е├н ├│├к├а├з├а├н
├н├╗├й ├м├о├д├│├л├╝.'"}}},[{'Elixir.Markdown',init,0,[{file,"u:/ex_doc/lib/markd
own.ex"},{line,6}]},{code_server,'-handle_on_load/4-fun-0-'...

=ERROR REPORT==== 1-Jul-2013::17:37:30 ===
The on_load function for module Elixir.Markdown returned {{badmatch,
{error,
{load_failed,
"Failed to load NIF
library u:/ex_doc/share/markdown: '├Н├е ├н├а├й├д├е├н ├│├к├а├з├а├н├н├╗├й ├м├о├д├
│├л├╝.'"}}},
[{'Elixir.Markdown',
init,0,
[{file,...},
{...}]},
{code_server,
'-handle_on_load/4-f
un-0-',
1,
[{...}|...]}]}
F
=ERROR REPORT==== 1-Jul-2013::17:37:31 ===
The on_load function for module Elixir.Markdown returned {{badmatch,
{error,
{load_failed,
"Failed to load NIF
library u:/ex_doc/share/markdown: '├Н├е ├н├а├й├д├е├н ├│├к├а├з├а├н├н├╗├й ├м├о├д├
│├л├╝.'"}}},
[{'Elixir.Markdown',
init,0,
[{file,...},
{...}]},
{code_server,
'-handle_on_load/4-f
un-0-',
1,
[{...}|...]}]}

=ERROR REPORT==== 1-Jul-2013::17:37:31 ===
Error in process <0.159.0> with exit value: {{badmatch,{error,{load_failed,"Fail
ed to load NIF library u:/ex_doc/share/markdown: '├Н├е ├н├а├й├д├е├н ├│├к├а├з├а├н
├н├╗├й ├м├о├д├│├л├╝.'"}}},[{'Elixir.Markdown',init,0,[{file,"u:/ex_doc/lib/markd
own.ex"},{line,6}]},{code_server,'-handle_on_load/4-fun-0-'...

F........................
=ERROR REPORT==== 1-Jul-2013::17:37:33 ===
Error in process <0.190.0> with exit value: {{badmatch,{error,{load_failed,"Fail
ed to load NIF library u:/ex_doc/share/markdown: '├Н├е ├н├а├й├д├е├н ├│├к├а├з├а├н
├н├╗├й ├м├о├д├│├л├╝.'"}}},[{'Elixir.Markdown',init,0,[{file,"u:/ex_doc/lib/markd
own.ex"},{line,6}]},{code_server,'-handle_on_load/4-fun-0-'...

=ERROR REPORT==== 1-Jul-2013::17:37:33 ===
The on_load function for module Elixir.Markdown returned {{badmatch,
{error,
{load_failed,
"Failed to load NIF
library u:/ex_doc/share/markdown: '├Н├е ├н├а├й├д├е├н ├│├к├а├з├а├н├н├╗├й ├м├о├д├
│├л├╝.'"}}},
[{'Elixir.Markdown',
init,0,
[{file,...},
{...}]},
{code_server,
'-handle_on_load/4-f
un-0-',
1,
[{...}|...]}]}
F...
=ERROR REPORT==== 1-Jul-2013::17:37:33 ===
Error in process <0.196.0> with exit value: {{badmatch,{error,{load_failed,"Fail
ed to load NIF library u:/ex_doc/share/markdown: '├Н├е ├н├а├й├д├е├н ├│├к├а├з├а├н
├н├╗├й ├м├о├д├│├л├╝.'"}}},[{'Elixir.Markdown',init,0,[{file,"u:/ex_doc/lib/markd
own.ex"},{line,6}]},{code_server,'-handle_on_load/4-fun-0-'...

=ERROR REPORT==== 1-Jul-2013::17:37:33 ===
The on_load function for module Elixir.Markdown returned {{badmatch,
{error,
{load_failed,
"Failed to load NIF
library u:/ex_doc/share/markdown: '├Н├е ├н├а├й├д├е├н ├│├к├а├з├а├н├н├╗├й ├м├о├д├
│├л├╝.'"}}},
[{'Elixir.Markdown',
init,0,
[{file,...},
{...}]},
{code_server,
'-handle_on_load/4-f
un-0-',
1,
[{...}|...]}]}
F
=ERROR REPORT==== 1-Jul-2013::17:37:33 ===
Error in process <0.199.0> with exit value: {{badmatch,{error,{load_failed,"Fail
ed to load NIF library u:/ex_doc/share/markdown: '├Н├е ├н├а├й├д├е├н ├│├к├а├з├а├н
├н├╗├й ├м├о├д├│├л├╝.'"}}},[{'Elixir.Markdown',init,0,[{file,"u:/ex_doc/lib/markd
own.ex"},{line,6}]},{code_server,'-handle_on_load/4-fun-0-'...

=ERROR REPORT==== 1-Jul-2013::17:37:33 ===
The on_load function for module Elixir.Markdown returned {{badmatch,
{error,
{load_failed,
"Failed to load NIF
library u:/ex_doc/share/markdown: '├Н├е ├н├а├й├д├е├н ├│├к├а├з├а├н├н├╗├й ├м├о├д├
│├л├╝.'"}}},
[{'Elixir.Markdown',
init,0,
[{file,...},
{...}]},
{code_server,
'-handle_on_load/4-f
un-0-',
1,
[{...}|...]}]}
F.....

Failures:

  1. test to_html autolink http address (MarkdownTest)
    ** (UndefinedFunctionError) undefined function: Markdown.to_html/1
    stacktrace:
    Markdown.to_html("https://github.com/elixir-lang")
    test/markown_test.exs:18: MarkdownTest."test to_html autolink http addres
    s"/1

  2. test to_html generate the HTML from the markdown (MarkdownTest)
    ** (UndefinedFunctionError) undefined function: Markdown.to_html/1
    stacktrace:
    Markdown.to_html("# Test")
    test/markown_test.exs:7: MarkdownTest."test to_html generate the HTML fro
    m the markdown"/1

  3. test to_html raises an ArgumentError if the value passed is nil (MarkdownTe
    st)
    ** (ExUnit.AssertionError) Expected exception ArgumentError, got UndefinedF
    unctionError (undefined function: Markdown.to_html/1)
    at test/markown_test.exs:11

  4. test generate_docs accepts relative directories (ExDocTest)
    ** (UndefinedFunctionError) undefined function: Markdown.to_html/1
    stacktrace:
    Markdown.to_html("moduledoc\n\n## Example\n CompiledWithDocs.example\n
    ")
    lib/templates/module_template.eex:32: ExDoc.HTMLFormatter.module_template
    /6
    lib/ex_doc.ex:81: ExDoc.generate_module_page/4
    lib/ex_doc.ex:75: ExDoc.generate_list/5
    u:/elixir/lib/elixir/lib/enum.ex:293: Enum."-each/2-lists^foreach/1-0-"/2

   u:/elixir/lib/elixir/lib/enum.ex:293: Enum.each/2
   test/exdoc_test.exs:29: ExDocTest."test generate_docs accepts relative di

rectories"/1

  1. test generate_docs generates all listing files (ExDocTest)
    ** (UndefinedFunctionError) undefined function: Markdown.to_html/1
    stacktrace:
    Markdown.to_html("moduledoc\n\n## Example\n CompiledWithDocs.example\n
    ")
    lib/templates/module_template.eex:32: ExDoc.HTMLFormatter.module_template
    /6
    lib/ex_doc.ex:81: ExDoc.generate_module_page/4
    lib/ex_doc.ex:75: ExDoc.generate_list/5
    u:/elixir/lib/elixir/lib/enum.ex:293: Enum."-each/2-lists^foreach/1-0-"/2
   u:/elixir/lib/elixir/lib/enum.ex:293: Enum.each/2
   test/exdoc_test.exs:45: ExDocTest."test generate_docs generates all listi

ng files"/1

  1. test generate_docs generates in specified output directory (ExDocTest)
    ** (UndefinedFunctionError) undefined function: Markdown.to_html/1
    stacktrace:
    Markdown.to_html("moduledoc\n\n## Example\n CompiledWithDocs.example\n
    ")
    lib/templates/module_template.eex:32: ExDoc.HTMLFormatter.module_template
    /6
    lib/ex_doc.ex:81: ExDoc.generate_module_page/4
    lib/ex_doc.ex:75: ExDoc.generate_list/5
    u:/elixir/lib/elixir/lib/enum.ex:293: Enum."-each/2-lists^foreach/1-0-"/2
   u:/elixir/lib/elixir/lib/enum.ex:293: Enum.each/2
   test/exdoc_test.exs:35: ExDocTest."test generate_docs generates in specif

ied output directory"/1

  1. test generate_docs generates the html file with the documentation (ExDocTes
    t)
    ** (UndefinedFunctionError) undefined function: Markdown.to_html/1
    stacktrace:
    Markdown.to_html("moduledoc\n\n## Example\n CompiledWithDocs.example\n
    ")
    lib/templates/module_template.eex:32: ExDoc.HTMLFormatter.module_template
    /6
    lib/ex_doc.ex:81: ExDoc.generate_module_page/4
    lib/ex_doc.ex:75: ExDoc.generate_list/5
    u:/elixir/lib/elixir/lib/enum.ex:293: Enum."-each/2-lists^foreach/1-0-"/2
   u:/elixir/lib/elixir/lib/enum.ex:293: Enum.each/2
   test/exdoc_test.exs:23: ExDocTest."test generate_docs generates the html

file with the documentation"/1

  1. test generate_docs generates the source link with the specified url (ExDocT
    est)
    ** (UndefinedFunctionError) undefined function: Markdown.to_html/1
    stacktrace:
    Markdown.to_html("moduledoc\n\n## Example\n CompiledWithDocs.example\n
    ")
    lib/templates/module_template.eex:32: ExDoc.HTMLFormatter.module_template
    /6
    lib/ex_doc.ex:81: ExDoc.generate_module_page/4
    lib/ex_doc.ex:75: ExDoc.generate_list/5
    u:/elixir/lib/elixir/lib/enum.ex:293: Enum."-each/2-lists^foreach/1-0-"/2
   u:/elixir/lib/elixir/lib/enum.ex:293: Enum.each/2
   test/exdoc_test.exs:65: ExDocTest."test generate_docs generates the sourc

e link with the specified url"/1

  1. test module_page outputs behavior and callbacks (ExDoc.HTMLFormatterTest)
    ** (UndefinedFunctionError) undefined function: Markdown.to_html/1
    stacktrace:
    Markdown.to_html("This is a sample callback.\n")
    lib/templates/detail_template.eex:5: ExDoc.HTMLFormatter.detail_template/
    1
    lib/templates/module_template.eex:102: ExDoc.HTMLFormatter."-module_templ
    ate/6-lc$^7/1-7-"/1
    lib/templates/module_template.eex:102: ExDoc.HTMLFormatter.module_templat
    e/6
    test/exdoc/html_formatter_test.exs:62: ExDoc.HTMLFormatterTest."test modu
    le_page outputs behavior and callbacks"/1

  2. test module_page outputs summaries (ExDoc.HTMLFormatterTest)
    ** (UndefinedFunctionError) undefined function: Markdown.to_html/1
    stacktrace:
    Markdown.to_html("moduledoc\n\n## Example\n CompiledWithDocs.example\n
    ")
    lib/templates/module_template.eex:32: ExDoc.HTMLFormatter.module_template
    /6
    test/exdoc/html_formatter_test.exs:55: ExDoc.HTMLFormatterTest."test modu
    le_page outputs summaries"/1

  3. test module_page outputs the functions and docstrings (ExDoc.HTMLFormatter
    Test)
    ** (UndefinedFunctionError) undefined function: Markdown.to_html/1
    stacktrace:
    Markdown.to_html("moduledoc\n\n## Example\n CompiledWithDocs.example\n
    ")
    lib/templates/module_template.eex:32: ExDoc.HTMLFormatter.module_template
    /6
    test/exdoc/html_formatter_test.exs:41: ExDoc.HTMLFormatterTest."test modu
    le_page outputs the functions and docstrings"/1

Finished in 13.8 seconds (4.3s on load, 9.5s on tests)
43 tests, 11 failures

tovmasyan@input255 ~/ex_doc
$

Update to Elixir v0.14.0

We need to upgrade to Elixir v0.14.0-dev:

  • v0.14.0 no longer supports module.__info__(:docs). Instead Code.get_docs(module, :all) should be used
  • There are no longer records in v0.14.0-dev. We should remove support for records in ExDoc and instead check if the module defines a __struct__ function. If such function is defined and its documentation is not set to false, we are going to tag it as struct. We will also detect exceptions similarly if the struct has an exception field
  • We are going to get rid of the Modules | Records | Protocols pages in favor of a single listing. We will still keep the tags so they are shown along side the module name in the module page, but we will no longer break the listing

Discuss how we should handle default values

Today, functions can have default values, as in:

def foo(bar // 0)

But Elixir does not leak this information. This means we can't know if a given function was generated from a default clause and we need to fix that first in Elixir and then port the features here.

Does not compile with Elixir v0.13.2

Is there a reason why ex_doc is not versioned? I'm getting build errors. I suppose I'll have to fork and roll back changes to get a version to compile. Any other suggestions?

Thanks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.