| Anonymous | Login | Signup for a new account | 2013-05-18 08:56 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 | |||||||
| 0005102 | OCaml | OCamlbuild (the tool) | public | 2010-07-10 21:47 | 2012-10-10 16:04 | |||||||
| Reporter | dbuenzli | |||||||||||
| Assigned To | xclerc | |||||||||||
| Priority | normal | Severity | minor | Reproducibility | have not tried | |||||||
| Status | resolved | Resolution | fixed | |||||||||
| Platform | OS | OS Version | ||||||||||
| Product Version | 3.12.0+beta1 or 3.12.0+rc1 | |||||||||||
| Target Version | 4.01.0+dev | Fixed in Version | 4.00.2+dev | |||||||||
| Summary | 0005102: ocamlbuild, problems with %(name) syntax in the rules ~prod argument | |||||||||||
| Description | The %(name) syntax doesn't work when there's only %(name) used in ~prod see the examples below. Thanks, Daniel | |||||||||||
| Steps To Reproduce | ---------------------- Bug (single %(file) in ~prod): ---------------------- > cat myocamlbuild.ml open Ocamlbuild_plugin;; dispatch begin function | Before_rules -> rule "test: %.test -> %" ~dep:"%(file).%(suff).test" ~prod: "%(file)" begin fun env build -> cp (env "%(file).%(suff).test") (env "%(file)") end | _ -> () end > touch file.suff.test > ocamlbuild -classic-display file /usr/local/bin/ocamlopt.opt -I /usr/local/lib/ocaml/ocamlbuild unix.cmxa /usr/local/lib/ocaml/ocamlbuild/ocamlbuildlib.cmxa myocamlbuild.ml /usr/local/lib/ocaml/ocamlbuild/ocamlbuild.cmx -o myocamlbuild Exception Not_found. ------------------------------- No bug (more than one %(arg) in ~prod): ------------------------------- > cat myocamlbuild.ml > cat myocamlbuild.ml open Ocamlbuild_plugin;; dispatch begin function | Before_rules -> rule "test: %.test -> %" ~dep:"%(file).%(suff).test" ~prod: "%(file).%(suff)" begin fun env build -> cp (env "%(file).%(suff).test") (env "%(file).%(suff)") end | _ -> () end > touch file.suff.test > ocamlbuild -classic-display file.suff /usr/local/bin/ocamlopt.opt -I /usr/local/lib/ocaml/ocamlbuild unix.cmxa /usr/local/lib/ocaml/ocamlbuild/ocamlbuildlib.cmxa myocamlbuild.ml /usr/local/lib/ocaml/ocamlbuild/ocamlbuild.cmx -o myocamlbuild cp file.suff.test file.suff | |||||||||||
| Tags | No tags attached. | |||||||||||
| Attached Files | ||||||||||||
Notes |
|
|
(0005601) dbuenzli (reporter) 2010-07-10 21:56 |
The following is also strange. With this plugin trying to build anything that doesn't exist hangs forever. > cat myocamlbuild.ml open Ocamlbuild_plugin;; dispatch begin function | Before_rules -> rule "test: %.test -> %" ~dep:"%.test" ~prod: "%" begin fun env build -> cp (env "%.test") (env "%") end | _ -> () end > ocamlbuild -classic-display asldkfaslfjk /usr/local/bin/ocamlopt.opt -I /usr/local/lib/ocaml/ocamlbuild unix.cmxa /usr/local/lib/ocaml/ocamlbuild/ocamlbuildlib.cmxa myocamlbuild.ml /usr/local/lib/ocaml/ocamlbuild/ocamlbuild.cmx -o myocamlbuild ^CException Sys.Break. > touch bla.test > ocamlbuild -classic-display bla cp bla.test bla |
|
(0008240) xclerc (developer) 2012-10-10 16:04 |
Fixed in trunk (revision 13002) and 4.00 (revision 13003) branches. The "Not_found" exception was caused by the use of an unbound variable in the dependency. Now, unbound variables are replaced by empty strings. The non-terminating behavior is not an ocamlbuild bug. Indeed, if one has the rule "%(x).test -> %(x)" and asks to build "foo", then a try will be made to create "foo.test" which in turn will try to create "foo.test.test", and so on... thus looping unless one of these "*.test" file already exists. |
Issue History |
|||
| Date Modified | Username | Field | Change |
| 2010-07-10 21:47 | dbuenzli | New Issue | |
| 2010-07-10 21:56 | dbuenzli | Note Added: 0005601 | |
| 2010-07-22 11:38 | ertai | Status | new => assigned |
| 2010-07-22 11:38 | ertai | Assigned To | => xclerc |
| 2012-02-02 15:17 | protz | Category | OCamlbuild => OCamlbuild (the tool) |
| 2012-07-10 20:11 | doligez | Target Version | => 4.01.0+dev |
| 2012-07-31 13:36 | doligez | Target Version | 4.01.0+dev => 4.00.1+dev |
| 2012-09-18 15:24 | doligez | Target Version | 4.00.1+dev => 4.01.0+dev |
| 2012-10-10 16:04 | xclerc | Note Added: 0008240 | |
| 2012-10-10 16:04 | xclerc | Status | assigned => resolved |
| 2012-10-10 16:04 | xclerc | Fixed in Version | => 4.00.2+dev |
| 2012-10-10 16:04 | xclerc | Resolution | open => fixed |
| Copyright © 2000 - 2011 MantisBT Group |