From langstefan at gmx.at Sun Feb 4 22:23:57 2007 From: langstefan at gmx.at (Stefan Lang) Date: Sun, 4 Feb 2007 23:23:57 +0100 Subject: [lift-devel] test suite names and packages Message-ID: <200702042323.57154.langstefan@gmx.at> Hi, lift currently interns all test suite names in the lift package. What is the rationale behind this? Was this a conscious design decision or incidentally? Currently, if I have package TEST-A with test suite FOO: (in-package "TEST-A") (deftestsuite foo () ...) and package TEST-B also with test suite FOO: (in-package "TEST-B") (deftestsuite foo () ...) the second definition redefines the first, because both are interned as LIFT::FOO. This runs somewhat counter to the package system. Intuiton, based on defclass, would tell me it should define the suites named TEST-A::FOO and TEST-B::FOO, peacefully coexisting. Note that I have hardly used lift. I'm currently evaluating test frameworks, so perhaps I'm missing something crucial. Anyway, the attached patch would change lift so that test suite names and test names are not interned in the lift package, making deftestsuite behave more like defclass wrt to packages and allowing suites with the same name in different packages to coexist. The format control ~A in list-tests is changed to ~S so that package names are printed to disambiguate where necessary. It also changes the three tests that checked that test names are interned in the lift package. Thanks, Stefan -------------- next part -------------- A non-text attachment was scrubbed... Name: packages.diff Type: text/x-diff Size: 5435 bytes Desc: not available URL: From gwking at metabang.com Sun Feb 4 23:40:02 2007 From: gwking at metabang.com (Gary King) Date: Sun, 4 Feb 2007 18:40:02 -0500 Subject: [lift-devel] test suite names and packages In-Reply-To: <200702042323.57154.langstefan@gmx.at> References: <200702042323.57154.langstefan@gmx.at> Message-ID: <56631E9F-4C8C-4D1B-B8B1-3F681D96731B@metabang.com> Hi Stefan, Thanks for looking at lift. The "force everything into the LIFT package" thing was a conscious decision. It was also, I think, the _wrong_ one. At the time, it made it easier to run tests from different packages. Unfortunately, it also makes organizing tests in different packages more difficult because of the name-space munging. I almost made the same mistake in log5. Thanks also for your patch; I was just contemplating fixing the code myself. I will look into applying it later tonight or tomorrow. Please let me know what you like and dislike about LIFT (perhaps especially where it doesn't feel right) because this is the best way for me to improve it. thanks again, On Feb 4, 2007, at 5:23 PM, Stefan Lang wrote: > Hi, > > lift currently interns all test suite names in the lift > package. What is the rationale behind this? Was this a > conscious design decision or incidentally? > > Currently, if I have package TEST-A with test suite FOO: > > (in-package "TEST-A") > > (deftestsuite foo () ...) > > and package TEST-B also with test suite FOO: > > (in-package "TEST-B") > > (deftestsuite foo () ...) > > the second definition redefines the first, because both > are interned as LIFT::FOO. This runs somewhat counter to > the package system. Intuiton, based on defclass, would > tell me it should define the suites named TEST-A::FOO and > TEST-B::FOO, peacefully coexisting. > > Note that I have hardly used lift. I'm currently evaluating > test frameworks, so perhaps I'm missing something crucial. > > Anyway, the attached patch would change lift so that > test suite names and test names are not interned in the lift > package, making deftestsuite behave more like defclass > wrt to packages and allowing suites with the same name > in different packages to coexist. > > The format control ~A in list-tests is changed to ~S > so that package names are printed to disambiguate where > necessary. > > It also changes the three tests that checked that test > names are interned in the lift package. > > Thanks, > Stefan > > _______________________________________________ > lift-devel mailing list > lift-devel at common-lisp.net > http://common-lisp.net/cgi-bin/mailman/listinfo/lift-devel -- Gary Warren King, metabang.com Cell: (413) 885 9127 Fax: (206) 338-4052 gwkkwg on Skype * garethsan on AIM -------------- next part -------------- An HTML attachment was scrubbed... URL: From gwking at metabang.com Thu Feb 8 16:40:02 2007 From: gwking at metabang.com (Gary King) Date: Thu, 8 Feb 2007 11:40:02 -0500 Subject: [lift-devel] Announce: version 1.2.2 Message-ID: A long time ago, I decided to have [LIFT][] put all of your test- suite names into the LIFT package because it made it easier to call [`run-tests`][run-tests] no matter where you were. I almost did the same thing in [log5][] but immediately realized that having only a single namespace for logging categories was a *bad* idea. I then decided that I would need to go back to LIFT and fix my mistake. Thanks to [cosmic unconscious][], Stefan Lang sent me a patch that corrects the issue the very next day! (Thanks Stefan). Version 1.2.2 of LIFT includes Stefan's patch plus some extra hair to help in the transition to this new behavior. To find a test suite named `foo`, LIFT: * Looks for a suite named `foo` and uses it if it's found * If it can't find it, it looks in all packages for test-suites named "foo" * If there is one, it uses it * If there are none, then there isn't such a suite and you'll get an error * If there is more than one, then you're being ambiguous and LIFT will complain. Version 1.2.2 also corrects a bug in the ordering of test-suites that use single setup: there's nothing like a little bit of `nreverse` to make things happy! [LIFT]: http://common-lisp/project/lift/ [run-tests]: http://common-lisp.net/project/lift/documentation/lift- package/function-run--tests.html [cosmic unconscious]: http://www.imdb.com/title/tt0087995/ [log5]: http://common-lisp/project/log5/ -- Gary Warren King, metabang.com Cell: (413) 885 9127 Fax: (206) 338-4052 gwkkwg on Skype * garethsan on AIM From langstefan at gmx.at Fri Feb 9 16:26:46 2007 From: langstefan at gmx.at (Stefan Lang) Date: Fri, 9 Feb 2007 17:26:46 +0100 Subject: [lift-devel] Announce: version 1.2.2 In-Reply-To: References: Message-ID: <200702091726.46584.langstefan@gmx.at> On Thursday 08 February 2007 17:40, Gary King wrote: > Version 1.2.2 of LIFT Strange as it is, asdf-install and darcs still give me 1.2.1 :-( Stefan From gwking at metabang.com Fri Feb 9 17:35:34 2007 From: gwking at metabang.com (Gary King) Date: Fri, 9 Feb 2007 12:35:34 -0500 Subject: [lift-devel] Announce: version 1.2.2 In-Reply-To: <200702091726.46584.langstefan@gmx.at> References: <200702091726.46584.langstefan@gmx.at> Message-ID: <5911DA51-10BA-4001-A035-A6670341586C@metabang.com> Man, sometimes I amaze myself (and not in a good way). I distinctly remember moving everything up but reality shows otherwise. My apologies. All is there now. On Feb 9, 2007, at 11:26 AM, Stefan Lang wrote: > On Thursday 08 February 2007 17:40, Gary King wrote: > >> Version 1.2.2 of LIFT > > Strange as it is, asdf-install and darcs still give > me 1.2.1 :-( > > Stefan > _______________________________________________ > lift-devel mailing list > lift-devel at common-lisp.net > http://common-lisp.net/cgi-bin/mailman/listinfo/lift-devel -- Gary Warren King, metabang.com Cell: (413) 885 9127 Fax: (206) 338-4052 gwkkwg on Skype * garethsan on AIM From gwking at metabang.com Fri Feb 23 15:18:44 2007 From: gwking at metabang.com (Gary King) Date: Fri, 23 Feb 2007 10:18:44 -0500 Subject: [lift-devel] Re: LIFT questions In-Reply-To: <50775.68.44.154.215.1172155087.squirrel@reedlarkeygroup.com> References: <0FB3E8BB-37DF-4660-872B-E302B9A3464A@reedlarkeygroup.com> <7CAFC156-FBB2-41B6-97AB-8115F5B619D4@metabang.com> <50775.68.44.154.215.1172155087.squirrel@reedlarkeygroup.com> Message-ID: (cc'ing the list) On Feb 22, 2007, at 9:38 AM, Jonathon McKitrick wrote: > 1. Is this a sign I've set up my test wrong? > > |-- (in macroexpansion of (DEFMETHOD LIFT::MAKE-SINGLE-PROTOTYPE > # ...)) > | (hint: For more precise location, try *BREAK-ON-SIGNALS*.) > | can't find type for presumed class TEST-ASSESSMENT in > | SB-PCL::PARAMETER-SPECIALIZER-DECLARATION-IN-DEFMETHOD. I'm not sure. Something is certainly not quite right. Can you send me the form that generates the message? > 2. Also, I have a trivial suggestion for you... and I *do* mean > trivial... > > I've found that in documentation strings, the names of the > arguments to > the function (and often any other lisp symbols) are often capitalized. > I've been doing this myself, and found it quite useful: > > (defun foo (bar baz) > "FOO takes a BAR and frobs it, especially if BAZ is greater than > 42." > . > . > ) > I do think that this is a good idea but I'm not sure when it will happen. It's also more likely that I'd write the arguments using Markdown syntax (e.g., `foo`) though I'm not sure: this is worse for interaction but better for document production. -- Gary Warren King, metabang.com Cell: (413) 885 9127 Fax: (206) 338-4052 gwkkwg on Skype * garethsan on AIM