mthom / scryer-prolog

A modern Prolog implementation written mostly in Rust.
BSD 3-Clause "New" or "Revised" License
2.01k stars 117 forks source link

Consult not failing on syntax errors #2530

Open dougransom opened 1 week ago

dougransom commented 1 week ago

Downloaded the latest build from the github action artificacts. On Windows.

PS C:\Users\doug\code\prolog_workbook> & 'C:\users\doug\Downloads\scryer-prolog_windows-latest_x86_64-pc-windows-msvc (1)\scryer-prolog.exe' -v
12a61cd

I think should fail:

?- F="c:/users/doug/broken.pl", atom_chars(G,F), consult(G).
   F = "c:/users/doug/broke ...", G = 'c:/users/doug/broken.pl'.

and this also

?- consult(broken).
   true.

Here is c:/users/doug/broken.pl

foo(X) :X.

not even a prolog program.

what is going on.

 A : B.
bakaq commented 1 week ago

On Linux:

?- [broken].
   error(instantiation_error,functor/3).

Very unfortunate that none of the active developers of Scryer use Windows. I will try to reproduce this in Wine, because that would be a way to catch at least some of the Windows bugs.

dougransom commented 4 days ago

@bakaq I do keep thinking of buying a computer to run Linux on for hobby projects. Is is probably not common to run Scryer on windows.

bakaq commented 4 days ago

Still, Windows is a very big platform that we are basically unable to properly support currently, which is very unfortunate. I've not been able to cross-compile Scryer Prolog yet. Rust cross-compilation is surprisingly intricate, but I think it's mostly because I'm on NixOS which complicates everything.