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

includet fails when file is opened in subdirectory #264

Closed
aterenin opened this Issue Apr 2, 2019 · 2 comments

Comments

Projects
None yet
2 participants
@aterenin
Copy link

commented Apr 2, 2019

To reproduce do the following.

  1. Open an Atom project and create a subfolder code in that project.
  2. Create a file code/code.jl in that subfolder.
  3. Create a file code/imports.jl also in that subfolder.
  4. Open code.jl in Atom, add the like includet("imports.jl"), and run.

The error given is xxxxxx.jl is not a file. On the other hand, using include works fine.

If we change the code to instead say includet("code/imports/jl") then Julia will instead attempt to import code/code/imports which doesn't exist.

@timholy

This comment has been minimized.

Copy link
Owner

commented Apr 5, 2019

I think you have a typo; `includet("code/imports.jl") (note the dot rather than the slash) works for me.

But I fixed this in #276. Also a note, if you're using complex paths, you might want to consider just making that code a package and then Revise will do it all automatically when you use using or import. includet is really intended for quick hacks.

@aterenin

This comment has been minimized.

Copy link
Author

commented Apr 5, 2019

Sorry, typo is only present in MWE and not my code.

Thanks for the quick fix!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.