New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extract docstrings for interactive help, update find-func to find Rust functions #203

Merged
merged 16 commits into from Jun 17, 2017

Conversation

Projects
None yet
3 participants
@birkenfeld
Collaborator

birkenfeld commented Jun 6, 2017

Includes updated commits from #68.

This lets us:

  • put Rust subr docstrings in etc/DOC
  • automatically generate usage examples for ordinary fns
  • find the Rust functions in the source (thanks to Chris' patches)
  • generate globals.h entries for lisp_fns.
@Wilfred

Works beautifully, and a much desired Remacs feature!

The merge conflicts are trivial, and I've pushed a branch birkenfeld-docstrings_and_find_func with them fixed.

We just need to sort the unit tests and we can land this :)

@birkenfeld

This comment has been minimized.

Collaborator

birkenfeld commented Jun 11, 2017

Thanks! Tomorrow I should be able to restore the original branch with smaller commits where the failure started to occur.

@birkenfeld

This comment has been minimized.

Collaborator

birkenfeld commented Jun 12, 2017

@Wilfred this should contain the failure and has smaller commits: https://github.com/birkenfeld/remacs/tree/pre_rebase

@birkenfeld

This comment has been minimized.

Collaborator

birkenfeld commented Jun 17, 2017

Ok, I "procured" a Mac and looked at this: it seems that the change to disable tramp tests was incomplete. When I enable the tests again the tests run fine 🎊

(Possibly a result of the integer overflow fix that comes after the Tramp/Darwin commit.)

I also committed this change to the branch here, let's see if Travis agrees.

jeandudey and others added some commits May 22, 2017

Move the following Lisp functions to Rust:
* eql
* equal
* equal-including-properties
* delq
* car-safe
* cdr-safe
* memq
* memql
* member
* nthcdr
* nth
* assq
* assoc
* rassq
* rassoc
* plist-get
* plist-put
* lax-plist-put
* lax-plist-get
* plist-member
* string-equal
* markerp

Other changes:

* Create comparison methods for LispObject for each of the three
  ELisp ways (eq, eql, equal).
* Use the provided way to construct bools and t.
* Create a Rusty API for working with cons cells (as_cons() returns
  a newtype that has car() and cdr() methods).
* Introduce a list tails iterator to replace the FOR_EACH_TAIL and
  FOR_EACH_TAIL_SAFE macro.
* Add missing Cargo.lock for remacs-sys.
* Migrate XXXP() functions to LispObject::is_xxx() and remove unused ones.
* Avoid allocating a vector for each call to a MANY function.
* Fixup makefile targets to avoid "override" warnings.
Change `lisp_fn` proc macro slightly to allow less repeating.
* Lisp name is inferred from Rust name with underscore -> dash
* C name can be customized in the cases where Rust needs a special name
* Number of args is inferred from Rust. "min" only needs to be given
  if there are optional args.
* Less cloning.
Clean up the rest of the "deprecated" lisp.rs fns.
* Use convention LispObject::as_xxx() to get an Optional extracted value.
* Use as_xxx_or_error() to signal a wrong-type-argument if not of that type.
* Move unused CHECK_ macros back to C.
* Move all extern declarations to remacs-sys.
Fixup integer overflow behavior.
make_number() silently discards the unused bits from EmacsInt
when making a fixnum.
Add Rust-specific functionality to make-docfile.
This lets us:

* put Rust subr docstrings in etc/DOC
* automatically generate usage examples for ordinary fns
* find the Rust functions in the source (thanks to Chris' patches)
* generate globals.h entries for lisp_fns.

@birkenfeld birkenfeld force-pushed the birkenfeld:docstrings_and_find_func branch from 2eca265 to 234739c Jun 17, 2017

@birkenfeld birkenfeld force-pushed the birkenfeld:docstrings_and_find_func branch from 7458cbb to 0aa7ef8 Jun 17, 2017

@birkenfeld

This comment has been minimized.

Collaborator

birkenfeld commented Jun 17, 2017

The Mac build is green now, but the Linux one had a timeout compiling syntex.

@Wilfred

This comment has been minimized.

Owner

Wilfred commented Jun 17, 2017

@birkenfeld Sorry about that. I've been working on pinning rustfmt, so we stop inconveniencing our amazing contributors by new rustfmt versions coming out mid PR.

As part of this, I cleared the Travis cache a few minutes ago. I've restarted the linux job, so that should fix it.

@birkenfeld

This comment has been minimized.

Collaborator

birkenfeld commented Jun 17, 2017

Ah nice. It just seems 0.9.1 is not released yet :)

@Wilfred

This comment has been minimized.

Owner

Wilfred commented Jun 17, 2017

Ah nice. It just seems 0.9.1 is not released yet :)

Yep, I wanted to confirm it was honouring my --vers :)

@birkenfeld

This comment has been minimized.

Collaborator

birkenfeld commented Jun 17, 2017

Doesn't seem to get any further yet...

@Wilfred

This comment has been minimized.

Owner

Wilfred commented Jun 17, 2017

Based on https://docs.travis-ci.com/user/common-build-problems/#Build-times-out-because-no-output-was-received

perhaps we should try travis_wait 30 cargo install ...? I suspect that as soon as it's succeeded on one branch, the others will work.

@Wilfred

This comment has been minimized.

Owner

Wilfred commented Jun 17, 2017

Looks like #207 (which apparently hasn't shared the cache with this PR) just managed to squeeze within the 10 minute window:

   Compiling syntex_errors v0.59.1
   Compiling syntex_syntax v0.59.1
    Finished release [optimized] target(s) in 751.39 secs

@Wilfred Wilfred referenced this pull request Jun 17, 2017

Closed

Find rust functions #68

@birkenfeld

This comment has been minimized.

Collaborator

birkenfeld commented Jun 17, 2017

Yay!

@Wilfred Wilfred merged commit 64f65ea into Wilfred:master Jun 17, 2017

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
@Wilfred

This comment has been minimized.

Owner

Wilfred commented Jun 17, 2017

Fantastic! Thank you very much :)

@birkenfeld birkenfeld deleted the birkenfeld:docstrings_and_find_func branch Jun 18, 2017

This was referenced Jun 18, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment