-
Notifications
You must be signed in to change notification settings - Fork 503
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
"ignore-comments" does not completely ignore commented lines #2339
Comments
Thanks for the issue! This is definitely annoying, but it would be pretty hard to solve, and might not be worth the complexity. Whether or not I'll leave this open. A solution might be to defer parsing recipe bodies, but I honestly think the code for that might be so ugly that it won't be worth it. |
Thanks for the explanation! I totally understand why this happens now. 🙂 Would it be possible to have an option to print a recipe "as it it would be executed"? That might actually be better, because then it doesn't mean maintaining a copy of the command in a comment. For example, |
See also #2179
|
Yah, i think |
Ah! I don't know how I missed I do indeed think that will be an OK work-around given the previously-explained difficulties of trying to completely ignore comments. Thanks for the super-quick responses! (I'll leave it up to you if you want to keep this issue open, but completely understand if you want to consider it a "won't fix".) |
Nice, glad that works! I think I'm going to close this. It would be nice to fix it, but the fix would be to delay parsing recipe bodies and store them in an unparsed form, and then parse them later on, which would be super gross. |
Because both Docker and
just
use Go-style templates, it is necessary to escape any occurrences of{{
to{{{{
in various recipes that need to use Docker's--format
option.I put a comment in the recipe with the same command without escaping the
{{
, with the intention of being able to easily copy the command from thejustfile
and paste it (in a "ready-to-go" state) in to an arbitrary shell for debugging, systems withoutjust
, etc.For example:
However, the
{{
in the commented line causesjust
to fail — I have to escape them even though they are in the comment, which defeats my intended purpose.Any suggestions?
P.S. Thanks for
just
!The text was updated successfully, but these errors were encountered: