The markup emitted by Jbuilder treated module lists as inline elements
that can appear inside a line. However, neither ocamldoc nor odoc render
module lists as inline elements. They are instead block elements, that
are laid out vertically, like lists or paragraphs. Correspondingly, odoc
now rejects inline module list markup.
A side effect of the (rejected) misconception is that there was a stray
period appearing on its own line in every module list generated by
Jbuilder. This is now fixed.
Option to force running tests
The mechanism allows for forcing any alias, but only forcing tests is exposed to the user. Aliases are forced by deleting all the alias files that belong to a particular alias. The option for forcing tests is called --force.
* docs: update some documentation in the Build module
* docs: document what [Scope.resolve] does
* docs: add a toplevel docstring to the Alias module
* docs: document (or not) the bootstrap function
* docs: lightly document the bootstrap module
* fix ignore comment
Make jbuilder rules work even when binaries are missing
* Proper error messages for missing binaries
* Unify Prog_spec and Maybe_prog
both can simply be unified into a path type that has a hint for the error
* Remove scarcely useful in_the_tree parameter
It's always true except for the C compiler. In which case, there's no harm in
making it true.
* Make Artifacts return Action.Prog
The old return value was simply converted to this anyway. It's simpler to just
return the proper error straight up.
* Remove remains of in_the_tree
* Improve jbuilder exec
When the path passed contianed to exec contains a '/', it will be interpreted
relative to the path of a build context (default context when absent)
* Update man page of jbuilder exec
* Add String.drop_prefix
* Make jbuilder exec understand relative/absolute paths
jbuilder exec will now interpret absolute paths as relative to the specified
build context. While relative paths will now be intepreted relative to the cwd
appended to the specified build context.
* Fix jbuilder exec /absolute/path
When the path provided to jbuilder exec is absolute, we should ignore the build
context for looking up the binary.
* Fix exec when ran outside of root
Previously, a call like $ jbuilder exec ./xxx --root=p would raise
an exception. Now ./xxx will be intepreterd relative to --root.
* Fix relative paths when jbuilder is ran outside of --root
* Simplify documentation for jbuilder exec
Calling 'jbuilder build @path/x' always request the alias `x` in
`path` and all its descendant.
To implement that, change the build system interface to take an
arbitrary request as argument.
When the docs are viewed locally, the URL ".." causes the browser to
display a listing of the parent directory, instead of "../index.html".
The "../index.html" interpretation is only provided by web servers.
This commit changes the top-level index of the docs generated by
Jbuilder so that the index lists all installed libraries (Findlib
library packages generated by Jbuilder), rather than only opam packages.
For example, current Markup.ml installs libraries
markup
markup.lwt
markup.lwt.unix
With this change, all these libraries are listed in the index. Before
this change, only markup was listed, because it happened to coincide
with the name of the opam package that contains all three libraries.
Not listing the extra libraries makes them undiscoverable, as they can
only be reached by direct URL.
When the root of the workspace is not the current directory, print:
Entering directory '<absolute path to root>'
This way editors such as emacs or vim knows how to interpret filenames
reported by the compiler.
Fixes#138
- vendored libraries are replaced by files in `vendor/boot`
- files named `XXX.boot.EXT` replace their `XXX.EXT` equivalent
For instance, to build boot.exe, we use `src/glob_lexer.boot.ml`
rather than `src/glob_lexer.ml` (which would be generated from
`src/glob_lexer.mll`).
Add (copy_files <glob>) and (copy_files# <glob>) stanzas. These
stanzas setup rules for copying files from a sub-directory to the
current directory.
This provides a reasonable way to support multi-directory
library/executables in jbuilder.
Previously, in Mode.Native, executables depended on .cmx files only.
This was fine when changes were detected by timestamp, but it is
possible to semantically alter an .ml such that only the .o/.obj file
alters. In this situation, Jbuilder would rebuild the .cmx file, but not
relink the executable.
Fixes#237.
Signed-off-by: David Allsopp <david.allsopp@metastack.com>
The form (:include $(SCOPE_ROOT)\foo) requires quoting, but the error
message was cryptic ("Error: undefined symbol include").
Signed-off-by: David Allsopp <david.allsopp@metastack.com>
Warn when a file is both present in the source tree and generated by
a rule. Before, jbuilder would silently ignore the rule. One now has
to add a field `(fallback)` to custom rules to keep the current
behavior.
Add a utop subcommand that build and execute a utop where all the libraries defined in the current directory are immediately available for interactive use.
Extend Ordered_set_lang.Unexpanded.expand to include a mapping function
for the S-expression for each atom. The previous behaviour can be
achieved with ~f:Sexp.Of_sexp.string, but this allows the S-expression
to be parsed using String_with_vars.t, thus allowing variable expansion.
* Allow digits in library/module names
Also include the malformed module name in the error message so it's more clear what it's complaining about.
* Update jbuild.ml
Instead of passing `-I <path> file.cma` to the compiler, pass `-I
<path> <path>/file.cma`.
Fixes#118 and #177. Using the fill path should also be slightly
faster as the compiler won't have to do the lookup through all include
paths. The only drawback is that it makes linking command line
slightly longer.
This is useful, for example, if one needs to pass specific flags
by hand (due to the need to use old libraries for example). Fixes
#198
Signed-off-by: Marcello Seri <marcello.seri@citrix.com>
The code to support it is starting to become increasingly complicated
and the number of problem found is a bit alarming.
We'll reinclude it later after a bit more testing and hopefully some
simplifications.
The dependencies on library artifacts are now properly setup to point
to the files in _build/install/...
Moreorver, private interfaces are now only visible inside the library
itself and are only allowed for private libraries. When a project
defines multiple packages, this ensures that the visibility when all
packages are built simultaneously and when they are installed one by
one.
We can relax these restrictions later with a bit more work and a clear
definition of where private modules should be visible.
Add a field "public_interfaces" to library stanza listing which modules are public.
Private modules won't be accessible outside the scope where the library is defined.