Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Requires #9

Closed
lebogan opened this issue Sep 18, 2022 · 2 comments
Closed

Requires #9

lebogan opened this issue Sep 18, 2022 · 2 comments
Labels
bug Something isn't working

Comments

@lebogan
Copy link

lebogan commented Sep 18, 2022

Is it possible to require a local file from within ic? This doesn't work, the file does exist:

ic(1.5.1):001> require "./myclass.cr"                                                           
In <top-level>:1:1

 1 | require "./myclass.cr"
     ^
Error: can't find file './myclass.cr'

ic(1.5.1):002> 

Thanks

@I3oris
Copy link
Owner

I3oris commented Sep 18, 2022

Hello @lebogan, thanks for reporting the issue!

I don't know yet why this is broken, there's probably something wrong with CRYSTAL_PATH, but I need to investigate this deeper.

As a work around you can do ic myclass.cr, but this doesn't open a RELP after executing the file.

@I3oris
Copy link
Owner

I3oris commented Sep 18, 2022

Find out what's going on!: it's not at all a problem with CRYSTAL_PATH, I have modified the location of the top level code in order display correct errors location and allow pry at top level (in 7341688). But I set an expanded location to nil instead of an empty string, and that causes the files to not be found.

I will push the fix soon.

@I3oris I3oris added the bug Something isn't working label Sep 18, 2022
@I3oris I3oris closed this as completed in 4bc124d Sep 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants