-
Notifications
You must be signed in to change notification settings - Fork 323
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
@imports for missing files are silently ignored #124
Comments
Good point James! How about showing a warning and leaving @import as it is? On 8 Aug 2013, at 01:32, James Coglan notifications@github.com wrote:
|
Having thought about it some more I can't think of a situation where I would want a missing file to be treated as okay. I think you should throw an error if any referenced file does not exist. |
Broken import means file is no present or a path is broken but throwing an error could break scripts which rely on this feature. I'd go for a warning instead of an error. |
What I'm saying is I want scripts that try to compile CSS with broken references to crash. A warning is far too easy to ignore. Your CSS compile is something you tend to set up for a project and forget about, rather than something you interact with frequently, so it needs to make a lot of noise when something goes wrong so that it gets noticed. How would you even emit warnings in a way the user would notice? |
I think you are right, warning is not enough for a situation when broken reference ends up on production servers. Since that's a breaking change we would need a clean-css 1.1. Consider it accepted! |
@jcoglan - so it's ready! Since it's a breaking change so we will release it as a part of clean-css 1.1. |
Thank you! |
Likewise! On 30 Aug 2013, at 10:25, James Coglan notifications@github.com wrote:
|
@jcoglan clean-css 1.1 is out with fix to this issue included. Cheers! |
Maybe I'm missing something but it seems like a bad idea to silently skip
@import
statements that reference files that don't exist, replacing them with the empty string. Wouldn't it be a better idea to either throw an error or leave the unresolvable@import
statement in the output, on the assumption it references a file available at runtime but not at compile time?The text was updated successfully, but these errors were encountered: