Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0003725OCamlOCaml generalpublic2005-07-16 19:042013-07-31 00:01
Reporteradministrator 
Assigned To 
PrioritynormalSeverityfeatureReproducibilityalways
StatusacknowledgedResolutionopen 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version 
Summary0003725: Ocamldep should search for .mly & .mll files
DescriptionFull_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.

Tagsjunior_job
Attached Files

- Relationships
related to 0004519acknowledged Interior files handled in ocamldep 
related to 0005216acknowledged ocamldep should be aware of .mll and .mly files by default 
related to 0006110confirmed -impl-suffix missing in the compiler. 

-  Notes
(0003676)
nogin (reporter)
2006-06-12 22:02

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").
(0009947)
gasche (developer)
2013-07-28 22:53
edited on: 2013-07-28 22:53

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.

(0009957)
lpw25 (developer)
2013-07-29 01:06

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).
(0010029)
vbmithr (reporter)
2013-07-30 23:58

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.

- Issue History
Date Modified Username Field Change
2005-11-18 10:13 administrator New Issue
2006-06-12 22:02 nogin Note Added: 0003676
2009-08-19 13:20 xclerc Relationship added related to 0004519
2011-06-06 16:14 xclerc Relationship added related to 0005216
2013-07-28 22:52 gasche Tag Attached: junior_job
2013-07-28 22:53 gasche Note Added: 0009947
2013-07-28 22:53 gasche Note Edited: 0009947 View Revisions
2013-07-29 01:06 lpw25 Note Added: 0009957
2013-07-30 23:58 vbmithr Note Added: 0010029
2013-07-31 00:01 lpw25 Relationship added related to 0006110


Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker