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 should search for .mly & .mll files #3725
Comments
Comment author: nogin I think that .mly and .mll are just one case of a more general problem - people often use various tools for generating the source files. And those tools are often custom to a project and use custom extensions. For example, the Harmony project generates .mly from .srcy. My proposal would be to have ocamldep take a list of "implementation suffixes" and another list of "interface suffixes" on the command line. This way ocamldep without any special options would be equivalent to something like ocamldep -intf .mli -intf .mly -impl .mli -impl .mll -impl .mly and people with non-standard extensions would be able to add them to the list ("-impl .srcy"). |
Comment author: @gasche I think the feature proposal of nogin is sound and would make for a good (but non-trivial) "junior job". Adding .mll and .mly to the base set of implementation extensions would also solve the related issue. |
Comment author: @lpw25 The compiler already has an "-intf-suffix" option that allows you to specify the suffix for interface files, so it certainly makes sense to add "-intf-suffix" and "-impl-suffix" options to ocamldep. (It probably also makes sense to add "-impl-suffix" to the compiler). |
Comment author: vbmithr I opened the issue 6110 that addresses the -impl-suffix option in the compiler. Regarding the -intf-suffix/-impl-suffix in ocamldep, it seems that the already existing options -ml-synonym/-mli-synonym are already providing this feature, and thus no further modification is needed. The thing that is currently not done is to automatically add some files extensions to the list of synonyms, but it is probably not as crucial nowadays with the existence of -ml-synonym/-mli-synonym. |
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. |
Original bug ID: 3725
Reporter: administrator
Status: acknowledged
Resolution: open
Priority: normal
Severity: feature
Category: tools (ocaml{lex,yacc,dep,debug,...})
Tags: junior_job
Related to: #4519 #5216 #6110
Monitored by: n8gray nogin
Bug description
Full_Name: Mike Furr
Version: 3.08.3
OS: linux
Submission from: pcp0010743271pcs.howard01.md.comcast.net (69.243.84.108)
Ocamldep outputs a dependency only for those modules which it can find in the
current search path. However, this search only looks for files ending in .ml or
.mli. Thus if a module uses a lexer or parser defined in a .mll or .mly file,
the dependency will not be shown if these have not yet been compiled into their
respective implementation files. As I typically setup my projects to build
dependencies before any compilation (including that of .mll and .mly files), it
would be nice if ocamldep searched for these file extensions as well.
The text was updated successfully, but these errors were encountered: