Skip to content
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

Support for passing more parameters from external files #5937

Closed
vicuna opened this issue Mar 3, 2013 · 14 comments
Closed

Support for passing more parameters from external files #5937

vicuna opened this issue Mar 3, 2013 · 14 comments

Comments

@vicuna
Copy link

vicuna commented Mar 3, 2013

Original bug ID: 5937
Reporter: @elfring
Status: acknowledged (set by @zoggy on 2013-08-05T09:13:56Z)
Resolution: open
Priority: high
Severity: feature
Category: tools (ocaml{lex,yacc,dep,debug,...})
Related to: #7050
Monitored by: @elfring @ygrek

Bug description

A tool like "ocamldoc 3.12.1" expects so far that it gets some parameters passed on the command line. The command line length might be limited.
http://www.gnu.org/software/automake/manual/html_node/Length-Limitations.html

I suggest to improve the way in which more data can be optionally passed by external files.

  • Response files
  • I am particularly interested in efficient data exchange for file names and paths from the tool "find" (and corresponding variants) which might be (temporarily) stored in other text files.

Which command option should indicate a switch to a different data source?

@vicuna
Copy link
Author

vicuna commented Aug 5, 2013

Comment author: @zoggy

I put it in the "OCaml general" category, as ocamldoc is not the only tool of the suite who could be added such a command line option, and the code could obviously be shared among the various compilers and tools.

@vicuna
Copy link
Author

vicuna commented Aug 5, 2013

Comment author: @gasche

Between 3.12 and 4.00 we went in the other direction: there was limited support for response files for Windows and we removed it, feeling that command-line length limitations were large enough now for all relevant platforms that this cruft wasn't needed anymore -- removing code is one way to decrease maintenance costs.

It might be the case that a portable general-purpose mechanism for option-passing from a text-file could be useful for OCaml. You would have to propose very convincing use-cases for this to be considered for inclusion, though.

@vicuna
Copy link
Author

vicuna commented Aug 5, 2013

Comment author: @elfring

I would like to avoid line length limitations in a portable way. I would appreciate if it will become safer to pass a long list of file names also for OCaml commands.

@vicuna
Copy link
Author

vicuna commented Aug 6, 2013

Comment author: @ygrek

Do you really experience command line length limitation? Can you please share the details - what platform, which command?

@vicuna
Copy link
Author

vicuna commented Aug 6, 2013

Comment author: @elfring

How likely is it to keep file lists and corresponding parameters within bounds?

Do you care for the configuration setting "ARG_MAX"?
http://www.in-ulm.de/~mascheck/various/argmax/

@vicuna
Copy link
Author

vicuna commented Mar 2, 2017

Comment author: @damiendoligez

Note: this is implemented by #843 and #890 for:
ocamlc
ocamlopt
dumpobj
objinfo
ocamlcp
ocamloptp
ocamldep
ocamlprof
primreq
read_cmt

Unfortunately, ocamldoc is not in this list. See #843 for the list of missing tools.

#843: #843
#890: #890

@elfring
Copy link

elfring commented Apr 15, 2019

I am still curious how affected software components will be improved also for this issue.

@gasche
Copy link
Member

gasche commented Apr 15, 2019

As far as I know, no one is actively working on this, but then enabling support is usually not much work so pull requests are welcome.

Note: since the comment by Damien above, ocaml (previously in the list of missing tools) got support for --args{,0}, so I guess the only important user-visible tools left (without support) are:

  • ocamldoc
  • ocamllex
  • ocamlyacc
  • ocamlmklib
  • ocamlmktop

@damiendoligez
Copy link
Member

As noted in #843 (comment) it would not make sense to implement it for ocamlyacc and ocamllex, so we're left with:

  • ocamldoc
  • ocamlmklib
  • ocamlmktop

@nojb
Copy link
Contributor

nojb commented Aug 2, 2019

As noted in #843 (comment) it would not make sense to implement it for ocamlyacc and ocamllex, so we're left with:

  • ocamldoc
  • ocamlmklib
  • ocamlmktop

ocamlmklib has already been done in #2045

@github-actions
Copy link

github-actions bot commented Aug 3, 2020

This issue has been open one year with no activity. Consequently, it is being marked with the "stale" label. What this means is that the issue will be automatically closed in 30 days unless more comments are added or the "stale" label is removed. Comments that provide new information on the issue are especially welcome: is it still reproducible? did it appear in other contexts? how critical is it? etc.

@github-actions github-actions bot added the Stale label Aug 3, 2020
@github-actions github-actions bot closed this as completed Sep 2, 2020
@damiendoligez
Copy link
Member

ocamldoc is nearing end-of-life, so the only remaining one is ocamlmktop. Does anyone want to work on it or argue that it isn't needed? Does it sometimes make sense to pass a long list of files as argument to ocamlmktop?

@damiendoligez damiendoligez reopened this Jan 13, 2021
@github-actions github-actions bot removed the Stale label Jan 15, 2021
@nojb
Copy link
Contributor

nojb commented Jan 16, 2021

ocamldoc is nearing end-of-life, so the only remaining one is ocamlmktop. Does anyone want to work on it or argue that it isn't needed? Does it sometimes make sense to pass a long list of files as argument to ocamlmktop?

I believe ocamlmktop already supports -args and -args0 by virtue of passing its comand line args verbatim to ocamlc:

let cmdline =
extra_quote ^ ocamlc ^ " -I +compiler-libs -linkall ocamlcommon.cma " ^
"ocamlbytecomp.cma ocamltoplevel.cma " ^ args ^ " topstart.cmo" ^
extra_quote

@github-actions
Copy link

This issue has been open one year with no activity. Consequently, it is being marked with the "stale" label. What this means is that the issue will be automatically closed in 30 days unless more comments are added or the "stale" label is removed. Comments that provide new information on the issue are especially welcome: is it still reproducible? did it appear in other contexts? how critical is it? etc.

@github-actions github-actions bot added the Stale label Jan 19, 2022
@gasche
Copy link
Member

gasche commented Jan 19, 2022

The vast majority of ocaml tools supports the -args/-args0 convention by now, and we are not sure about a few remaining ones that nobody seems to care about enough to test and/or patch (contributions are of course welcome). Closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants