Giter Club home page Giter Club logo

obi's Introduction

⚠️ CAUTION

The developer team released OCaml 5.0.0 in December 2022. This release sports a full rewrite of its runtime system for shared-memory parallel programming using domains and native support for concurrent programming using effect handlers.

Owing to the large number of changes, the initial 5.0 release is more experimental than usual. It is recommended that all users wanting a stable release use the 4.14 release which will continue to be supported and updated while 5.x reaches feature and stability parity. Similarly, if you need one of the ports not yet supported in the 5.0 release you must use the 4.14 release.

The initial release of OCaml 5.0 only supports the native compiler under ARM64 and x86-64 architectures under Linux, macOS and the BSDs. On Windows, only the MinGW-w64 port is supported in OCaml 5.0 and the Cygwin port is restored in 5.1. On Linux, native code support for RISC-V and s390x/IBM Z is available in OCaml 5.1 and in 5.2 for Power.

❗ From OCaml 5.0 onwards, native compilation is available only on 64-bit systems. Native compilation on 32-bit systems is no longer available, nor are there plans to bring it back. The bytecode compiler will continue to work on all architectures.

Branch trunk Branch 5.2 Branch 5.1 Branch 5.0 Branch 4.14

Github CI Build Status (trunk branch) Github CI Hygiene Status (trunk branch) AppVeyor Build Status (trunk branch)

Github CI Build Status (5.2 branch) AppVeyor Build Status (5.2 branch)

Github CI Build Status (5.1 branch) AppVeyor Build Status (5.1 branch)

Github CI Build Status (5.0 branch) AppVeyor Build Status (5.0 branch)

Github CI Build Status (4.14 branch) AppVeyor Build Status (4.14 branch)

README

Overview

OCaml is a functional, statically-typed programming language from the ML family, offering a powerful module system extending that of Standard ML and a feature-rich, class-based object system.

OCaml comprises two compilers. One generates bytecode which is then interpreted by a C program. This compiler runs quickly, generates compact code with moderate memory requirements, and is portable to many 32 or 64 bit platforms. Performance of generated programs is quite good for a bytecoded implementation. This compiler can be used either as a standalone, batch-oriented compiler that produces standalone programs, or as an interactive REPL system.

The other compiler generates high-performance native code for a number of processors. Compilation takes longer and generates bigger code, but the generated programs deliver excellent performance, while retaining the moderate memory requirements of the bytecode compiler. The native-code compiler currently runs on the following platforms:

Tier 1 (actively maintained) Tier 2 (maintained when possible)

x86 64 bits

Linux, macOS, Windows, FreeBSD

NetBSD, OpenBSD, OmniOS (Solaris)

ARM 64 bits

Linux, macOS

FreeBSD, OpenBSD, NetBSD

Power 64 bits

Linux (little-endian, ABIv2)

Linux (big-endian, ABIv2)

RISC-V 64 bits

Linux

IBM Z (s390x)

Linux

Other operating systems for the processors above have not been tested, but the compiler may work under other operating systems with little work.

All files marked "Copyright INRIA" in this distribution are Copyright © 1996-2023 Institut National de Recherche en Informatique et en Automatique (INRIA) and distributed under the conditions stated in file LICENSE.

Installation

See the file INSTALL.adoc for installation instructions on machines running Unix, Linux, macOS, WSL and Cygwin. For native Microsoft Windows, see README.win32.adoc.

Documentation

The OCaml manual is distributed in HTML, PDF, and Emacs Info files. It is available at

Availability

The complete OCaml distribution can be accessed at

Releases

More information about when and how new releases of OCaml are published is available at release-info/introduction.md, see also release-info/calendar.md for a prospective calendar for future OCaml versions. For past versions, release-info/News contains a short description of major changes in previous versions.

Keeping in Touch with the Caml Community

There is an active and friendly discussion forum at

The OCaml mailing list is the longest-running forum for OCaml users. You can email it at

You can subscribe and access list archives via the Web interface at

There also exist other mailing lists, chat channels, and various other forums around the internet for getting in touch with the OCaml and ML family language community. These can be accessed at

In particular, the IRC channel #ocaml on Libera has a long history and welcomes questions.

Bug Reports and User Feedback

Please report bugs using the issue tracker at https://github.com/ocaml/ocaml/issues

To be effective, bug reports should include a complete program (preferably small) that exhibits the unexpected behavior, and the configuration you are using (machine type, etc).

Contributing

For information on contributing to OCaml, see HACKING.adoc and CONTRIBUTING.md.

Separately maintained components

Some libraries and tools which used to be part of the OCaml distribution are now maintained separately and distributed as OPAM packages. Please use the issue trackers at their respective new homes:

Library Removed since OPAM package

The Stream and Genlex standard library modules

OCaml 5.0

camlp-streams

The Graphics library

OCaml 4.09

graphics

The Num library

OCaml 4.06

num

The OCamlbuild tool

OCaml 4.03

ocamlbuild

The camlp4 tool

OCaml 4.02

camlp4

The LablTk library

OCaml 4.02

labltk

The CamlDBM library

OCaml 4.00

dbm

The OCamlWinTop Windows toplevel

OCaml 4.00

none

obi's People

Contributors

avsm avatar kit-ty-kate avatar samoht avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

obi's Issues

opam-ci logs should show build opam-repo-rev

Since some builds lag behind, opam logs should show the 8 letter sha hash of the opam-repo revision. This is included in the Dockerfile output but not the log error output.

Helps until we have #3

package build failing (camlp5) but no indication in opam-ci

I have a package (in a PR: Opam publish camlp5 7.13 #17132) that's failing on a couple of platforms (camlp5 7.13) and am trying to use the opam ci infrastructure to investigate. I can get the logs via the web UI, but thought I'd try to learn how to use opam-ci. There seems to be a problem (or maybe this isn't what opam-ci is designed for). Neither the status nor logs commands show anything:

chet@digg:~/Hack/Camlp5/src/camlp5$ opam ci status -m [email protected] --filter=all 

Try 'opam-ci logs <pkg>' to see details of build failures for each package.

chet@digg:~/Hack/Camlp5/src/camlp5$ opam ci status camlp5

Try 'opam-ci logs <pkg>' to see details of build failures for each package.

chet@digg:~/Hack/Camlp5/src/camlp5$ opam ci logs camlp5
camlp5: No failures found with these constraints

Not sure what I'm doing wrong .....

opam-ci hardcodes ocaml version strings

The OCaml version strings for the latest OCaml compiler version, the latest stable version and so on can be retrieved using the ocaml-version rather than being hardcoded in opam-ci itself.

We should port the hardcoded uses to library calls from ocaml-version, and add any utility function to that upstream library if necessary.

Type check error around Aarch32

# File "src/obi-gitlab/gitlab.ml", line 239, characters 16-24:
# Error: This pattern matches values of type [? `Aarch32 ]
#        but a pattern was expected which matches values of type OV.arch
#        The second variant type does not allow tag(s) `Aarch32

I'm trying to install this by pinning it locally and get the error above.

add explicit queues to buildkite agents

Right now, we use the default Buildkite queue for every job in the infrastructure. A big bulk build will use up all the slots for an architecture, resulting in everything else being queued up.

To solve this, we need the following queues:

  • bulk: for bulk builds
  • infra: for infrastructure containers
  • default: misc stuff

Unfortunately, there is no way to prioritise queues, so we need to overcommit them in the agents. This might mean that if everything is maxxed out, we are pushing heavy load averages. However, this will be slow, but not a fatal error.

There is some discussion on buildkite/feedback#147 about improving this situation upstream in Buildkite, but for now overcommit should be fine for us.

switch Hub OCaml containers to point to opam-repository:2.0.0 branch

Right now every container uses the opam-repository master branch, which has the opam1 metadata. This allows (e.g.) opam-ci to use the opam-1 git revs to track PR tests, but increases the time it takes to do updates in the containers due to the opam1->2 conversion.

At some point, we need to coordinate with the datakit-ci and switch the containers to use the 2.0 branch natively, and test the conversion scripts separately.

add a variant to list packages that need refreshing to latest OCaml

The current views only list packages that fail. It would be useful to list packages that are marked as uninstallable against the latest version of OCaml, and do not have a newer version that does compile on the new compiler.

This would let us (e.g.):

  • list packages that have not yet been ported to safe-string (due to 4.06 constraints)
  • list packages that have not yet been ported to 4.07 due to ppx ast changes

We do need to filter out depfails, to keep the list manageable. In the spirit of ensuring that no bug in opam-ci should be unfixable, we do also need a tag to mark a package as "validly uninstallable", since the upstream may want to simply deprecate a package and not let it compile with latest versions of the compiler.

requested by @dra27

do not require a coloured Unicode terminal for opam-ci

The current dashboard display requires an ANSI and Unicode tty due to the use of colours. This is not optimal for several reasons:

  • it makes it difficult to use with screen readers
  • file redirection is messy
  • it also fails to work on Windows due to Consolas not supporting the right format (via @dra27)

We should fallback to a more verbose rendering format in these situations instead of blasting escape codes to the screen unconditionally.

remove redundant fields in the obi metadata

There are some fields in the Obi metadata that are usually empty; for example the logs field. We can simply omit these from the sexp output rather than just redundantly output empty fields.

list opam packages

If thing that I often do when trying to debug a failing build is to check the version of the installed packages. With travis, this means scrolling a bit to find opam actions.

With obi it's not possible to scroll as the logs are trimed a bit; instead it would be nice to have a way to list either the packages which were planned to be installed and/or the list of packages successfully installed without the error.

`opam-ci status` should accept a package list

While opam-ci status can filter by maintainers and tags, it cannot simply filter based on a package name. This can be added via positional parameters; e.g.:

opam-ci status mirage mirage-xen

Obi integration in opam-check-all

For now kit-ty-kate/opam-check-all uses the obi library to the list of maintainers per packages but nothing more. To be able to use the obi fully in opam-check-all here what I would need:

  • Full logs: opam-check-all needs access to the full log of the opam build. It is "common" to see errors being displayed outside the "opam error square" either because it was too long, because there is not enough informations or because one of the dependencies failed (and is not retrievable outside of this particular combination, e.g. some particular mix of depopts or depexts makes it fail in a way it wouldn't otherwise). Access to the latest logs through a link seems doable (for 3 versions of OCaml, it takes about 2Go of disk space)
  • Obi.Index.params consistency: opam-check-all needs some kind of hint to know which versions of OCaml are available (are they hardcoded ?), whether x86_64 builds have been successfully done (can I be assured they are always available ?) and which distributions have been built. It might be good to have some kind of header in the index file to have this information available right away.

Concerning the distributions issue: I guess I'd have to make a ranking at some point. opam-check-all uses Debian Unstable as it seems to be the distribution with the most external package available (e.g. latest versions of LLVM, latest version of SDL used by tsdl, and so on…).
However if anybody have some hints about which distributions would be the most suited to display result by default (not Debian Stable in my opinion), it would be much appreciated.

indicate when a build is relatively out of date

The index doesn't currently store the opam-repository metadata, but it does have the revision of opam-repo that a given run was built against. Some runs (like ppc64le) naturally lag behind the faster amd64 builds, so different results come from different revisions of opam-repo.

This is problematic when reporting results, since we want to indicate to the user that a given branch may be lagging behind. We could extend the type pkgs (currently just a pkg list) to also include more information about the opam-repository revision hashes. Then the client could determine which the latest revision is, and report the mismatch in opam-ci logs without having to have a full checkout of opam-repository.

integrate opam lint information into obi index

The lints branch of obi-logs contains opam-lint that is regularly run the main opam repository.

There is information in there relevant to package maintainers, such as broken distfiles and/or constraint inconsistencies. We should hook this into the main Obi index by parsing the output.

Fixing this is blocked on ocaml/opam#3342 in upstream opam, since the existing opam lint output is difficult to parse directly. (cc @AltGr as fyi)

add versioning to obi metadata

The obi index currently just prompts users to upgrade if it fails to parse the sexpression file in https://github.com/ocaml/obi-logs/tree/index.

We could allow for smoother upgrades by having the client have an epoch variable that is incremented on an incompatible index format change, and for the opam-ci client to checkout index-<epoch> to get the right branch. If a branch with a higher epoch exists, then the opam-ci client could warn the user to run opam update -u to get the latest version.

Alternatively, we could also commit explicitly versioned files instead of index.sxp and just use the same branch. This increases the data transfer required for the client though.

obi-buildkite should push the results of a repo gc

obi-buildkite index will delete unused metadata files in the builds branch, but the scripts in .buildkite do not currently push this GC back to the upstream obi-logs repository. This is necessary to ensure that the builds branch stays a reasonable size.

implement `opam-ci docker`

The opam-ci logs command currently outputs a Dockerfile which has to be manually cut-and-pasted and built. Instead, this functionality should be shifted into an opam-ci docker subcommand which can:

# generate an interactive container
opam-ci docker run xen-evtchn.1.0.3 --compiler=4.06 --distro=debian-9
# build an image called `local-container`
opam-ci docker build -t local-container xen-evtchn.1.0.3 --compiler=4.06 --distro=debian-9
# just output the Dockerfile to stdout
opam-ci docker file xen-evtchn.1.0.3 --compiler=4.06 --distro=debian-9 

add new opam-ci filter for orphaned packages

There are some packages that are orphaned and could use a new maintainer. Add an `opam-ci status --filter=orphaned' to list these packages, so that willing community maintainers can fork them and/or refresh them to the latest versions of the compiler.

Detecting orphaned maintainer strings requires a few heuristics, as sometimes the field is blank and other times set to the opam-repository issues url.

See ocaml/opam-repository#12182 for one such example package (syslog)

How to update?

I have this message:

> $ jbuilder exec -- opam-ci status -m [email protected]
opam-ci: We have encountered a total failure to parse the upstream
         metadata.
         Please run `opam update -u` to get the latest version of opam-ci
         that is compatible with the latest log format.
         If that does not work, you can try pinning to the development
         version of opam-ci via `opam pin add opam-ci --dev`.
         Please report this issue with at https://github.com/ocaml/obi/issues
         with this backtrace:
         (Failure "unable to find version string in index.sxp")

                  Raised at file "src/opam-ci/repos.ml", line 128, characters
         15-75

But both options do not work (my opam is up-to-date and I am running the dev version). I think the message should explain how to reset the state manually as well.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.