mnussbaumer / cssex

An Elixir based and opinionated way to write CSS
MIT License
20 stars 0 forks source link

Watcher & Parser File error handling on missing @include improvement/fixes #37

Closed mnussbaumer closed 3 years ago

mnussbaumer commented 3 years ago

Paths for includes were being retrieved relatively to the entry pointfile, so if a file included another file and that file included another, this include would need to reference the relative path relative to the entry, while it's more intuitive to be relative to the file including it

When a missing file in an @include statement occurred the watcher would crash as the parser ctx was being returned with a file value of nil, now the parser passes on the dependency tree down to newly started parsers and in case a file misses it includes itself as the file this allows the watcher to setup correct watching for that file and not crash