| Anonymous | Login | Signup for a new account | 2013-05-21 19:16 CEST | ![]() |
| Main | My View | View Issues | Change Log | Roadmap |
| View Issue Details [ Jump to Notes ] | [ Issue History ] [ Print ] | ||||||||||
| ID | Project | Category | View Status | Date Submitted | Last Update | ||||||
| 0005547 | OCaml | OCamlbuild (the tool) | public | 2012-03-20 10:47 | 2012-09-21 13:36 | ||||||
| Reporter | gasche | ||||||||||
| Assigned To | meyer | ||||||||||
| Priority | normal | Severity | feature | Reproducibility | N/A | ||||||
| Status | assigned | Resolution | open | ||||||||
| Platform | OS | OS Version | |||||||||
| Product Version | |||||||||||
| Target Version | Fixed in Version | ||||||||||
| Summary | 0005547: Enable the "-use-ocamlfind" option by default | ||||||||||
| Description | Ocamlfind is everywhere these days and I frequently forget to add the "-use-ocamlfind" knob to enable the nifty "package(foo)" syntax. I'm not sure why it was enabled by default (maybe there was a conflict in semantics somewhere) but I would like it if it became the standard (with why not an opt-out option "-no-ocamlfind"). It would be useful in particular when used with Oasis, which currently has the limitation that we can't pass command-line parameters to the ocamlbuild invocation directly. That's a bug that will eventually be fixed, but there may be similar situations present in other tools. | ||||||||||
| Tags | No tags attached. | ||||||||||
| Attached Files | |||||||||||
Relationships |
||||||
|
||||||
Notes |
|
|
(0007110) gasche (developer) 2012-03-20 10:50 |
I have discussed this with xclerc and he agrees on principle -- but we should try to get feedback from the original implementors, npouillard and Romain Bardoux, before making changes. I'm directly marking the issue "acknowledged" to avoid burdening the bug triagers. (Of course, feedback is still welcome.) |
|
(0007116) dbuenzli (reporter) 2012-03-20 11:59 |
Just two things. 1) What happens if you don't have ocamlfind installed ? The tool should still work IMHO. 2) For me I still have to invoke it sometimes without the option because of PR 0005531 |
|
(0007246) william (reporter) 2012-03-29 17:50 |
For your information, I support this feature. - having the option activated by default would be very nice, and one could deactivate it with "-no-ocamlfind". - or activate it automatically when tag "package" is used This is related to bug 0005406 |
|
(0007568) meyer (developer) 2012-06-18 22:28 |
I agree with ubiquity of ocamlfind we should support it. So based on your observations here are the remarks: - ocamlbuild should still work if ocamlfind is not present and emit warning if any of the ocamlfind tags are used but findlib is not installed - this requires of course a check - ocamlbuild should not fallback to ocamlfind (sounds a bit complicated) when none of the features ocamlfind are used. I have reservation to this point. - it should show a nice error message if anybody tries to use any of these ocamlbuild tags, but again I am reserved about this - as one can imagine wants to override tags in the plugin, so extensibilty is maybe more important. - there should be switch - -no-ocamlfind, where we shouldn't look at all if ocamlfind is installed - of course it needs proper documentation and -use-ocamlfind switch marked as deprecated |
|
(0007576) william (reporter) 2012-06-19 09:20 edited on: 2012-06-19 09:23 |
Hello, meyer, I would amend the behaviour that you imagined. The main principle would be not to have too many "automatic" features that often become a nightmare for both the developer and the user. What I would suggest : - "-no-ocamlfind" is used : ocamlbuild does not try to use ocamlfind, and warns if ocamlfind tags are used - "-no-ocamlfind" is not used : ocamlbuild tries to use ocamlfind, and makes an error if ocamlfind is not found, telling that ocamlfind is not found, and either to install findlib or to use "-no-ocamlfind" based on your remarks, two would be modified : - ocamlbuild should WORK WHITHOUT OCAMLFIND IF "-no-ocamlfind" IS USED and emit warning if any of the ocamlfind tags are used but findlib is not installed - this requires of course a check - ocamlbuild should not fallback to ocamlfind (sounds a bit complicated) when none of the features ocamlfind are used. I have reservation to this point. => not applicable And finally, the other possibility is do the exactly the opposite : - if no tag is given, ocamlbuild does not try to use ocamlfind, and warns if ocamlfind tags are used - if "use-ocamlfind" is given, use ocamlfind, and fails if ocamlfind is not found. In this case, there is mainly only warnings to add to the current ocamlbuild version. This is what I implemented locally (did not have time yet to provide patch). But I think this solution is not as good as the one with "-no-ocamlfind". Regards |
|
(0007995) meyer (developer) 2012-09-01 15:19 |
Agreed. We'll mark the -use-ocamlfind switch as deprecated in this case. |
|
(0008024) william (reporter) 2012-09-04 22:59 |
Related to this, It seems that ocamlbuild tries to simulate ocamlfind behaviour itself (in ocamlfind.ml), which does not feel sane... With this, even when ocamlfind is not activated (in 3.12.1, with "use-ocamlfind" not used), ocamlbuild manages to compile some packages calling ocamlfind! (though it fails in the end). |
|
(0008025) meyer (developer) 2012-09-04 23:45 |
Indeed, this support is a bit outdated, I believe intentions were good, but it's confusing. I'll look into this area and consider depreceation or removal, with a reservation that some parts might be still useful. |
Issue History |
|||
| Date Modified | Username | Field | Change |
| 2012-03-20 10:47 | gasche | New Issue | |
| 2012-03-20 10:50 | gasche | Note Added: 0007110 | |
| 2012-03-20 10:50 | gasche | Status | new => acknowledged |
| 2012-03-20 10:51 | gasche | Severity | minor => tweak |
| 2012-03-20 11:59 | dbuenzli | Note Added: 0007116 | |
| 2012-03-29 17:50 | william | Note Added: 0007246 | |
| 2012-03-29 19:14 | gasche | Relationship added | related to 0005406 |
| 2012-06-11 04:21 | meyer | Assigned To | => meyer |
| 2012-06-11 04:21 | meyer | Status | acknowledged => assigned |
| 2012-06-18 22:28 | meyer | Note Added: 0007568 | |
| 2012-06-19 09:20 | william | Note Added: 0007576 | |
| 2012-06-19 09:22 | william | Note Edited: 0007576 | View Revisions |
| 2012-06-19 09:23 | william | Note Edited: 0007576 | View Revisions |
| 2012-09-01 15:19 | meyer | Note Added: 0007995 | |
| 2012-09-04 22:59 | william | Note Added: 0008024 | |
| 2012-09-04 23:45 | meyer | Note Added: 0008025 | |
| 2012-09-06 16:43 | doligez | Target Version | => 4.00.1+dev |
| 2012-09-21 13:36 | doligez | Severity | tweak => feature |
| 2012-09-21 13:36 | doligez | Target Version | 4.00.1+dev => |
| Copyright © 2000 - 2011 MantisBT Group |