Commit Graph

171 Commits

Author SHA1 Message Date
Rudi Grinberg 58f9e9840c Replace janestreet/jbuilder with ocaml/dune
Update all links where necessary
2018-01-23 17:52:44 +08:00
Jeremie Dimino 748da3433a Update urls for the opam-cross-x repositories 2018-01-22 09:45:43 +00:00
Jérémie Dimino 9dd5ab74e4
[WIP] Load rules lazily (#370)
* 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.
2018-01-19 08:50:06 +00:00
Jérémie Dimino b06aad431e
Replace promote actions by diff actions + promote command (#421)
* Remove (promote ...) and (promote-if ...)
* Remove `--promote ...`
* Add (diff ...) and (diff? ...)
* Add `jbuilder promote` and `--auto-promote`
* Fix #423
2018-01-18 11:32:20 +00:00
Anil Madhavapeddy 8c403c467f docs: fix typos in manual 2018-01-17 08:17:55 +00:00
Jérémie Dimino 49edf8ed65
Accept correction files produced by ppx_driver (#415)
* 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
2018-01-16 12:28:02 +00:00
Jeremie Dimino d4dec9b4f5 Change the default of --promote from check to copy
As said in the PR. I forgot to push the commit.
2018-01-15 14:55:17 +00:00
Jérémie Dimino eab1ff6c7b
Add promote actions and include stanzas (#402)
Add a promote action that allows to copy over generated files as
source files and an include stanza allowing to include a file in a
jbuild file.
2018-01-15 13:24:25 +00:00
Christophe Troestler f8617b5721 Let "concat" or "split" be a quality of the variable (#336)
* 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
2018-01-15 09:32:40 +00:00
Jeremie Dimino 2b49123ae1 Update documentation to reflect cross compilation
Describes how to setup targets and toolchains and the changes to the workspace
syntax.
2018-01-01 22:34:41 +08:00
Rudi Grinberg a265889400
Mention ppxfind in docs (#357) 2017-12-11 19:40:54 +08:00
Ian Denhardt b5ba49d9b4 Clarify use of the .exe extension
.exe for executables is usually a windows-only convention; this threw me
for a moment and it seems worth calling out that this isn't platform
dependent.
2017-10-25 15:10:32 -04:00
Rudi Grinberg a63276f5b3 Merge pull request #268 from janestreet/new-alias-semantic
Sort out recursive/non-recursive aliases
2017-10-19 15:33:23 +08:00
Rudi Grinberg f9025a401a Document utop command 2017-10-14 18:50:37 +08:00
Jeremie Dimino 8466924a73 Update doc 2017-10-14 10:37:36 +08:00
Rudi Grinberg 97511eb77b fix header for "running tests" 2017-10-10 16:15:50 -04:00
Jeremie Dimino 5de73ca740 Add support for locks in rules
This is to allow users define more complicated tests without having
to resort to -j1.
2017-09-29 12:20:08 +01:00
Jeremie Dimino 50cbbe2ac5 Add ${path-no-dep:...}
To be able to resolve path names that are not dependencies.
2017-09-29 11:55:23 +01:00
Jeremie Dimino 8383a00e4c Generate man page for 'jbuilder utop' 2017-09-29 11:28:01 +01:00
Jeremie Dimino cc0bf2dfb7 Rephrase the doc for (merlin) in jbuild-workspace
Related to #257
2017-09-22 12:20:22 +01:00
Jeremie Dimino 157e4d6548 Print "Entering directory '...'" when necessary
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
2017-09-22 01:59:45 +01:00
Jeremie Dimino b2e7720b41 Interpret empty jbuild-workspace files as default configuration
If a workspace file is empty, interpret it the same as if it contained:

  (context default)

As discussed in #234
2017-09-22 01:59:45 +01:00
Jeremie Dimino 47d1f74ef0 Explain the difference between copy_files and copy_files# 2017-09-10 02:39:34 +01:00
François Bobot cecf0a2aaf Add (copy_files <glob>) stanza (#35)
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.
2017-09-10 02:31:07 +01:00
Jeremie Dimino 297e82061e Update_file --> Write_file
The difference is not meaningful anymore. Also expose Write_file as
write-file.
2017-08-17 15:13:11 +01:00
Jérémie Dimino 6bed864057 Better behavior when the targets of a rule already exist in the source tree (#218)
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.
2017-08-15 11:16:11 +01:00
Nicolás Ojeda Bär 3b1182c23a Fix typos 2017-08-15 07:32:17 +01:00
Jeremie Dimino b913a42739 Fix documentation about library dependencies 2017-08-08 13:56:28 +01:00
Jeremie Dimino 06b47a73f6 Do not accept per_file anymore
It was renamed per_module and it is planned to reuse per_file for
another purpose.
2017-08-04 09:24:02 +01:00
David Allsopp 13b0eb9f2b Convert link_flags to the ordered set DSL 2017-08-03 17:28:32 +01:00
David Allsopp ec29651cff Extend (:include ) form to js_of_ocaml flags 2017-08-03 17:28:32 +01:00
David Allsopp cebbb219e7 Extend (:include ) form to OCaml flags
flags, ocaml_flags and ocamlopt_flags now support the (:include ) form
of the ordered set language.
2017-08-03 17:28:32 +01:00
Jeremie Dimino cfd43d5282 Simplify a bit the rules for installation of library files 2017-07-25 17:07:24 +01:00
François Bobot 44a15bcd24 Fix documentation for `--libdir` 2017-07-25 16:44:14 +01:00
François Bobot 747cf220c6 Install by specifying libdir for opam-installer
- change default findlib directory (ocamlc -where)
2017-07-25 16:44:14 +01:00
Jeremie Dimino 4b40cad247 Revert public_interfaces for now
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.
2017-07-21 17:32:39 +01:00
Jeremie Dimino 9893c14500 Fix some problems related to public_interfaces
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.
2017-07-21 16:52:28 +01:00
Jeremie Dimino 2b93f960b6 Doc tweaks 2017-07-19 15:31:17 +01:00
François Bobot a3933a2c18 Add public_interfaces selection for libraries (#106)
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.
2017-07-19 15:26:48 +01:00
Egor Panfilov 15f2687f0f Added missing parenthesis in quickstart 2017-07-16 13:56:48 +03:00
Anton Bachin 63b63eb0ac Fix typos 2017-06-17 12:06:58 -04:00
Tim McGilchrist a9f7166a2a Spelling 2017-06-16 14:20:06 +10:00
Jeremie Dimino daeb40b087 Add SCOPE_ROOT
While analysing packages using jbuilder, I found that some packages
use ${ROOT} to refer to the root of the project. However, this doesn't
work as ${ROOT} depends on the workspace configuration.

Add ${SCOPE_ROOT} to make this easier for projects with a lot of
nested sub-directories.
2017-06-09 12:45:05 +01:00
Jeremie Dimino eb7b5e2be4 Help users to not use non-future proof features in jbuild files 2017-06-08 11:33:59 +01:00
Jeremie Dimino e4300e7b51 Make (run prog ...) behave the same as (run ${bin:prog} ...)
This just seems like a better default
2017-06-08 10:37:25 +01:00
Jérémie Dimino 2e2a707d4b Automatically install executable with extension `.exe` on Windows (#123)
- Automatically add exe extension when installing executables
- Look for local binaries with .exe extension on Windows
2017-06-08 09:59:43 +01:00
Jeremie Dimino 0cea06b5d2 Fix #125 2017-06-06 14:59:21 +01:00
Jeremie Dimino e51002d1b7 Restrict what one can do with the OCaml syntax
Until we decide in what direction it should go.
2017-06-06 10:23:22 +01:00
Anil Madhavapeddy d279e1e25d docs: remove an extra set of brackets from the `select ... from` (#121)
Looks like the right syntax is `(select foo from (x -> y) ( -> y))`
from the example use in js_of_ocaml/compiler
2017-06-05 16:16:49 +01:00
Jeremie Dimino 2be5e593d6 rework the documentation of scopes 2017-06-05 12:33:45 +01:00