Repository navigation
Conversation
And we can also print docs of multiple functions in one call.
Also took the chance to do a small cleanup of handling of attributes.
This make it more consistent over the forms. Also the handling of doc strings has been changed in that we now can have multiple module doc strings, there is one in the define-module and and one in each extend-module. We ignore empty doc strings when outputting.
Move `example.lfe` to `dev/` and fix `bin/lfedoc` Also fix some mistakes in example.lfe and use a define-function once for good measure.
Also add describe as an alternate call to print module docs.
Deprecate no doc string and allow doc attributes which are also deprecated.
The new forms are
(define-module name meta-data attrs)
(extend-module meta-data attrs)
(define-function name meta-data def)
(define-macro name meta-data def)
where meta-data ((k v ...) ...).
In lfe_doc, export collect_docs/2, instead of string_to_binary/1,
and use that in prop_lfe_doc.
Add meta_with_doc/0 to generate a minimal meta list:
((doc "docstring"))
Generate recently updated docs.
Define a simple record, foo, in the example module, which currently causes compilation to fail. Add test/example_SUITE.lfe, which checks whether dev/example.lfe compiles correctly. For now, this fails, but it will pass once the record bug is squashed.
Cleaned up test_server.lfe a bit. Should fixup eif.
Also took the chance to make naming more strict for define-function and define-macro forms. Only variable name changes were done.
CT assumes that the compiled test suites are in the test directory. This affects where CT will look for data directories for the suites.
The patterns are ignored and the documentation is supposed to contain a line with the arguments. We also strip leading spaces from each line and can handle leading blank lines.
The formatting of the doc strings is now done in lfe_doc. the format stores in the LDoc chunk is now a list of doc lines. Also add more documentation to cl.lfe.
src/lfe_doc.erl:
- Remove extra "that" from the warning re: breaking changes
- Remove duplicate exports (commented out already)
- Simplify format_error/1 since we don't use {bad_lambda,Name,Line}
- Fix docs for get_{function,macro}_patterns/1
- Inline short function clauses
- Tweak whitespace that's gotten bumped over time
doc/src/lfe_doc.3.md:
- Remove extra "that" from the warning re: breaking changes
- Tweak syntax highlighting in save_module_docs/3 description
- Add description of format_docs/1
- Replace FunDoc with FuncDoc to stay consistent
- Remove redundant ERROR INFORMATION and point to lfe_comp(3) instead
- Add note re: simplified format_error/1
- Make subheadings for function and moduel doc accessor functions
- Rearrange subheadings sensible
This fixes lfe#243. It will always 2 elements because if there is no guard it will just be []. This is logical as (when) is a legal guard which never fails.
This fixes lfe#246. Made some cosmetic changes as well.
This means we are always uptodate irrespective of which Erlang version we are using. The old one was a modification of a qlc_pt.erl file and hence version specific.
This creates a fun calling the function name/arity. It currently compiles to a lambda but this will be improved later. The syntac expands to a lambda for backwards compatibility.
Unless prefixed with `./bin/lfe`, `./bin/lfec` will use the version of
`lfe` installed on the system, which in my case is often incorrect.
Add a `compile` `post_hook` to compile `src/*.lfe` and output the beams
to the correct directory (as per `$REBAR_DEPS_DIR`). Remove the
redundant `make` in the `ct` `pre_hooks` and use `$REBAR_DEPS_DIR`
instead of the hard-coded `_build/test/lib`.
Remove `./bin` from `$PATH` in `.travis.yml` to avoid similar confusion
in the future.
Use `$REBAR_DEPS_DIR` in `bin/lfe` when set, otherwise fall back to
`./_build/default/{deps,lib}` as before.
Close lfe#251
Thanks to @sleepyfox for pointing it out. Fixes lfe#257
Indicate that the state in the collecting pass is macro state and not compiler state and cleanup handling of file name and options.
The erlang compiler has changed how it does so we must change it as well. Fortunately it seems to be backwards compatible.
Also took the chance to add 20.0 to travis.
Also took the chance to move definition of is_posint_list to lfe_lib and modify calls to it. This fixes lfe#354.
|
I'd like to see this merged; I'm okay with no test, given that it's a I have confirmed that the failing tests were a result of an old state, and that 1) the latest LFE runs pass without issue, and 2) a rebase upon latest for this branch passes without issue (see https://travis-ci.org/oubiwann/lfe/builds/529357849). Instead of a "Merge pull request", if we do a "Rebase and merge", everything will be fine. Thoughts? |
|
I'm fine with that. It's exciting to see all this activity on LFE 😄 Thanks for all your work! |
Oops! Prior to this change, code like this wouldn't work:
(include-lib "lfe/include/clj.lfe")
9ff9786 to
5341eee
Compare
|
I've rebased and force pushed. Hope that helps. |
|
Closing this in favour of a new branch that cherry-picks the commit from this one (see #409). |
Before
After
TODO
(include-lib "lfe/include/...")