OCaml Forge

Detail: [#1268] Path containing ".." is not allowed by oasis

Feature Requests: Browse | Download .csv | Monitor

[#1268] Path containing ".." is not allowed by oasis

2013-03-25 19:18
Submitted by:
Chet Murthy (chet)
Assigned to:
Sylvain Le Gall (gildor-admin)
Due in version:
Operating System:
Path containing ".." is not allowed by oasis

Detailed description
Sometimes the source for a library or executable is not stored in the same directory-tree as _oasis. It might be nice if you could specify a nearby directory, e.g. "../gen-ocaml". Similarly, it might be nice if you could specify multiple paths, which would be searched in-order to find files specified in the Module directive.


Date: 2013-03-26 23:43
Sender: Chet Murthy

Sure. The Thrift RPC framework has codegenerators for lots of languages, including ocaml. They also have a set of tutorial examples for many of these languages. The directory structure is:

tutorial -- the top dir
tutorial/tutorial.thrift -- the RPC IDL file defining the RPCs (language-independent)
tutorial/cpp -- C++ examples
tutorial/ocaml -- ocaml examples

In this tutorial directory, the user invokes

% thrift -r --gen cpp tutorial.thrift

in order to generate the C++ bindings; similarly,

% thrift -r --gen ocaml tutorial.thrift

will generate ocaml bindings. These bindings will be generated in directories


It would be best to keep all ocaml-specific source files in the tutorial/ocaml directory, for obvious reasons. But it would also be best to follow the same practice for the location of the "gen-ocaml" directory, as is done for all the other languages (of which there are many).

So, if we want to follow these rules, we cannot write an _oasis file that will work for gen-ocaml.

Separately, there is also the problem that the -directory- gen-ocaml is created ab initio, so we cannot put an _oasis file there.

And last, what I would -really- like is to compile the ML files in tutorial/gen-ocaml, along with the files in tutorial/ocaml, into a single findlib package or executable. But this again is not possible, because all the files that make up a single Library, must come from a single directory (since Path only takes a single argument, right?)
Date: 2013-03-25 21:20
Sender: Sylvain Le Gall

The _oasis file should be at the root of the sources. I don't see how you can distribute a _oasis file that point to a directory that can be absent...

If you really want, you can create a symlink inside the source tree...

Can you give me a use case where you can distribute this kind of configuration ?

Attached Files:


Field Old Value Date By
status_idOpen2016-06-19 14:34gildor-admin
close_dateNone2016-06-19 14:34gildor-admin
ResolutionPending Upload2013-03-25 21:20gildor-admin
assigned_tonone2013-03-25 21:20gildor-admin