gracelang / minigrace

Self-hosting compiler for the Grace programming language
39 stars 22 forks source link

Fixed bug that prevents any fresh grace code from running #319

Closed IsaacOscar closed 4 years ago

IsaacOscar commented 4 years ago

I was unable to run any grace code I created, even something as trivial as touch empty.grace; mgc empty.grace would cause a method not found error.

The problem line being filePath.fromString(name), which makes no sense because name is already a filePath and not a string.

Suffice it to say, my commit has fixed the issue and I can no run grace code again!

apblack commented 4 years ago

This is already fixed in another branch, but I have not made that branch master because of other issues that means it is not ready for prime time.

In response to this PR, I've cherry-picked my fix (commit 899aa39d64804a1bb75eeeb78e9a704064f4a48e), which is just the opposite of yours — I think because name is not always a file path.

I must admit to being surprised that you could not run any code, since the test suite runs both locally and on Travis-CI

It's running the test suite now; I'll push shortly.

IsaacOscar commented 4 years ago

Thank you, it works now!

IsaacOscar commented 4 years ago

I'm not sure about "any" code, but I certainly couldn't run any of the code I wrote (which had no corresponding ".js" files, perhaps that's relevant)