|Anonymous | Login | Signup for a new account||2014-12-20 23:18 CET|
|Main | My View | View Issues | Change Log | Roadmap|
|View Issue Details|
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0006482||OCaml||OCamlbuild (the tool)||public||2014-07-11 00:51||2014-07-15 01:48|
|Target Version||4.02.1+dev||Fixed in Version||4.02.0+beta1 / +rc1|
|Summary||0006482: ocamlbuild fails with Sys_error if there is a _tags file anywhere inside an ignored (unhygienic) directory|
|Description||I could be misreading the cause, this is just what it seems like to me.|
|Steps To Reproduce||1) Untar the attached minimal workspace|
2) cd into ocamlbuild-bug
3) `ocamlbuild main.native`
Exception Sys_error("deps/foo/_tags: No such file or directory").
Compilation unsuccessful after building 0 targets (0 cached) in 00:00:00.
|Additional Information||The attached tar has the basic structure:|
- deps/foo/_tags (empty)
- deps/main.cmx (empty)
"deps" in the original source tree (which uncovered the bug) is where I've compiled some third party code, so I need it to be ignored by the sanitization plugin. So I've got the following toplevel _tags rule:
Running with -no-sanitize still causes the same error, so I don't think it's actually a bug in the sanitize plugin.
|Tags||No tags attached.|
|Attached Files||ocamlbuild-bug.tar.gz [^] (458 bytes) 2014-07-11 00:51|
There is both a bug in ocamlbuild and, I think an incomprehension about what not_hygienic means.
The bug is fixed in 4.02 and trunk.
The incomprehension is the following: gfxmonk seems to expect that not_hygienic means that those directories will not be traversed by ocamlbuild. This is not the case! Non-hygienic directories are normal build directories (which will be used to look for targets to build and their dependencies), only they're allowed to contain stuff that looks like partial build output. In particular, any _tags file contained in those directories will be parsed -- this is why adding not_hygienic was not a workaround for the bug.
If you want to prevent ocamlbuild from traversing a directory, parsing its _tags file and using its content, you should disable the "traverse" tag for this directory:
You can also whitelist directories to traverse by disabling traversal by default:
|Thanks for the fix gasche, and also for the correction - I was indeed confused about what not_hygenic should be used for.|
|2014-07-11 00:51||gfxmonk||New Issue|
|2014-07-11 00:51||gfxmonk||File Added: ocamlbuild-bug.tar.gz|
|2014-07-11 12:04||doligez||Status||new => acknowledged|
|2014-07-11 12:04||doligez||Target Version||=> 4.02.1+dev|
|2014-07-11 18:05||gasche||Assigned To||=> gasche|
|2014-07-11 18:05||gasche||Status||acknowledged => assigned|
|2014-07-14 16:46||gasche||Note Added: 0011811|
|2014-07-14 16:46||gasche||Status||assigned => resolved|
|2014-07-14 16:46||gasche||Fixed in Version||=> 4.02.0+dev|
|2014-07-14 16:46||gasche||Resolution||open => fixed|
|2014-07-14 16:46||gasche||Fixed in Version||4.02.0+dev => 4.02.0+beta1 / +rc1|
|2014-07-15 01:48||gfxmonk||Note Added: 0011816|
|Copyright © 2000 - 2011 MantisBT Group|