luvit/luvit — Issue #89: require() cache
Author: dvv
Created: 2012-01-18 16:47:23+00:00
State: open

Luvit's require caches modules by their paths
Hence, formally, require('./foo') and require('bar/../foo') are considered different modules, though being identical by sense
This breaks assumption on that a module only initializes once
While seemingly a weak problem, i can be a PITA regarding luvit uses ../modules fallbacks during module lookup
Those, who use symlinks for organizing modules, should account for that
I do believe a module should be cached by it's _absolute_ path
Which is _resolved_ completely to contain no symlinks