Gnus development mailing list
 help / color / mirror / Atom feed
From: Ted Zlatanov <tzz@lifelogs.com>
To: ding@gnus.org
Cc: emacs-devel@gnu.org
Subject: Re: no gnus registry new dependency on ert?
Date: Wed, 06 Apr 2011 08:10:19 -0500	[thread overview]
Message-ID: <87vcyrr0ec.fsf@lifelogs.com> (raw)
In-Reply-To: <87aag38xah.fsf@lifelogs.com>

[-- Attachment #1: Type: text/plain, Size: 955 bytes --]

On Wed, 06 Apr 2011 05:54:46 -0500 Ted Zlatanov <tzz@lifelogs.com> wrote: 

TZ> On Wed, 06 Apr 2011 12:10:26 +0200 David Engster <deng@randomsample.de> wrote: 
DE> Either that, or just do

DE> (eval-when-compile
DE> (when (null (require 'ert nil t))
DE> (defmacro* ert-deftest (name () &body docstring-keys-and-body))))

DE> to silence the byte-compiler. Your solution is less hacky, but then you
DE> have to always remember to wrap ert-deftest in those featurep clauses.

TZ> Oh, I like your solution better since I don't have to reindent ;)

TZ> I made the change in *registry.el, thanks.

Interesting.  When I byte-compile in Gnus (just "make" in the Lisp
directory), I get the attached backtrace.  Sorry for the nasty backtrace
but I can't load the code AND exhibit the problem.

If I load gnus-registry.el and do `M-x eval-buffer' then it works
properly.  So something is off with the byte-compilation, at least the
compilation that Gnus does.

Ted


[-- Attachment #2: ert-backtrace.txt --]
[-- Type: text/plain, Size: 9934 bytes --]

Debugger entered--Lisp error: (void-function make-ert-test)
  make-ert-test(:name registry-instantiation-test :body #[nil "\304\305C\x18\x19\306\x1a\307^[\310\216\311	\b\"\211\x12)\204\x19\0\312\v!\210)\n+\207" [args-65 fn-64 value-66 form-description-68 registry-db "Testing" ert-form-evaluation-aborted-67 nil ((byte-code "\305C\306\b	BD\244\n\307=?\205\x12\0\310\nD\244\311\312N\211^[\205!\0\313\314\v	\"D)\244\x14\315\f!\207" [fn-64 args-65 value-66 -explainer- form-description-68 (should (registry-db "Testing")) :form ert-form-evaluation-aborted-67 :value registry-db ert-explainer :explanation apply ert--signal-should-execution] 6)) apply ert-fail] 3])
  byte-code("\301\302\303\304#\210\301\305\306\307#\210\301\310\311\312#\210\301\313\314\315#\210\301\316\317\320#\210\321\322\323\324\322\325\326$\"\210\327\bB\x10\321\330\323\324\330\325\331$\"\210\332\bB\x10\301\207" [current-load-list eieio-defmethod registry-search (((db registry-db) &rest spec)) #[(db &rest spec) "\b\205 \0\306	\307\"\306	\310\"\306	\311\"\x1a^[\x1c\312\x1d\313\314\315\b\316\"\"\210\r\237,\207" [db spec regex member all --cl-var-- plist-get :all :member :regex nil maphash #[(k v) "\b\204\x1c\0	\203\x10\0\306\307\n	#\204\x1c\0\v\205!\0\306\310\n\v#\205!\0\f\rB\211\x15\207" [all member v regex k --cl-var-- registry--match :member :regex] 4] eieio-oref :data] 5 "Search for SPEC across the registry-db THIS.\nFor example calling with :member '(a 1 2) will match entry '((a 3 1)).\nCalling with :all t (any non-nil value) will match all.\nCalling with :regex '(a \"h.llo\") will match entry '((a \"hullo\" \"bye\").\nThe test order is to check :all first, then :member, then :regex."] registry-delete (((db registry-db) keys assert &rest spec)) #[(db keys assert &rest spec) "\306\b\307\"\x19\n\206\x0e\0\310\311\b\v#\x1a\306\b\312\"\x1c\n\313\x1d\211\x1e\x14\203\246\0\x0e\x14@\x15\314\r	\"\x1e\x15\x0e\x16\2036\0\x0e\x15\2046\0\315\316\r\"\210\f\313\x1e\x17\211\x1e\x18\203\226\0\x0e\x18@\x16\x17\317\b\x0e\x17\"\203\215\0\x0e\x17\x0e\x15\236\243\313\x1e\x19\211\x1e\x1a\203\214\0\x0e\x1a@\x16\x19\320\b\x0e\x17\x0e\x19#\x1e^[\r\x0e^[\235\203\202\0\320\b\x0e\x17\x0e\x19\321\r\x0e^[\"\206\200\0\322$\210)\x0e\x1aA\211\x16\x1a\204\\\0*\x0e\x18A\211\x16\x18\204@\0*\323\r	\"\210)\x0e\x14A\211\x16\x14\204\x1d\0*\n+\207" [db data keys spec tracked key eieio-oref :data apply registry-search :tracked nil gethash error "Key %s does not exists in database" registry-lookup-secondary registry-lookup-secondary-value delete t remhash --cl-dolist-temp-- entry assert tr --cl-dolist-temp-- val --cl-dolist-temp-- value-keys] 8 "Delete KEYS from the registry-db THIS.\nIf KEYS is nil, use SPEC to do a search.\nUpdates the secondary ('tracked') indices as well.\nWith assert non-nil, errors out if the key does not exist already."] registry-insert (((db registry-db) key entry)) #[(db key entry) "\306\b\307	\310\"\"\203\x0e\0\311\312!\210\313	!\307	\314\"W\204\x1d\0\311\315!\210\316\b\n\307	\310\"#\210\307	\317\"\320^[\211\x1c\203w\0\f@\211\x13\n\236\243\320\x1d\211\x1e\x12\203o\0\x0e\x12@\x15\321	\v\r#\x1e\x13\b\x0e\x13\235\203W\0\x0e\x13\202[\0\b\x0e\x13B\x16\x13\321	\v\r\x0e\x13$\210)\x0e\x12A\211\x16\x12\204@\0*\fA\211\x14\2041\0*\n\207" [key db entry tr --cl-dolist-temp-- val gethash eieio-oref :data error "Key already exists in database" registry-size :max-hard "max-hard size limit reached" puthash :tracked nil registry-lookup-secondary-value --cl-dolist-temp-- value-keys] 7 "Insert ENTRY under KEY into the registry-db THIS.\nUpdates the secondary ('tracked') indices as well.\nErrors out if the key exists already."] registry-size (((db registry-db))) #[(db) "\301\302\b\303\"!\207" [db hash-table-count eieio-oref :data] 4 "Returns the size of the registry-db object THIS.\nThis is the key count of the :data slot."] registry-prune (((db registry-db))) #[(db) "\306\b\307\"\x19\310\x1a\306\b\311\"^[\306\b\312\"\x1c\313\b!\x1d\314\x1e\x10\315\316\v\"\210\x0e\x10\237)\211\x1e\x11G\x1e\x12\r\fV\x1e\x13\x0e\x12\r\fZV\203G\0\x0e\x11\203G\0\x0e\x12S\x16\x12\x0e\x11A\x16\x11\202,\0\317\b\x0e\x11\314#.\b\207" [db precious precious-p data limit size eieio-oref :precious #[(entry-key) "\b@	>A\207" [entry-key precious] 2] :data :max-soft registry-size nil maphash #[(k v) "\b	\306\x1a^[\x1c\307\310\f\v\n$+?\205\x18\0\r\x0e	B\211\x16	\207" [precious-p v cl-rest cl-seq cl-pred k nil apply some --cl-var--] 5] registry-delete --cl-var-- candidates candidates-count prune-needed] 5 "Prunes the registry-db object THIS.\nRemoves only entries without the :precious keys."] ert-set-test registry-instantiation-test make-ert-test :name :body #[nil "\304\305C\x18\x19\306\x1a\307^[\310\216\311	\b\"\211\x12)\204\x19\0\312\v!\210)\n+\207" [args-65 fn-64 value-66 form-description-68 registry-db "Testing" ert-form-evaluation-aborted-67 nil ((byte-code "\305C\306\b	BD\244\n\307=?\205\x12\0\310\nD\244\311\312N\211^[\205!\0\313\314\v	\"D)\244\x14\315\f!\207" [fn-64 args-65 value-66 -explainer- form-description-68 (should (registry-db "Testing")) :form ert-form-evaluation-aborted-67 :value registry-db ert-explainer :explanation apply ert--signal-should-execution] 6)) apply ert-fail] 3] (ert-deftest . registry-instantiation-test) registry-match-test #[nil "\306\x18\307\310!\210\311\312\b\313E\x19\x1a\314^[\315\x1c\316\216\317\n	\"\211\x13)\204!\0\320\f!\210)\v\210+\311\312\b\321E\x1d\x1e,\322\x1e-\315\x1e.\323\216\317\x0e,\r\"\211\x16-)\204F\0\320\x0e.!\210)\x0e-\210+\311\312\b\324E\x1e/\x1e0\325\x1e1\315\x1e2\326\216\317\x0e0\x0e/\"\211\x161)\203n\0\320\x0e2!\210)\x0e1\210+\311\312\b\327E\x1e3\x1e4\330\x1e5\315\x1e6\331\216\317\x0e4\x0e3\"\211\x165)\203\226\0\320\x0e6!\210)\x0e5\210+\307\332!\210\311\333\b\334E\x1e7\x1e8\335\x1e9\315\x1e:\336\216\317\x0e8\x0e7\"\211\x169)\204\302\0\320\x0e:!\210)\x0e9\210+\311\333\b\337E\x1e;\x1e<\340\x1e=\315\x1e>\341\216\317\x0e<\x0e;\"\211\x16=)\204\352\0\320\x0e>!\210)\x0e=\210+\311\333\b\342E\x1e?\x1e@\343\x1eA\315\x1eB\344\216\317\x0e@\x0e?\"\211\x16A)\203\x12\x01\320\x0eB!\210)\x0eA\210+\311\333\b\345E\x1eC\x1eD\346\x1eE\315\x1eF\347\216\317\x0eD\x0eC\"\211\x16E)\203:\x01\320\x0eF!\210)\x0eE\210+\311\333\b\350E\x1eG\x1eH\351\x1eI\315\x1eJ\352\216\317\x0eH\x0eG\"\211\x16I)\203b\x01\320\x0eJ!\210)\x0eI\210,\307\353!\207" [entry args-70 fn-69 value-71 form-description-73 args-75 ((hello "goodbye" "bye") (blank)) message "Testing :regex matching" registry--match :regex ((hello "nye" "bye")) ert-form-evaluation-aborted-72 nil ((byte-code "\305C\306\b	BD\244\n\307=?\205\x12\0\310\nD\244\311\312N\211^[\205!\0\313\314\v	\"D)\244\x14\315\f!\207" [fn-69 args-70 value-71 -explainer- form-description-73 (should (registry--match :regex entry ...)) :form ert-form-evaluation-aborted-72 :value registry--match ert-explainer :explanation apply ert--signal-should-execution] 6)) apply ert-fail ((hello "good")) ert-form-evaluation-aborted-77 ((byte-code "\305C\306\b	BD\244\n\307=?\205\x12\0\310\nD\244\311\312N\211^[\205!\0\313\314\v	\"D)\244\x14\315\f!\207" [fn-74 args-75 value-76 -explainer- form-description-78 (should (registry--match :regex entry ...)) :form ert-form-evaluation-aborted-77 :value registry--match ert-explainer :explanation apply ert--signal-should-execution] 6)) ((hello "nye")) ert-form-evaluation-aborted-82 ((byte-code "\305C\306\b	BD\244\n\307=?\205\x12\0\310\nD\244\311\312N\211^[\205!\0\313\314\v	\"D)\244\x14\315\f!\207" [fn-79 args-80 value-81 -explainer- form-description-83 (should-not (registry--match :regex entry ...)) :form ert-form-evaluation-aborted-82 :value registry--match ert-explainer :explanation apply ert--signal-should-execution] 6)) ((hello)) ert-form-evaluation-aborted-87 ((byte-code "\305C\306\b	BD\244\n\307=?\205\x12\0\310\nD\244\311\312N\211^[\205!\0\313\314\v	\"D)\244\x14\315\f!\207" [fn-84 args-85 value-86 -explainer- form-description-88 (should-not (registry--match :regex entry ...)) :form ert-form-evaluation-aborted-87 :value registry--match ert-explainer :explanation apply ert--signal-should-execution] 6)) "Testing :member matching" :member ((hello "bye")) ert-form-evaluation-aborted-92 ((byte-code "\305C\306\b	BD\244\n\307=?\205\x12\0\310\nD\244\311\312N\211^[\205!\0\313\314\v	\"D)\244\x14\315\f!\207" [fn-89 args-90 value-91 -explainer- form-description-93 (should (registry--match :member entry ...)) :form ert-form-evaluation-aborted-92 :value registry--match ert-explainer :explanation apply ert--signal-should-execution] 6)) ((hello "goodbye")) ert-form-evaluation-aborted-97 ((byte-code "\305C\306\b	BD\244\n\307=?\205\x12\0\310\nD\244\311\312N\211^[\205!\0\313\314\v	\"D)\244\x14\315\f!\207" [fn-94 args-95 value-96 -explainer- form-description-98 (should (registry--match :member entry ...)) :form ert-form-evaluation-aborted-97 :value registry--match ert-explainer :explanation apply ert--signal-should-execution] 6)) ((hello "good")) ert-form-evaluation-aborted-102 ((byte-code "\305C\306\b	BD\244\n\307=?\205\x12\0\310\nD\244\311\312N\211^[\205!\0\313\314\v	\"D)\244\x14\315\f!\207" [fn-99 args-100 value-101 -explainer- form-description-103 (should-not (registry--match :member entry ...)) :form ert-form-evaluation-aborted-102 :value registry--match ert-explainer :explanation apply ert--signal-should-execution] 6)) ((hello "nye")) ert-form-evaluation-aborted-107 ((byte-code "\305C\306\b	BD\244\n\307=?\205\x12\0\310\nD\244\311\312N\211^[\205!\0\313\314\v	\"D)\244\x14\315\f!\207" [fn-104 args-105 value-106 -explainer- form-description-108 (should-not (registry--match :member entry ...)) :form ert-form-evaluation-aborted-107 :value registry--match ert-explainer :explanation apply ert--signal-should-execution] 6)) ((hello)) ert-form-evaluation-aborted-112 ((byte-code "\305C\306\b	BD\244\n\307=?\205\x12\0\310\nD\244\311\312N\211^[\205!\0\313\314\v	\"D)\244\x14\315\f!\207" [fn-109 args-110 value-111 -explainer- form-description-113 (should-not (registry--match :member entry ...)) :form ert-form-evaluation-aborted-112 :value registry--match ert-explainer :explanation apply ert--signal-should-execution] 6)) "Done with matching testing." fn-74 value-76 form-description-78 args-80 fn-79 value-81 ...] 4] (ert-deftest . registry-match-test)] 7)
  require(registry)
  byte-code("\300\301!\210\300\302!\210\300\303!\210\300\304!\210\300\305!\210\300\306!\210\300\307!\210\300\310!\207" [require gnus gnus-int gnus-sum gnus-art gnus-util nnmail easymenu registry] 2)
  (gnus-registry-initialize)
  eval-buffer(#<buffer  *load*> nil "/home/tzz/.gnus.el" nil t)  ; Reading at buffer position 1072
  load-with-code-conversion("/home/tzz/.gnus.el" "/home/tzz/.gnus.el" nil t)
  load("~/.gnus" nil t)
  gnus-read-init-file()
  gnus-1(nil nil nil)
  gnus(nil)
  call-interactively(gnus t nil)
  execute-extended-command(nil)
  call-interactively(execute-extended-command nil nil)

  reply	other threads:[~2011-04-06 13:10 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-06  4:28 Eric Abrahamsen
2011-04-06 10:03 ` Ted Zlatanov
2011-04-06 10:10   ` David Engster
2011-04-06 10:54     ` Ted Zlatanov
2011-04-06 13:10       ` Ted Zlatanov [this message]
2011-04-06 13:28         ` David Engster
2011-04-06 14:26           ` Ted Zlatanov
2011-04-06 14:57             ` David Engster
2011-04-06 15:00               ` Ted Zlatanov
2011-04-06 15:03               ` David Engster
2011-04-06 15:51                 ` Ted Zlatanov
2011-04-06 13:15 ` Gnus automatic builds (was: no gnus registry new dependency on ert?) Ted Zlatanov
2011-04-06 13:31   ` Gnus automatic builds David Engster
2011-04-06 16:14     ` David Engster
2011-04-06 16:30       ` Ted Zlatanov
2011-04-06 18:10         ` David Engster
2011-04-06 18:57           ` Ted Zlatanov
2011-04-07 19:21             ` David Engster
2011-04-07 19:51               ` Ted Zlatanov
2011-04-07 20:02                 ` David Engster
2011-04-07 21:19                   ` Ted Zlatanov
2011-04-12 16:08               ` Lars Magne Ingebrigtsen
2011-04-12 16:29                 ` David Engster
2011-04-12 16:36                   ` Lars Magne Ingebrigtsen
2011-04-12 18:33                     ` Jason L Tibbitts III
2011-04-12 18:41                       ` Lars Magne Ingebrigtsen
2011-04-12 19:35                         ` Jason L Tibbitts III
2011-04-12 19:46                           ` David Engster
2011-04-12 19:51                             ` Jason L Tibbitts III
2011-04-16  8:22                               ` David Engster
2011-04-16 15:19                                 ` Ted Zlatanov
2011-04-20 18:50                                   ` David Engster
2011-04-20 20:58                                     ` Ted Zlatanov
2011-04-22 11:27                                     ` Adam Sjøgren
2011-04-22 21:21                                       ` David Engster
2011-04-25  9:05                                         ` Adam Sjøgren
2011-04-12 20:00                           ` Lars Magne Ingebrigtsen
2011-04-20 20:59                         ` David Engster
2011-04-20 21:03                           ` Ted Zlatanov
2011-04-20 21:31                             ` Jason L Tibbitts III
2011-04-21  7:33                               ` David Engster
2011-04-25 12:28                             ` Ted Zlatanov
2011-04-06 20:26       ` David Engster
2011-04-07 19:30         ` David Engster

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87vcyrr0ec.fsf@lifelogs.com \
    --to=tzz@lifelogs.com \
    --cc=ding@gnus.org \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).