-
Notifications
You must be signed in to change notification settings - Fork 5
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
3C needs a better way to output multiple files. #347
Comments
As we discussed at today's meeting, the most basic solution is to have a flag to redirect paths relative to 3C's existing In some scenarios that use an output directory, an option to write files even if they are identical to the originals (#328) may be especially helpful. |
I'm thinking of going ahead and implementing
I'm unsure whether it will prove efficient to try to address #328 at the same time. Inasmuch as it might, I'd also appreciate design feedback there. |
Error seems good, yes, even if the file doesn't need changes.
I don't recall what If I am guessing this right, an error seems good (i.e., same behavior as when you pass two files to the command line but don't set the output directory/suffix).
|
All When
I learned that it is already an error, but it is an assertion error and it should just be a nonzero exit. I'll fix that as part of this issue; I don't think it's worth filing another.
This is now being discussed in #328 (comment).
This is moved to #387. |
I agree with what you have: Yes, to your first question: Make it an error, and Yes, fix the assertion error to be a proper error. |
- Add -output-dir option to write updated files to a directory structure parallel to the base dir (#347). When -output-dir is used, a source file outside the base dir can't be handled because there is no way to compute its output path. For consistency, this is now an error even when -output-dir is not used. - Convert all 3C regression tests from -output-postfix to -output-dir to avoid leaving temporary files in the clang/test/3C directory (#378). - Expand "3c -help" documentation. In particular, direct the user to pass "--" when they don't want to use a compilation database to avoid accidentally using unwanted compiler options and suppress the warning if no compilation database is found (#343). - For consistency, have stdout mode output the main file even if it is unchanged (#328). - Fix bugs in matching of file paths against the base dir (#327). - Other minor bug fixes: see the pull request description for details. Co-authored-by: John Kastner <[email protected]>
3C can output results to stdout, or to file using the
-output-postfix=
option. This works fine for single file conversions, and reasonably well for small projects. But stdout can't be redirected to multiple files if there were multiple inputs, and post-fixed files have limited options for names and locations. We need to brainstorm, discuss, and implement a better permanent solution.The text was updated successfully, but these errors were encountered: