mattwparas / steel

An embedded scheme interpreter in Rust
Apache License 2.0
981 stars 46 forks source link

Fix load cmd error handling in repl #196

Closed glenn-m closed 2 months ago

glenn-m commented 2 months ago

Fixes https://github.com/mattwparas/steel/issues/167

Noticed some bugs in the :load repl command.

See below for example of new error handling:

     _____ __            __
    / ___// /____  ___  / /          Version 0.5.0
    \__ \/ __/ _ \/ _ \/ /           https://github.com/mattwparas/steel
   ___/ / /_/  __/  __/ /            :? for help
  /____/\__/\___/\___/_/

λ > :?

        :time       -- toggles the timing of expressions
        :? | :help  -- displays help dialog
        :quit       -- exits the REPL
        :pwd        -- displays the current working directory
        :load       -- loads a file

λ > :load
No file provided
λ > :load non-existent.scm
No such file or directory (os error 2)
λ > :load hello.scm
Hello World
λ (hello.scm) > 

Let me know if anything needs changed as I'm fairly new to Rust!

glenn-m commented 2 months ago

I believe this is failing due to https://github.com/mattwparas/steel/issues/192

mattwparas commented 2 months ago

I believe this is failing due to #192

Changes lgtm - I'll work on the build

mattwparas commented 2 months ago

Not sure why the toml changes are showing up in your diff...

glenn-m commented 2 months ago

Not sure why the toml changes are showing up in your diff...

Huh, not sure how I messed that rebase up. Should be fixed now.

Thanks again for patching lasso so the builds pass!

mattwparas commented 2 months ago

Not sure why the toml changes are showing up in your diff...

Huh, not sure how I messed that rebase up. Should be fixed now.

Thanks again for patching lasso so the builds pass!

Thank you for the fix!