The Crystal Programming Language Forum

Require - clarification

Hi All

I’m just after some clarification on ‘require’ (I’m new to Crystal so still learning). The docs state that ‘require “foo”’ would look for foo in the standard library or in ‘lib’ (as either OR foo/ However when I require foo and foo is a Shard it will look in ‘lib/foo/src/’ because the compiler knows foo is a Shard.

Is the above correct about Shards or have I misunderstood something.



Hi and welcome!

The docs are outdated. I just sent a PR to fix this:

1 Like

Perfect - many thanks for the update. Thank you also for such a fantastic language.



It’s fixed now! :slight_smile: