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
ocamldep -one-line doesn't work with -sort #6968
Comments
Comment author: @gasche The --help documentation is rather bad, but the semantics are as follow: -sort enabled: just output the list of files in topological order -sort not enabled: output pairs (target_files : dependencies) -one-line enabled: all dependencies on one line -one-line not enabled: with line cuts to not overflow 80 columns The semantics of (-sort -one-line) is currently not defined, and in fact the current implementation of -sort will always print the list of files on one line only. Would you prefer the combination -sort -one-line to be rejected, or some other semantics to be given to it? |
Comment author: @dbuenzli I think it would be nice that it does what it is supposed to do. For example this could be useful for tools to correctly handle the cases when paths have spaces in them. |
Comment author: @gasche I don't follow: what is |
Comment author: @dbuenzli
|
Comment author: @dbuenzli Ah sorry just completely misundestood. |
Comment author: @dbuenzli My brain was reading one-per-line. |
Comment author: @dbuenzli Well actually it's not only my brain :
|
Comment author: @gasche The "one line per file" comment is trying to say that for each target, all its dependencies are displayed on the same line (instead of having line cuts to not overflow 80 columns). Regardless of what the documentation says or the implementation does, I find the output you suggest rather counter-intuitive for an option whose name suggest that the output will be "on one line" -- and it would be contradictory with the behaviour of -one-line in absence of -sort, which is the one that is actually implemented and that (I suppose) some people use. I'm open to suggestions of how to fix the documentation and/or implementation. |
Comment author: @dbuenzli Well I don't really care about the name but at least documentation should be fixed since reading:
You can legitimately see why I understand this that way. Besides I really think that what I understood should be provided. In the current state it's impossible to use ocamldep with file paths that have spaces in them. |
Comment author: @gasche I do understand your point, and I agree the documentation should be fixed. How does make handle files with spaces in them? ocamldep should be Makefile-compatible, but if for example always quoting filenames that have spaces preserves compatibility, we could do that. (I would also be fine with changing "ocamldep -sort -one-line" to do as you expect. In that case, I would be interested in a suggestion for a -help message for -one-line and/or -sort that would clarify the behavior of -one-line both with and without -sort. Don't be shy, I know you rock at documentation.) |
Comment author: @dbuenzli
Well if you fix it for |
Comment author: @gasche Fair enough. Thanks! |
I think @gasche PR's solves this issue and it can be closed. |
Actually it's not. But I think it's easier for me to work around. |
Original bug ID: 6968
Reporter: @dbuenzli
Status: confirmed (set by @gasche on 2015-08-25T17:43:22Z)
Resolution: open
Priority: normal
Severity: minor
Version: 4.02.3
Category: tools (ocaml{lex,yacc,dep,debug,...})
Tags: junior_job
Monitored by: @dbuenzli
Bug description
The text was updated successfully, but these errors were encountered: