Closed stig closed 9 years ago
Here's the output of M-x magit-version:
Magit 20150701.1326, Git 2.3.2 (Apple Git-55), Emacs 24.5.1
Hm, someone added those tests in one of the pull requests, and I didn't pay much attention. My emacs version is 24.4.1
, and I have ert
installed out of the box. I don't know yet why you are missing yours.
No, I don't understand that either. I thought it came with Emacs by default?
That's what I thought as well. ert.el.gz
is in my /usr/share/emacs
.
Do you have any other ert-
functions?
Typing M-x ert-
shows these:
If you do F1-f ert-describe-test
, and then follow the file where it is defined, you should get into ert.el.gz
(supposedly). What other functions you see there?
It looks like I get into ert.el.gz just fine. There's a mass of functions there! (The file is 2480 lines long.) If you want I could put it on pastebin?
Some packages used to bundle obsolete versions of ert.el
for obsolete versions of Emacs. At least they tracked it in the development repository. I think that's already a mistake in itself, but what would be worse is if there were an Elpa package that bundled the obsolete version of the library. Grep in ~/.emacs.d/elpa
to find out. This is just a shot in the dark, but it's worth a try. Also try what M-x find-library RET ert RET
actually opens (i.e. is the full path of the opened file what you would have expected).
Thanks for following up. It looks like nothing bundles ert:
λ ~/.emacs.d/elpa/ master* ag '\bert\b' -l
archives/melpa/archive-contents~
archives/melpa/archive-contents
ert-junit-readme.txt
ert-expectations-readme.txt
ert-modeline-readme.txt
magit-gh-pulls-20150628.1707/magit-gh-pulls.el
I also checked that the correct library loads with M-x find-library RET ert RET and it does. I am stumped.
On 2 Jul 2015, at 14:18, Jonas Bernoulli notifications@github.com wrote:
Some packages used to bundle obsolete versions of ert.el for obsolete versions of Emacs. At least they tracked it in the development repository. I think that's already a mistake in itself, but what would be worse is if there were an Elpa package that bundled the obsolete version of the library. Grep in ~/.emacs.d/elpa to find out. This is just a shot in the dark, but it's worth a try. Also try what M-x find-library RET ert RET actually opens (i.e. is the full path of the opened file what you would have expected).
— Reply to this email directly or view it on GitHub https://github.com/sigma/magit-gh-pulls/issues/32#issuecomment-118029741.
@stig Yes, I have the same 2498-lines long ert.el.gz
. So I don't really know how to help you here, maybe Jonas knows more.
Ahm, yes. You use functions from ert
without actually requiring ert
. The quick fix would be to just require it, but I think it would be better to move the tests into a separate file and making sure it doesn't get included in the Melpa package. (I think if the library name contains "test", then that is the case, but you need to look that up).
I can load the library some of the time. Hrm.
I can load the library some of the time. Hrm.
Ah, I forgot about that. Don't know what the problem is here. Still, moving the tests to a separate file seems like a good idea.
I will. No really familiar with Emacs testing, so I just merged that pull request without thinking too much.
As a workaround, I put (require 'ert)
to magit-gh-pulls.el
, removed *.elc
files in the directory, and restarted Emacs - it helped.
On 3 Jul 2015, at 23:05, Michael Pankov notifications@github.com wrote: As a workaround, I put (require 'ert) to magit-gh-pulls.el, removed *.elc files in the directory, and restarted Emacs - it helped.
I can confirm that this worked for me also.
Stig
I moved the tests into a separate file which shouldn't be loaded implicitly. Is this the correct way to do it, @tarsius?
I am not really in the position to say what the correct way is, I don't test enough oO
But it's what I would do, and I believe it helps with the issue raised here. So.... yes! :-)
Thanks! I think I will close the issue then as ERT issues, however rare, should not influence magit-gh-pulls now.
Attempting to require magit-gh-pulls I get this message:
is there a missing dependency?
turn-on-magit-gh-pulls
is not a command I can run afterwards. (magit-gh-pulls-mode is there, but even without it the keybinding does not work.)I am using
GNU Emacs 24.5.1 (x86_64-apple-darwin13.4.0, NS apple-appkit-1265.21) of 2015-04-10 on builder10-9.porkrind.org
with magit-gh-pulls installed from melpa. Happy to provide more information.