package opam-compiler

All checked builds pass
  1. Overview
  2. Docs
Plugin to create switches using custom compilers

Install

dune-project
 Dependency

Authors

Maintainers

Sources

opam-compiler-0.2.1.tbz
sha256=bdbe6986e9bf59a5d2079ada7d014f10849f35227863bac98dff8fb49683707a
sha512=6e91029d6854b950ff067cc5c0c303c1034c289eec7f495ea6f6df26f6d08488623dfeb885cfdb9282b027c45bb7e7e78aebbb3c9cd2954fcb38d730d6b589c6

Description

This plugin can manage switches using various sources for compilers, such as git branches, github PRs, etc

Added to opam-repository:

README

opam-compiler

An opam plugin to manage compiler installations.

It can be used to create switches from various sources such as the main repository, ocaml-multicore, or a local directories. It can use tag names, branch names, or PR numbers to specify what to install.

Once installed, these are normal opam switches, and one can install packages in them. To iterate on a compiler feature and try opam packages at the same time, it supports to ways to reinstall the compiler: either a safe and slow technique that will reinstall all packages, or a quick way that will just overwrite the compiler in place.

Installing

This is an opam plugin.

Once installed, it will be available globally using opam compiler ARGS. To install it, either run opam install opam-compiler to use the opam-repository version or pin it to get a development version:

opam pin add opam-compiler 'git+https://github.com/ocaml-opam/opam-compiler.git'

Creating a switch

opam compiler create is a wrapper around opam switch create that will use a custom OCaml compiler. The documentation can be found here, but as an example, the following is recognised:

    # Use this pull request number
opam compiler create '#1234'

# Use this branch
opam compiler create 'myself/ocaml:mybranch'

# Use this pull request
opam compiler create https://github.com/ocaml/ocaml/pull/10831

It will try determine a switch name and description from the source name, but it is also possible to pass an explicit switch name:

    # Use an explicit switch name
opam compiler create '#1234' --switch optimize-list-map

The resulting switch can be used like a normal switch: one can install packages, update them, etc.

By default, the compiler will be built using a plain ./configure command, which will create a vanilla compiler. It is possible to override this:

    # Just build the bytecode compiler from a pull request
opam compiler create '#1234' --configure-command "./configure --disable-native-compiler"

# Build the native compiler with flambda and frame pointers
opam compiler create '#1234' --configure-command "./configure --enable-flambda --enable-frame-pointers"

Dependencies (10)

  1. uri
  2. rresult >= "0.6.0"
  3. re >= "1.5.0"
  4. ocaml-version >= "3.0.0"
  5. github-data
  6. curly >= "0.2.0"
  7. cmdliner >= "1.1.0" & < "2.0.0"
  8. bos < "0.3.0"
  9. ocaml >= "4.08.0"
  10. dune >= "2.7"

Dev Dependencies (4)

  1. odoc with-doc
  2. alcotest >= "1.2.0" & with-test
  3. either with-test
  4. cmdliner with-test & >= "1.2.0" & < "2.0.0"

Optional Dependencies

None

Used by

None

Conflicts (1)

  1. result < "1.5"

Build status

Results of building opam-compiler with each compiler on check.ci.ocaml.org, run of against opam-repository 8a77e58. All results for this package.

Each result links to its build log. To keep crawlers from overloading the site, build logs require a GitHub sign-in (see ocurrent/opam-health-check). On your first log, GitHub asks you to “Authorize opam-health-check”, the OCurrent app that runs these checks; it sees only your public profile, not your repositories. The sign-in lasts 30 days.

Version OCaml 4.11 OCaml 4.14 OCaml 5.2 OCaml 5.4 OCaml 5.5
0.2.1 (this version) good good good good good
  • good Package successfully built
  • partial One of the dependencies failed to build
  • bad Package failed to build
  • n/a Package is not available in this environment
  • internal Internal failure