Skip to content

Instantly share code, notes, and snippets.

@erszcz
Created March 31, 2021 09:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save erszcz/aed82f720c768646a532f1a0f16506df to your computer and use it in GitHub Desktop.
Save erszcz/aed82f720c768646a532f1a0f16506df to your computer and use it in GitHub Desktop.
Reproduce shell_docs glitch on gradualizer
Last login: Tue Mar 30 17:45:28 on ttys027
11:13:23 erszcz @ x6 : ~
$ cd work/josefs/gradualizer/
11:13:49 erszcz @ x6 : ~/work/josefs/gradualizer (record-field-zip-fix)
$ asdf local erlang 24.0-rc1
11:14:13 erszcz @ x6 : ~/work/josefs/gradualizer (record-field-zip-fix %)
$ cat > rebar.config
{edoc_opts, [{doclet, edoc_doclet_chunks},
> {layout, edoc_layout_chunks},
> {preprocess, true},
> {dir, "_build/docs/lib/gradualizer/doc"}]}.
11:15:20 erszcz @ x6 : ~/work/josefs/gradualizer (record-field-zip-fix %)
$ r3 compile
...
11:15:25 erszcz @ x6 : ~/work/josefs/gradualizer (record-field-zip-fix %)
$ r3 edoc
===> Verifying dependencies...
===> Analyzing applications...
===> Compiling gradualizer
src/gradualizer.erl:45:2: Warning: opaque type top() is underspecified and therefore meaningless
src/typechecker.erl:8:2: Warning: export_all flag enabled - all functions will be exported
===> Running edoc for gradualizer
edoc: error in layout 'edoc_layout_chunks': {'EXIT',
{{case_clause,
[{type,11,constraint,
[{atom,11,is_subtype},
[{var,11,'ExprOrPat'},
{type,11,tuple,[{...}|...]}]]},
{type,12,constraint,
[{atom,12,is_subtype},
[{var,12,'ExprOrPat'},
{remote_type,12,[{...}|...]}]]}]},
[{edoc_layout_chunks,get_constraint,
2,
[{file,"edoc_layout_chunks.erl"},
{line,424}]},
{edoc_layout_chunks,bounded_fun_arg,
1,
[{file,"edoc_layout_chunks.erl"},
{line,379}]},
{lists,foldl,3,
[{file,"lists.erl"},{line,1267}]},
{edoc_layout_chunks,
annotate_bounded_fun_clause,3,
[{file,"edoc_layout_chunks.erl"},
{line,348}]},
{edoc_layout_chunks,annotate_clause,
2,
[{file,"edoc_layout_chunks.erl"},
{line,336}]},
{edoc_layout_chunks,
'-annotate_spec_/2-lc$^0/1-0-',1,
[{file,"edoc_layout_chunks.erl"},
{line,325}]},
{edoc_layout_chunks,annotate_spec_,
2,
[{file,"edoc_layout_chunks.erl"},
{line,325}]},
{edoc_layout_chunks,annotate_spec,4,
[{file,[...]},{line,...}]}]}}.
edoc: error in doclet 'edoc_doclet_chunks': {'EXIT',error}.
===> Failed to generate documentation for app 'gradualizer'
11:15:42 erszcz @ x6 : ~/work/josefs/gradualizer (record-field-zip-fix %)
# src/gradualizer_bin.erl has a spec syntax element which is not supported yet.
# Comment out the spec for gradualizer_bin:compute_type/1 and proceed.
$ vim src/gradualizer_bin.erl
11:16:02 erszcz @ x6 : ~/work/josefs/gradualizer (record-field-zip-fix *%)
$ r3 edoc
===> Verifying dependencies...
===> Analyzing applications...
===> Compiling gradualizer
===> Running edoc for gradualizer
11:16:04 erszcz @ x6 : ~/work/josefs/gradualizer (record-field-zip-fix *%)
$ r3 as docs shell
===> No entry for profile docs in config.
===> Verifying dependencies...
===> Analyzing applications...
===> Compiling gradualizer
Erlang/OTP 24 [RELEASE CANDIDATE 1] [erts-12.0] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1] [jit]
Eshell V12.0 (abort with ^G)
1> h(typechecker, return, 1).
\240\240return(X)
There is no documentation for return/1
ok
2>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment