urweb / urweb

The Ur/Web programming language
http://www.impredicative.com/ur/
Other
807 stars 65 forks source link

`ffi` directive doesn't take `.urs` extension #257

Open philderbeast opened 5 months ago

philderbeast commented 5 months ago

In section [The Foreign Function Interface]:

Could we change the docs snippet above so that it starts with ffi FILE without the .urs extension?

$ urweb site -protocol static
Filename contains a character that isn't alphanumeric or underscore: dateTimePickerFfi.urs
unhandled exception: Io: openIn "/.../dateTimePickerFfi.urs.urs" failed with
SysErr: No such file or directory [noent]

The urweb/upo repo doesn't have any ffi directives with .urs extension and neither do any of the tests in this repo.

$ grep "ffi.*" **/*.urp
chartjs.urp:ffi chartjsFfi
ckeditor.urp:ffi ckeditorFfi
dateTimePicker.urp:ffi dateTimePickerFfi
fullCalendar.urp:ffi fullCalendarFfi
lib.urp:ffi upoFfi
select2.urp:ffi select2Ffi

$ grep "ffi" **/*.urp
tests/attrMangle.urp:ffi goofy
tests/cffi.urp:cffi
tests/clib.urp:ffi test
tests/ffieff.urp:ffi ffi_eff
tests/ffieff.urp:ffieff
tests/ffisub.urp:ffi ffisub
tests/ffitag.urp:ffi tagffi
tests/ffitag.urp:ffitag
tests/polyjs.urp:ffi polyjsFfi
tests/setInner.urp:ffi ffi
tests/transactional.urp:ffi transactional
philderbeast commented 5 months ago

The section [Command-Line Compiler|Project Files] has a better description: