Closed aiverson closed 4 years ago
That should send out error messages when trying to load a terra file without terra available.
Should it be sending error messages when the module is loaded instead?
And should it be reporting the error by publishing it, or by calling error
?
Any comments on this? Can it be merged?
This looks good to me, but I don't remember enough to know whether error handling works properly in the file loaders. I think it does, and it would be nice to have less places for errors to be published. @Tieske did you have any more feedback?
If you have a better idea for how to report an error, I'd love to hear it.
did you have any more feedback?
No
@aiverson can you just error()? If not let me know and we'll get this merged.
I don't know. This seemed to be how Busted was reporting errors in a number of other places. I'll go experiment on what the difference between just calling error and publishing the error.
It relates to this: https://github.com/Olivine-Labs/busted/pull/577
trying to load terra files without terra should be a hard error similar to the LuaCov issue
There?
A quick and simple fix to allow testing code from the latest version of terra rather than a four year old alpha build. Currently working.
Further revisions to come after changing terra to provide a requirable module to scripts running inside it that matches the library requireable from outside terra so that
require "terra"
will work.That would allow using busted regardless of running it from the terra executable or luajit.