There's nothing hidden about the case insensitivity. The file `foo` and
`Foo` are the exactly the same. It doesn't pretend to be case-sensitive,
just case-preserving. I simply normalized the case in my response to be
consistent.

It'll recurse until it uses up the stack space (about 8MB) then error.

It didn't hang, it just very busy and acting like it has short-term memory
loss :)

Julia tries to load a file without the .jl extension before adding it to
satisfy the attempt at calling `using Foo`

On Mon, Sep 29, 2014 at 9:58 AM, Magnus Lie Hetland <[email protected]> wrote:

> I guess I'm still not being clear about this ;-) The script is named foo,
> not foo.jl, and certainly not Foo.jl, which would be the name of the module
> file. This is a *script*, which is trying to *import* a module. The
> module is in a file named Foo.jl – or, as in this example, it does not
> exist. My expectation would be to get an error, *not* for Julia to import
> the current script (which has the wrong name).
>
> Given this clarification, there seem to be two issues.
>
> 1. Julia tries to import a file named foo when I use using Foo. Not sure
> why it drops the .jl suffix, but maybe that's part of the standard attempt
> at importing? Anyway, there's an issue with "hidden" case insensitivity in
> OS X here.
>
> 2. The situation you're describing (which shouldn't occur at all in this
> case, but is still worth discussing in general). It seems to me that some
> basic circularity checking would be useful here – if nothing else, to
> generate a useful error, rather than an infinite import loop (which will, I
> guess, eventually use up all the memory of the computer…)
>
> So, for *both* these reasons, I don't think the script should hang, which
> it does. I.e., in my opinion, this seems to be a Julia bug. But maybe I'm
> wrong?
>

Reply via email to