Skip to content

Make sure we install LFE includes too - #341

Closed
yurrriq wants to merge 774 commits into
lfe:developfrom
yurrriq:feature/install-include
Closed

yurrriq wants to merge 774 commits into
lfe:developfrom
yurrriq:feature/install-include

Conversation

@yurrriq

@yurrriq yurrriq commented Jun 6, 2017 •

Copy link
Copy Markdown
Contributor

Before

lfe> (progn (include-lib "lfe/include/clj.lfe") (-> 2 (+ 2)))
1: error expanding (include-lib "lfe/include/clj.lfe"): #(none file enoent)
error

After

lfe> (progn (include-lib "lfe/include/clj.lfe") (-> 2 (+ 2)))
4

TODO

  • Add a test that calls (include-lib "lfe/include/...")

rvirding and others added 30 commits May 6, 2016 01:26
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.
@oubiwann oubiwann added the bug label May 7, 2019
@oubiwann oubiwann added this to the 1.3.1 milestone May 7, 2019
@oubiwann

oubiwann commented May 7, 2019

Copy link
Copy Markdown
Member

I'd like to see this merged; I'm okay with no test, given that it's a Makefile change very little chance of an impact (except the indented one).

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?

@yurrriq

yurrriq commented May 10, 2019

Copy link
Copy Markdown
Contributor Author

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")
@yurrriq
yurrriq force-pushed the feature/install-include branch from 9ff9786 to 5341eee Compare May 10, 2019 03:59
@yurrriq

yurrriq commented May 10, 2019

Copy link
Copy Markdown
Contributor Author

I've rebased and force pushed. Hope that helps.

@oubiwann oubiwann added enhancement and removed bug labels May 10, 2019
@oubiwann oubiwann changed the title Make sure we install include/ too Make sure we install LFE includes too May 12, 2019
@oubiwann oubiwann mentioned this pull request Oct 14, 2020
@oubiwann

Copy link
Copy Markdown
Member

Closing this in favour of a new branch that cherry-picks the commit from this one (see #409).

@oubiwann oubiwann closed this Oct 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants