As `Sys.readdir`, it returns entries in an nondeterministic order.
This can cause problems if caller relies on the list being sorted.
See #820.
Signed-off-by: Etienne Millon <etienne@cryptosense.com>
This uses two different extensions:
- `.d` corresponds to the raw `ocamldep` output.
- `.all-deps` corresponds to this output, merged with the dependencies
of all the interfaces mentioned in the earlier.
This also means that `.all-deps` files will contain output from multiple
files.
It's simply to just use Env.t everywhere. Also, there's no need to have the env
in the execution context since it's not used for anything. Only the env that is
passed directly is used.
- make sure type t always come first
- Map.map, Map.fold, ... never pass the key to the callback while Map.mapi, Map.foldi, ... do
- removed the ~key and ~data labels, I find them useless and annoying
- Set.elements --> Set.to_list
- Map.bindings --> Map.to_list
- Map.of_alist --> Map.of_list
- added Ordering.t for comparison functions
- renamed Inl/Inr to Left/Right. The latter seems clearer
- moved List.longest to String.longest
- added a Pp module with a nicer API than Format
This required to remove the labeled ~dir arguments in Action because
one would have had to use the same label for the expansion context in
String_with_vars, which would have been odd for generic expansion
functions.
Define the representation for quoted variables, adapt the test of
strings made of a single variable, and add a constructor.
[String_with_vars.t] is not yet able to use that representation
because the necessary information is not available from the parser.
Before, jbuilder used to stop its execution after an error was
encountered. Now it continues until all branches have been explored.
To implement this feature, Future was rewritten as a Fiber module with
a simpler semantic.
This patch contains various other refactorings.
The legacy DOS readonly attribute is a tedious difference on Windows,
because a user may have permission to delete a file, but unlink fails
because the attribute is set.
Signed-off-by: David Allsopp <david.allsopp@metastack.com>
* Change jbuilder to load rules lazily
Rules are now loaded on a per directory basis as needed. This speed up
the start up time on large workspaces.
Does various refactoring as well.
* Simplify the handling of META files
We no longer generate a META.foo.from-jbuilder file. Nobody is using
this feature and it's making the new code more complicated.
* Accept correction files produced by ppx_driver so that [@@deriving_inline] works
* Change promote-if so that it doesn't promote the file when the source file doesn't exist in the source tree
* Let variables say whether they are Concat or Split
To concatenate the contents of a split variable, put it in a string:
"${var} ".
Fixes#300
See also https://github.com/janestreet/jbuilder/issues/408
* Issue a deprecation warning for ${!...}
* Treat ${CC}, ${<}, ${^} and ${read-lines:...} as split vars
* Change ${!^} into ${^} for this project jbuild rules