2

There is a nefarious bug in a project stored locally in ~/my/project/path. This project is on MELPA, but installing from MELPA fails for some reason for some users. It's unknown why it fails, but I believe I've found a fix which I've committed to a separate branch to create a pull request for discussion.

To make sure that it's a fix (I'm the only contributor able to reproduce the bug at the moment), I want to simulate installing the package from the usual means – via M-x package-install sx – with all the necessary byte-compilation that goes along with it.

  • 1
    You can try the instructions in 'Testing' section of MELPA's readme on github – Iqbal Ansari Dec 20 '14 at 17:13
5

Make sure that your branch is pushed to upstream. Then clone the MELPA repository and visit the recipe of your package—recipes/sx presumably. Make sure to allow all local variables Emacs asks you for, since that is necessary to load the specific features to edit MELPA recipes.

Now add a :branch BRANCH to the recipe, with BRANCH being the name of the branch that contains your fix. Ultimately press C-c C-c to build the package.

This builds the package exactly like MELPA would build it. Afterwards you are asked to install the package. If you answer yes, the package is installed exactly as if you would download it from MELPA, minus the HTTP transfer (it's installed from the local package file).

This procedure should allow you to uncover installation bugs in your package.

  • Thanks :) It appears though that (sx :repo "vermiculus/sx.el" :fetcher github :commit "7d2cccd82cf6c658e330767d0e20e48e42ff1ac6") isn't working, but I suppose this is a question for the bug tracker unless I'm doing something dumb :) – Sean Allred Dec 20 '14 at 17:42
  • "it's installed from the local package file" how do I tell it where the local repository is? – Sean Allred Dec 20 '14 at 17:44
  • 1
    There is no local repository. The package is installed directly from the resulting package file. – lunaryorn Dec 20 '14 at 17:45
  • 1
    @SeanAllred When you build the package, it is fetched from the remote repository given by the recipe (at this point there is an HTTP transfer) and a package file is created locally. Then when the package is installed, this local file is used. – Malabarba Dec 20 '14 at 17:46
  • 1
    @SeanAllred why are you specifying a commit, instead of a branch? – Malabarba Dec 20 '14 at 17:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.