From pgriffel at gmail.com Tue May 5 09:48:06 2020 From: pgriffel at gmail.com (Paul Griffioen) Date: Tue, 5 May 2020 11:48:06 +0200 Subject: Help with random testing file system functions Message-ID: Hi all, Would anybody be willing to help me with the clfs package I have written? The package defines contracts for all Common Lisp and UIOP file system operations and can run random tests with them. I would like to see what the random testing does on different combinations of lisp implementations and file systems, and if implementation independent contracts are feasible. If the package works across implementations then the contracts can help testing uiop and also each implementation's conformance to the hyperspec. The problem is of course that the operations are not defined that precisely, but results so far seem promising. I have run the tests on Linux and Windows for sbcl and ccl. At this point there are some edge cases left, but the general concept seems to work without too many implementation specific details in the contracts. The package can be found at https://github.com/lisper99/clfs. To run the test you have to load the clfs-test package, create an empty directory somewhere and call function clfs-test:test-contracts with the directory as argument. Any feedback or suggestions is appreciated. Paul Griffioen -------------- next part -------------- An HTML attachment was scrubbed... URL: From marco.antoniotti at unimib.it Tue May 5 13:08:12 2020 From: marco.antoniotti at unimib.it (Marco Antoniotti) Date: Tue, 5 May 2020 15:08:12 +0200 Subject: ASDF/INTERFACE::TRAVERSE-SUB-ACTIONS Message-ID: <5eb1653e.1c69fb81.92f2b.dd4f@mx.google.com> An HTML attachment was scrubbed... URL: From rpgoldman at sift.info Tue May 5 14:07:32 2020 From: rpgoldman at sift.info (Robert Goldman) Date: Tue, 05 May 2020 09:07:32 -0500 Subject: ASDF/INTERFACE::TRAVERSE-SUB-ACTIONS In-Reply-To: <5eb1653e.1c69fb81.92f2b.dd4f@mx.google.com> References: <5eb1653e.1c69fb81.92f2b.dd4f@mx.google.com> Message-ID: I'm not sure I understand what you are looking for. Here's what I see: ``` ~/lisp/asdf $ find . -name '*.lisp' -exec fgrep -iq system-input-files {} \; -print rpg at rpg-mbp-2: ~/lisp/asdf $ So no sign of `system-input-files`. There *is* an `input-files` generic function. And there's a `traverse-action`, but no `traverse-sub-actions`. I suspect whatever ASDF you are coding against must be quite old. Is there any chance you upgraded in image and `system-input-files` was left around from a previous version? Or have you by any chance used the ASDF that is bundled with Quicklisp? If you think I'm wrong about this, please send instructions for replicating. Thanks, R On 5 May 2020, at 8:08, Marco Antoniotti wrote: > Hi > > > > I revamped (and fixed several issues) HELambdaP (helambdap.sf.net). > While doing so, I got the message that the function > > > > ASDF/INTERFACE::TRAVERSE-SUB-ACTIONS > > > > Is not defined in 3.3.x. The error I get is (in LW) > > > > The following function is undefined: > > ASDF/INTERFACE::TRAVERSE-SUB-ACTIONS which is referenced by > ASDF/INTERFACE:SYSTEM-INPUT-FILES > > > > The function SYSTEM-INPUT-FILES, which is the one I need, seems to be > there. Is this a buglet? > > > > All the best > > > > Marco Antoniotti > DISCo, Università degli Studi di Milano-Bicocca > > +39 02 6448 7901 > > bimib.disco.unimib.it -------------- next part -------------- An HTML attachment was scrubbed... URL: From marco.antoniotti at unimib.it Tue May 5 14:46:00 2020 From: marco.antoniotti at unimib.it (Marco Antoniotti) Date: Tue, 5 May 2020 16:46:00 +0200 Subject: ASDF/INTERFACE::TRAVERSE-SUB-ACTIONS Message-ID: <5eb17c2b.1c69fb81.3fc79.cfc9@mx.google.com> An HTML attachment was scrubbed... URL: From rpgoldman at sift.info Tue May 5 15:17:51 2020 From: rpgoldman at sift.info (Robert Goldman) Date: Tue, 05 May 2020 10:17:51 -0500 Subject: ASDF/INTERFACE::TRAVERSE-SUB-ACTIONS In-Reply-To: <5eb17c2b.1c69fb81.3fc79.cfc9@mx.google.com> References: <5eb17c2b.1c69fb81.3fc79.cfc9@mx.google.com> Message-ID: The released version is 3.3.4. Would you please try that? Our release process isn't stable enough that I could easily fix 3.3.3, and even if I did, I wouldn't have a way to make it available. Let's see what happens on 3.3.4 and we can take it from there. On 5 May 2020, at 9:46, Marco Antoniotti wrote: > Hi Robert > > > > I need the function ASDF:SYSTEM-INPUT-FILES. This function, in 3.3.3 > appears to call the function ASDF/INTERFACE::TRAVERSE-SUB-ACTIONS. > > > > LW tells me that the inner, unexported function > ASDF/INTERFACE::TRAVERSE-SUB-ACTIONS is undefined. It does not appear > to hinder the usage of the exported function, but the message is > there. > > > > Cheers > > > > Marco Antoniotti > DISCo, Università degli Studi di Milano-Bicocca > > +39 02 6448 7901 > > bimib.disco.unimib.it > > > > > > **From:** [Robert Goldman]() > **Sent:** Tuesday, May 5, 2020 16:07 > **To:** [Marco Antoniotti]() > **Cc:** > [asdf-devel at common-lisp.net]() > **Subject:** Re: ASDF/INTERFACE::TRAVERSE-SUB-ACTIONS > > > > I'm not sure I understand what you are looking for. Here's what I see: > >> Hi >> >> >> >> I revamped (and fixed several issues) HELambdaP (helambdap.sf.net). >> While doing so, I got the message that the function >> >> >> >> ASDF/INTERFACE::TRAVERSE-SUB-ACTIONS >> >> >> >> Is not defined in 3.3.x. The error I get is (in LW) >> >> >> >> The following function is undefined: >> >> ASDF/INTERFACE::TRAVERSE-SUB-ACTIONS which is referenced by >> ASDF/INTERFACE:SYSTEM-INPUT-FILES >> >> >> >> The function SYSTEM-INPUT-FILES, which is the one I need, seems to be >> there. Is this a buglet? >> >> >> >> All the best >> >> >> >> Marco Antoniotti >> DISCo, Università degli Studi di Milano-Bicocca >> >> +39 02 6448 7901 >> >> bimib.disco.unimib.it >> >> -------------- next part -------------- An HTML attachment was scrubbed... URL: From marco.antoniotti at unimib.it Tue May 5 15:55:30 2020 From: marco.antoniotti at unimib.it (Marco Antoniotti) Date: Tue, 5 May 2020 17:55:30 +0200 Subject: ASDF/INTERFACE::TRAVERSE-SUB-ACTIONS Message-ID: <5eb18c75.1c69fb81.a0106.3571@mx.google.com> An HTML attachment was scrubbed... URL: From rpgoldman at sift.info Tue May 5 16:32:56 2020 From: rpgoldman at sift.info (Robert Goldman) Date: Tue, 05 May 2020 11:32:56 -0500 Subject: ASDF/INTERFACE::TRAVERSE-SUB-ACTIONS In-Reply-To: <5eb18c75.1c69fb81.a0106.3571@mx.google.com> References: <5eb18c75.1c69fb81.a0106.3571@mx.google.com> Message-ID: Something is really wrong. Look at this transcript: ``` rpg at rpg-mbp-2: ~/lisp/asdf $ git checkout 3.3.4 Note: switching to '3.3.4'. You are in 'detached HEAD' state. You can look around, make experimental changes and commit them, and you can discard any commits you make in this state without impacting any branches by switching back to a branch. If you want to create a new branch to retain commits you create, you may do so (now or later) by using -c with the switch command. Example: git switch -c Or undo this operation with: git switch - Turn off this advice by setting config variable advice.detachedHead to false HEAD is now at 082f4ed4 Bump version to 3.3.4 rpg at rpg-mbp-2: ~/lisp/asdf $ find . -name '*.lisp' -exec fgrep -iq SYSTEM-INPUT-FILES {} \; -print rpg at rpg-mbp-2: ~/lisp/asdf $ ``` Similarly, after loading 3.3.4 into SBCL, I see this: ``` CL-USER(1): (apropos '#:system-input-files) CL-USER(2): ``` Similarly on Lispworks: ``` CL-USER 3 > (load "/Users/rpg/lisp/asdf/build/asdf.lisp") ; Loading text file /Users/rpg/lisp/asdf/build/asdf.lisp #P"/Users/rpg/lisp/asdf/build/asdf.lisp" CL-USER 4 > (apropos '#:system-input-files) CL-USER 5 > ``` I just tried `(require :asdf)` on Lispworks, and still no `system-input-files`. I simply have no idea where this is coming from. Please send a minimum working example for Lispworks. -------------- next part -------------- An HTML attachment was scrubbed... URL: From marco.antoniotti at unimib.it Tue May 5 17:05:08 2020 From: marco.antoniotti at unimib.it (Marco Antoniotti) Date: Tue, 5 May 2020 19:05:08 +0200 Subject: ASDF/INTERFACE::TRAVERSE-SUB-ACTIONS Message-ID: <5eb19cc7.1c69fb81.62509.0ddf@mx.google.com> An HTML attachment was scrubbed... URL: From rpgoldman at sift.info Tue May 5 17:27:30 2020 From: rpgoldman at sift.info (Robert Goldman) Date: Tue, 05 May 2020 12:27:30 -0500 Subject: ASDF/INTERFACE::TRAVERSE-SUB-ACTIONS In-Reply-To: <5eb19cc7.1c69fb81.62509.0ddf@mx.google.com> References: <5eb19cc7.1c69fb81.62509.0ddf@mx.google.com> Message-ID: <91E0017A-5FA8-44B1-A35D-4E1300FB9C76@sift.info> On 5 May 2020, at 12:05, Marco Antoniotti wrote: > > At a certain point I needed (I still do) the function > SYSTEM-INPUT-FILES. I think Fare send me a simple implementation that > worked on the ASDF version of that time (long ago, I guess). The > function is the following. > ``` lisp (defun system-input-files (system) (multiple-value-bind (i o) (while-collecting (i o) (loop for (op . comp) in (plan-actions (traverse-sub-actions 'load-op (find-system system))) do (map () #'i (input-files op comp)) (map () #'o (output-files op comp)))) (remove-if #'(lambda (f) (member f o :test 'pathname-equal)) (remove-duplicates i :from-end t :test 'pathname-equal)))) ``` So what you need here is the full set of plan actions. You should be able to get this as follows: ``` lisp (defun system-input-files (system) (multiple-value-bind (i o) (while-collecting (i o) (loop for (op . comp) in (plan-actions (make-plan nil (make-operation 'load-op) (find-system system))) do (map () #'i (input-files op comp)) (map () #'o (output-files op comp)))) (remove-if #'(lambda (f) (member f o :test 'pathname-equal)) (remove-duplicates i :from-end t :test 'pathname-equal)))) ``` `make-plan` will give you what you need to call `plan-actions` on in place of `traverse-sub-actions`. -------------- next part -------------- An HTML attachment was scrubbed... URL: From marco.antoniotti at unimib.it Tue May 5 17:29:45 2020 From: marco.antoniotti at unimib.it (Marco Antoniotti) Date: Tue, 5 May 2020 19:29:45 +0200 Subject: ASDF/INTERFACE::TRAVERSE-SUB-ACTIONS Message-ID: <5eb1a28b.1c69fb81.1342f.18d6@mx.google.com> An HTML attachment was scrubbed... URL: From rpgoldman at sift.info Tue May 5 17:32:11 2020 From: rpgoldman at sift.info (Robert Goldman) Date: Tue, 05 May 2020 12:32:11 -0500 Subject: ASDF/INTERFACE::TRAVERSE-SUB-ACTIONS In-Reply-To: <5eb1a28b.1c69fb81.1342f.18d6@mx.google.com> References: <5eb1a28b.1c69fb81.1342f.18d6@mx.google.com> Message-ID: Glad to help. Or, perhaps, heλp... On 5 May 2020, at 12:29, Marco Antoniotti wrote: > Thank you. > > > > I will include the new version in HELambdaP. > > > > Apologies for the miscommunication. > > > > All the best > > > > Marco Antoniotti > DISCo, Università degli Studi di Milano-Bicocca > > +39 02 6448 7901 > > bimib.disco.unimib.it > > > > > > **From:** [Robert Goldman]() > **Sent:** Tuesday, May 5, 2020 19:27 > **To:** [Marco Antoniotti]() > **Cc:** > [asdf-devel at common-lisp.net]() > **Subject:** Re: ASDF/INTERFACE::TRAVERSE-SUB-ACTIONS > > > > On 5 May 2020, at 12:05, Marco Antoniotti wrote: > >> At a certain point I needed (I still do) the function >> SYSTEM-INPUT-FILES. I think Fare send me a simple implementation that >> worked on the ASDF version of that time (long ago, I guess). The >> function is the following. > > > (defun system-input-files (system) > > > > (multiple-value-bind (i o) > > > > (while-collecting (i o) > > > > (loop for (op . comp) > > > > in (plan-actions > > > > (traverse-sub-actions 'load-op (find-system > system))) > > > > do (map () #'i (input-files op comp)) > > > > (map () #'o (output-files op comp)))) > > > > (remove-if #'(lambda (f) (member f o :test 'pathname-equal)) > > > > (remove-duplicates i :from-end t :test > 'pathname-equal)))) > > > So what you need here is the full set of plan actions. You should be > able to get this as follows: > > > (defun system-input-files (system) > > > > (multiple-value-bind (i o) > > > > (while-collecting (i o) > > > > (loop for (op . comp) > > > > in (plan-actions (make-plan nil (make-operation > 'load-op) (find-system system))) > > > > do (map () #'i (input-files op comp)) > > > > (map () #'o (output-files op comp)))) > > > > (remove-if #'(lambda (f) (member f o :test 'pathname-equal)) > > > > (remove-duplicates i :from-end t :test > 'pathname-equal)))) > > > `make-plan` will give you what you need to call `plan-actions` on in > place of `traverse-sub-actions`. -------------- next part -------------- An HTML attachment was scrubbed... URL: From fahree at gmail.com Tue May 5 17:43:59 2020 From: fahree at gmail.com (=?UTF-8?B?RmFyw6k=?=) Date: Tue, 5 May 2020 13:43:59 -0400 Subject: ASDF/INTERFACE::TRAVERSE-SUB-ACTIONS In-Reply-To: References: <5eb18c75.1c69fb81.a0106.3571@mx.google.com> Message-ID: git grep system-input-files doesn't return anything for HEAD, 3.2.0, 3.1.7, 3.1.2. But the name vaguely rings a bell, and I might have offered a function that does that long ago. A better replacement today might be (input-files :concatenate-source-op system) Problem: this "solution" will do what you want in case of package-inferred-systems, or systems where all or most of the functionality is in secondary systems. In these cases, you might have to do something more sophisticated, some variant of: (defun system-lisp-files (x) (remove-if-not (lambda (p) (subpathp p (system-source-directory x))) (input-files :monolithic-concatenate-source-op x))) or if you want to be more subtle in case of non-lisp input files, something that generalizes the below to somehow work with multiple phases of operation (see notably how it behaves for iolib): (defun system-files (system) (mapcar 'component-pathname (remove-duplicates (remove-if-not (lambda (x) (and (typep x 'source-file) (equal (primary-system-name x) (primary-system-name system)))) (mapcar 'cdr (plan-actions (make-plan () :load-op system))))))) If you get things to work across phases of execution, you'll be in a good position to also fix POIU. Good luck. —♯ƒ • François-René ÐVB Rideau •Reflection&Cybernethics• http://fare.tunes.org Poetry is what gets lost in translation. — Robert Frost On Tue, May 5, 2020 at 12:33 PM Robert Goldman wrote: > > Something is really wrong. Look at this transcript: > > rpg at rpg-mbp-2: ~/lisp/asdf $ git checkout 3.3.4 > Note: switching to '3.3.4'. > > You are in 'detached HEAD' state. You can look around, make experimental > changes and commit them, and you can discard any commits you make in this > state without impacting any branches by switching back to a branch. > > If you want to create a new branch to retain commits you create, you may > do so (now or later) by using -c with the switch command. Example: > > git switch -c > > Or undo this operation with: > > git switch - > > Turn off this advice by setting config variable advice.detachedHead to false > > HEAD is now at 082f4ed4 Bump version to 3.3.4 > rpg at rpg-mbp-2: ~/lisp/asdf $ find . -name '*.lisp' -exec fgrep -iq SYSTEM-INPUT-FILES {} \; -print > rpg at rpg-mbp-2: ~/lisp/asdf $ > > Similarly, after loading 3.3.4 into SBCL, I see this: > > CL-USER(1): (apropos '#:system-input-files) > > CL-USER(2): > > Similarly on Lispworks: > ``` > CL-USER 3 > (load "/Users/rpg/lisp/asdf/build/asdf.lisp") > ; Loading text file /Users/rpg/lisp/asdf/build/asdf.lisp > > P"/Users/rpg/lisp/asdf/build/asdf.lisp" > > CL-USER 4 > (apropos '#:system-input-files) > > CL-USER 5 > > ``` > > I just tried (require :asdf) on Lispworks, and still no system-input-files. > > I simply have no idea where this is coming from. Please send a minimum working example for Lispworks. From marco.antoniotti at unimib.it Tue May 5 17:46:52 2020 From: marco.antoniotti at unimib.it (Marco Antoniotti) Date: Tue, 5 May 2020 19:46:52 +0200 Subject: ASDF/INTERFACE::TRAVERSE-SUB-ACTIONS Message-ID: <5eb1a68f.1c69fb81.bf476.40c4@mx.google.com> An HTML attachment was scrubbed... URL: