On Mon, May 13, 2024 at 08:52:12PM +0800, Qian Yun wrote: > The following patch works. > > Do we need to compare PATHNAME_-DEVICE as well > (returns "C" in this case) in 'isSystemDirectory'?
I would prefer different approach. I mean, the patch may be correct solution to problem "Do two Windows paths point to the same file?" (for such problem you probably want to include PATHNAME_-DEVICE). What I do not like is fact that this would propagate Windows weirdness deper into FriCAS code. Pathname here comes from 'get_database' and in 'get_database' be have if key = 'OBJECT then if CONSP(data) then data := first(data) if NULL(PATHNAME_-DIRECTORY(data)) then data := STRCONC($spadroot, '"/algebra/", data, '".", $lisp_bin_filetype) data So, returned patname has '$spadroot' as a prefix and AFAICS all we need is to avoid mangling the pathname. Maybe just remove 'pathnameDirectory' call (that is use first part of the patch without the second part). > - Qian > > diff --git a/src/interp/lisplib.boot b/src/interp/lisplib.boot > index 9c37eacc..b11d9603 100644 > --- a/src/interp/lisplib.boot > +++ b/src/interp/lisplib.boot > @@ -71,7 +71,7 @@ loadLibIfNotLoaded libName == > loadLib cname == > startTimingProcess 'load > fullLibName := get_database(cname, 'OBJECT) or return nil > - systemdir? := isSystemDirectory(pathnameDirectory fullLibName) > + systemdir? := isSystemDirectory(fullLibName) > update? := not systemdir? > loadLibNoUpdate1(cname, fullLibName) > kind := get_database(cname, 'CONSTRUCTORKIND) > diff --git a/src/interp/pathname.boot b/src/interp/pathname.boot > index 7bd1f1b3..5a81eb49 100644 > --- a/src/interp/pathname.boot > +++ b/src/interp/pathname.boot > @@ -61,4 +61,7 @@ isExistingFile f == > > --% Scratchpad II File Name Functions > > -isSystemDirectory dir == EVERY(function CHAR_=,$spadroot,dir) > +isSystemDirectory file == > + p1 := BUTLAST PATHNAME_-DIRECTORY file > + p2 := PATHNAME_-DIRECTORY pad_directory_name $spadroot > + p1 = p2 > > > On 5/13/24 19:52, Qian Yun wrote: > > Yes, make 'updateCategoryTable' a no-op and the problem goes away. > > > > As for the system directory issue: > > > > (3) -> )boot get_database('Integer, 'OBJECT) > > > > (EVAL-WHEN (:EXECUTE :LOAD-TOPLEVEL) > > (PROG () (RETURN (|get_database| '|Integer| 'OBJECT)))) > > Value = > > "C:/msys64/home/oldk1331/build/target/x86_64-w64-mingw32/algebra/INT.fasl" > > (3) -> )boot pathnameDirectory get_database('Integer, 'OBJECT) > > > > (EVAL-WHEN (:EXECUTE :LOAD-TOPLEVEL) > > (PROG () (RETURN (|pathnameDirectory| (|get_database| '|Integer| > > 'OBJECT))))) > > Value = "/msys64/home/oldk1331/build/target/x86_64-w64-mingw32/algebra/" > > (3) -> )boot isSystemDirectory pathnameDirectory get_database('Integer, > > 'OBJECT) > > > > (EVAL-WHEN (:EXECUTE :LOAD-TOPLEVEL) > > (PROG () > > (RETURN > > (|isSystemDirectory| > > (|pathnameDirectory| (|get_database| '|Integer| 'OBJECT)))))) > > Value = NIL > > > > > > I'll look into where this originates and how to fix it. > > > > - Qian > > > > On 5/13/24 19:05, Waldek Hebisch wrote: > > > On Mon, May 13, 2024 at 06:32:10PM +0800, Qian Yun wrote: > > > > I modified i-coerce.boot, then in FRICASsys, > > > > )read i-coerce > > > > )lisp (defun GLESSEQP (X Y) (BREAK)) > > > > series(sin x) > > > > > > > > The above has no problem in Linux, but fails under > > > > windows, backtrace is in attachment. > > > > > > AFAICS there is something wrong on Windows with detection of > > > system directories. "Integer" is system domain and > > > 'updateCategoryTable' should not be called for it. > > > > > > On Linux, when I force call to 'updateCategoryTable' I get > > > the same failure as on Windows. > > > > > > In principle extra 'updateCategoryTable' should cause no trouble, > > > ATM I do not know why it triggers failue in the test. > > > > > -- > You received this message because you are subscribed to the Google Groups > "FriCAS - computer algebra system" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to fricas-devel+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/fricas-devel/7c1898ff-ed3e-4f9d-b74c-06796d644e2d%40gmail.com. -- Waldek Hebisch -- You received this message because you are subscribed to the Google Groups "FriCAS - computer algebra system" group. To unsubscribe from this group and stop receiving emails from it, send an email to fricas-devel+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/fricas-devel/ZkJQfcWrAZ4fOqv6%40fricas.org.