Raymond Toy pushed to branch issue-157-directory-returns-all-files at cmucl / cmucl
Commits:
172b5853 by Raymond Toy at 2023-03-03T16:16:06-08:00
Need to handle pathname versions specially
Using `components-match` doesn't do the right thing for
`pathname-version`. We need to treat `NIL` to mean the same as
`:NEWEST`. Fortunately, there's already `compare-version-component`
does what we need, so use it.
- - - - -
2f544f3d by Raymond Toy at 2023-03-03T16:18:20-08:00
Instead of calling %pathname-match-p call %%pathname-match-p
Here in `%enumerate-files`, we don't need the full capability of
`%pathname-match-p`. The file we get is a string from reading from
the directory. We can just use `parse-nametring` to get a pathname
object out of that. Then it can be merged with the directory
pathname. Thus, everything is a physical pathname suitable for
`%%pathname-match-p`.
- - - - -
2e0efffd by Raymond Toy at 2023-03-03T16:41:29-08:00
Need to have special function to match version components.
Using `components-match` work and neither does
`compare-version-component`. We need a separate method of this.
Basically a version matches a wild version if they're `eq, or if the
wild version is `:wild`. Also `NIL` and `:NEWEST` are treated as
being equal. (Via `compare-version-component`).
- - - - -
90e1f949 by Raymond Toy at 2023-03-03T17:07:44-08:00
Handle device component specially for matching.
Logical pathnames have a pathname-device of :unspecific. We need to
handle that specially when matching logical pathnames. We treat
:unspecific as matching nil.
- - - - -
3cfc7ef3 by Raymond Toy at 2023-03-03T17:10:04-08:00
Comment out debugging prints
- - - - -
c14e6ee8 by Raymond Toy at 2023-03-04T07:12:28-08:00
Add some comments.
- - - - -
2 changed files:
- src/code/filesys.lisp
- src/code/pathname.lisp
Changes:
=====================================
src/code/filesys.lisp
=====================================
@@ -812,8 +812,11 @@
(progn
(format t "file = ~A~%" file)
(describe pathname))
- (when (%pathname-match-p (merge-pathnames file dir-path nil)
- pathname)
+ ;; Use pathname-match-p so that we are
+ ;; guaranteed to have directory and
+ ;; pathname-match-p behave consistently.
+ (when (%%pathname-match-p (merge-pathnames file dir-path)
+ pathname)
(funcall function
(concatenate 'string
directory
=====================================
src/code/pathname.lisp
=====================================
@@ -1221,15 +1221,32 @@ a host-structure or string."
(defun %%pathname-match-p (pathname wildname)
(macrolet ((frob (field &optional (op 'components-match ))
- `(or (eq (,field wildname) :wild)
- (,op (,field pathname) (,field wildname)))))
- (and (or (null (%pathname-host wildname))
- (eq (%pathname-host wildname) (%pathname-host pathname)))
- (frob %pathname-device)
- (frob %pathname-directory directory-components-match)
- (frob %pathname-name)
- (frob %pathname-type)
- (frob %pathname-version))))
+ `(,op (,field pathname) (,field wildname))))
+ #+nil
+ (progn
+ (describe pathname)
+ (describe wildname))
+ (and (or (null (%pathname-host wildname))
+ (eq (%pathname-host wildname) (%pathname-host pathname)))
+ (flet ((device-components-match (thing wild)
+ (or (eq thing wild)
+ (eq wild :wild)
+ ;; A device component of :unspecific matches
+ ;; nil.
+ (or (and (null thing) (eq wild :unspecific))
+ (and (eq thing :unspecific) (eq wild nil))))))
+ (frob %pathname-device device-components-match))
+ #+nil
+ (frob %pathname-device)
+ (frob %pathname-directory directory-components-match)
+ (frob %pathname-name)
+ (frob %pathname-type)
+ (flet ((version-components-match (thing wild)
+ (or (eq thing wild)
+ (eq wild :wild)
+ ;; A version component matches of :newest matches nil.
+ (compare-version-component thing wild))))
+ (frob %pathname-version version-components-match)))))
;; Like PATHNAME-MATCH-P but the pathnames should not be search-lists.
;; Primarily intended for TRANSLATE-LOGICAL-PATHNAME and friends,
View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/compare/068710573805f004b0d0bc…
--
View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/compare/068710573805f004b0d0bc…
You're receiving this email because of your account on gitlab.common-lisp.net.
Raymond Toy pushed to branch issue-156-add-two-arg-ge-le at cmucl / cmucl
Commits:
0b4ec82d by Raymond Toy at 2023-03-02T10:50:47-08:00
Add x86 reader conditional
Don't set package to "X86" if we're not building on x86.
One less thing to worry about when bootstrapping.
- - - - -
1 changed file:
- src/bootfiles/21d/boot-2021-07-3.lisp
Changes:
=====================================
src/bootfiles/21d/boot-2021-07-3.lisp
=====================================
@@ -3,7 +3,9 @@
;;
;; Use bin/build.sh -B boot-2021-07-3 to build this (along with any
;; other bootfiles that are still needed).
+#+x86
(in-package :x86)
+
#+x86
(ext:without-package-locks
(defparameter static-functions
View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/commit/0b4ec82d2de83ee986b4821…
--
View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/commit/0b4ec82d2de83ee986b4821…
You're receiving this email because of your account on gitlab.common-lisp.net.
Raymond Toy pushed to branch master at cmucl / cmucl
Commits:
d55e32fa by Raymond Toy at 2023-03-02T10:48:44-08:00
Add x86 reader conditional
This bootstrap file only applies to x86, so add reader conditionals so
that this can be loaded for other architectures without having any
effect.
One less thing to worry about when bootstrapping.
- - - - -
1 changed file:
- src/bootfiles/21d/boot-2021-07-2.lisp
Changes:
=====================================
src/bootfiles/21d/boot-2021-07-2.lisp
=====================================
@@ -3,8 +3,10 @@
;;
;; Use bin/build.sh -B boot-2021-07-2 to build this.
+#+x86
(in-package :x86)
+#+x86
(ext:without-package-locks
(handler-bind
((error
View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/commit/d55e32fab14add3feb30a51…
--
View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/commit/d55e32fab14add3feb30a51…
You're receiving this email because of your account on gitlab.common-lisp.net.
Raymond Toy pushed to branch issue-156-add-two-arg-ge-le at cmucl / cmucl
Commits:
9ca44f6d by Raymond Toy at 2023-03-02T10:41:16-08:00
Add bootstrap file for CI
Forgot to add boot-2021-07-3.lisp that's required to add the new
static functions for x86.
- - - - -
2 changed files:
- .gitlab-ci.yml
- + src/bootfiles/21d/boot-2021-07-3.lisp
Changes:
=====================================
.gitlab-ci.yml
=====================================
@@ -1,7 +1,7 @@
variables:
download_url: "https://common-lisp.net/project/cmucl/downloads/snapshots/2021/07"
version: "2021-07-x86"
- bootstrap: "-B boot-2021-07-1 -B boot-2021-07-2"
+ bootstrap: "-B boot-2021-07-1 -B boot-2021-07-2 -B boot-2021-07-3"
stages:
- install
=====================================
src/bootfiles/21d/boot-2021-07-3.lisp
=====================================
@@ -0,0 +1,14 @@
+;; Bootstrap file for x86 to add two-arg->= and two-arg-<= to static
+;; functions list.
+;;
+;; Use bin/build.sh -B boot-2021-07-3 to build this (along with any
+;; other bootfiles that are still needed).
+(in-package :x86)
+#+x86
+(ext:without-package-locks
+ (defparameter static-functions
+ '(length
+ two-arg-+ two-arg-- two-arg-* two-arg-/ two-arg-< two-arg-> two-arg-= eql
+ %negate two-arg-and two-arg-ior two-arg-xor two-arg-gcd two-arg-lcm
+ two-arg-<= two-arg->= two-arg-/=
+ )))
View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/commit/9ca44f6d211c5e7624f4e89…
--
View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/commit/9ca44f6d211c5e7624f4e89…
You're receiving this email because of your account on gitlab.common-lisp.net.
Raymond Toy pushed to branch master at cmucl / cmucl
Commits:
80f89a62 by Raymond Toy at 2023-02-28T21:20:02-08:00
Update cmucl.pot
We forgot to update this when adding --version command line option.
- - - - -
1 changed file:
- src/i18n/locale/cmucl.pot
Changes:
=====================================
src/i18n/locale/cmucl.pot
=====================================
@@ -6153,6 +6153,10 @@ msgstr ""
msgid "Prints the cmucl version and exits"
msgstr ""
+#: src/code/commandline.lisp
+msgid "Prints the cmucl version and exits; same as -version"
+msgstr ""
+
#: src/code/env-access.lisp
msgid ""
"Returns information about the symbol VAR in the lexical environment ENV.\n"
View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/commit/80f89a62d10176604e5c664…
--
View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/commit/80f89a62d10176604e5c664…
You're receiving this email because of your account on gitlab.common-lisp.net.