-
Notifications
You must be signed in to change notification settings - Fork 13.4k
extend --dep-info flag with variant that emits just the list of files to stdout #11702
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
Comments
�Now that I've implemented the workaround myself, it seems simple enough to do within one's tool. So this is not a terribly high priority, and in fact maybe I'll close it. (The only reason I have not closed this ticket already is that it does seem weird that we only support emitting the filenames in the makefile dependency format,.) |
While it is true it wasn't that hard to work around, I think its easier to redirect to a file when a file is required, rather than the reverse.
One issue that I hit in my CMake macros with this is that this precludes filenames with spaces in them, despite CMake, in principle, supporting them with some backends (e.g. via Ninja, afaik). |
@SiegeLord of course, any output format has to deal with the embedded spaces problem in the general case ... what do you think a hypothetical
I am making an implicit assumption here that paths with embedded spaces are more common than embedded newlines or embedded quotation marks; does that sound right? An aside: The last time I had to wrestle with embedded spaces on a serious project, I ended up bailing on trying to handle the embedded spaces themselves (which were coming from absolute paths on good old Windows), and instead I changed the build infrastructure so that (A sad thing is that adopting either of these proposals will make my typical use case harder, but that's okay.) |
Truth be told, I was thinking of using newlines. I note that our other build-system helpers already have issues with filenames with newlines in them (e.g. |
On Unix, the expectation is stdout unless told otherwise.
|
The original motivation here has been subsumed by Cargo, is this still something we would want? |
Not sure how, as Cargo can't generate makefiles. In many ways, a makefile is still easier/less intrusive than creating a cargo project. Additionally, cargo isn't something that will be accepted in places like Debian which are very conservative about what build systems are allowed (although maybe not, if cargo is bundled with rustc). To the extent that --dep-info still exists, it's behaviour is still a bit annoying. In some ways it's gotten worse, as it now appends a pointless '.d' to the output file name. |
Cargo is actively hostile to being used as/with a system package manager: rustc can't link to If Rust is ever going to become a Systems Language(tm) in the sense that we implement system libraries to be built, installed and depended on with standard system utilities, Cargo will need a serious overhaul. |
Triage: nothing has happened here for a long time; @pnkfelix, do you still think this would be useful? |
yeah I'll just close this. I still think there's a good case that this problem should be fixed, but its probably part of a more general overhaul to integrate better with tools other than |
For whipping up a quick makefile, I would prefer to be able to just call the command to generate the list of filenames.
The current workaround, AFAICT, would be to generate the dep-info to a temporary file, and then parse the that output to remove the
target-filename:
prefix that comes before the list of deps.The text was updated successfully, but these errors were encountered: