Skip to content

Latest commit

 

History

History
56 lines (34 loc) · 2.26 KB

CONTRIBUTING.org

File metadata and controls

56 lines (34 loc) · 2.26 KB

Contributing to Perspective

Thank you for considering making a code contribution to Perspective!

Please follow the following procedures before opening a pull request.

Run automated tests

Perspective has a growing handful of tests. Please run them manually before GitHub Actions does.

From your perspective-el repository, run the following:

EMACS=/path/to/emacs make test

Test in the MELPA sandbox

Emacs makes extending it so frictionless that unexpected dependencies can creep in. A package intended for use by other people must be run in a minimal environment to verify that all its dependencies are explicit.

In addition, the Emacs byte-compiler introduces some unexpected behaviors, particularly with eager macroexpansion. They are well-flagged by warnings.

MELPA makes these things (relatively) easy to test. Refer to the Test your recipe section of MELPA’s CONTRIBUTING.org documentation for details, but here is a terse summary of the process:

  • Clone the melpa repository, and then change melpa/recipes/perspective to point to your local Perspective repo:
(perspective :fetcher git :url "/home/you/code/perspective-el")
  • From the melpa repo, run:
EMACS_COMMAND=/path/to/emacs make recipes/perspective
  • Install Ivy and Counsel in the melpa sandbox:
EMACS_COMMAND=/path/to/emacs make sandbox INSTALL=ivy
# exit emacs after this step
EMACS_COMMAND=/path/to/emacs make sandbox INSTALL=counsel
# exit emacs after this step
  • Install Perspective:
EMACS_COMMAND=/path/to/emacs make sandbox INSTALL=perspective

Important: This step should produce no byte-compiler errors or warnings.

Also important: After making changes to your perspective-el repository, commit them locally, or the melpa recipe builder will not pick them up! Rerun make recipes/perspective, delete the perspective directory in melpa/sandbox, and rerun make sandbox INSTALL=perspective to look at the byte-compiler output.