-
Notifications
You must be signed in to change notification settings - Fork 25
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
Don't pass entire file contents as template parameter #69
Comments
I also noticed that this seems to have slipped in again, although I'm pretty sure I fixed it at some point by passing an alias to a |
Ah, OK. I misread the fact that it is an alias and not the string itself. Are we sure that aliases to a static immutable string don't translate into the string itself? I know I have had cases when developing a new feature for diet-ng that I have seen stack traces or compiler errors (can't remember which) where the entire contents of the file are displayed as part of the symbol. But that could possibly be because I'm passing in the string directly to |
I'm also unsure where I saw it, but I also did see it (it could have just been an old diet-ng version, though). Unfortunately it doesn't seem to occur for normal errors, so I guess this has to rest until it shows up again. |
Okay, just got an error message citing the whole source code. In fact it's not a template instantiation, but a CTFE call stack that lists all function arguments as stringified expressions. It can be fixed by using |
Nice! Yeah, I forgot to come back to this, I saw it also, Seems to happen when you have a syntax error in your diet file that causes the diet parsing to fail. |
This explodes all the symbols inside to huge amounts as the file contents become part of the symbol (and all nested symbols). Not sure how much this will reduce the resulting footprints, but definitely worth looking at. At least compiler errors and exception traces will look more reasonable.
The text was updated successfully, but these errors were encountered: