Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Two directory issues #660

Open
alanruttenberg opened this issue Feb 7, 2024 · 4 comments
Open

Two directory issues #660

alanruttenberg opened this issue Feb 7, 2024 · 4 comments

Comments

@alanruttenberg
Copy link
Collaborator

  1. (make-pathname :type 'foo) yields a stacktrace for assertion failure in the repl . Should validate fields as strings. See top of trace below.
  2. directory appears to be case sensitive
    (directory (merge-pathnames (make-pathname :type (string r) :name :wild) fromdir)) fails unless type is (downcase (string r)) for a directory full of files with type ".r5" where r was 'r5.

Cut off bottom of trace below the uid-named function, which is mine.

ABCL Debug.assertTrue() assertion failed!
java.lang.Error: ABCL Debug.assertTrue() assertion failed!
	at org.armedbear.lisp.Debug.assertTrue(Debug.java:48)
	at org.armedbear.lisp.Pathname.getNamestring(Pathname.java:584)
	at org.armedbear.lisp.Pathname$pf_namestring.execute(Pathname.java:982)
	at org.armedbear.lisp.Symbol.execute(Symbol.java:805)
	at org.armedbear.lisp.LispThread.execute(LispThread.java:910)
	at org.armedbear.lisp.directory_6.execute(directory.lisp:101)
	at org.armedbear.lisp.CompiledClosure.execute(CompiledClosure.java:98)
	at org.armedbear.lisp.Symbol.execute(Symbol.java:805)
	at org.armedbear.lisp.LispThread.execute(LispThread.java:910)
	at abcl_ae91aec9_63af_46ea_a9c6_effa15ed9003.execute(Unknown Source)

(lisp-implementation-version)
"1.9.2-dev"
"OpenJDK_64-Bit_Server_VM-Homebrew-17.0.1+1"
"x86_64-Mac_OS_X-10.15.7"

@easye
Copy link
Collaborator

easye commented Feb 9, 2024

As for 2., I don't understand the problem: DIRECTORY should be case sensitive, shouldn't it?

@easye
Copy link
Collaborator

easye commented Feb 9, 2024

#661 fixes your first problem.

@alanruttenberg
Copy link
Collaborator Author

Where does it say directory is case sensitive? I'd expect it to be case sensitive on a case-sensitive file system, but MacOS isn't. Probe-file isn't case sensitive. Open isn't either.

@easye
Copy link
Collaborator

easye commented Feb 10, 2024

Where does it say directory is case sensitive? I'd expect it to be case sensitive on a case-sensitive file system, but MacOS isn't. Probe-file isn't case sensitive. Open isn't either.

After reading through the hyperspec's section on case in pathnames https://novaspec.org/cl/19_2_Pathnames#sec_19_2_2_1_2, I grant that you are more correct than I am. Technically, what matters is what argument is passed via the :case keyword when the pathname is constructed. I need to read through the ABCL code a bit more with this behavior in mind to see how conforming our behavior could possibly be. I have the feeling that we were never doing the right thing here, but could be surprised.

easye added a commit to easye/abcl that referenced this issue May 1, 2024
TODO test, and memoize per a suitable PATHNAME predicate whether a
given filesystem is case preserving.  Hook this implementation up.

Will resolve <armedbear#660>.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants