Skip to content

Build stdlibs with rewatch or bsb and integrate Core #6826

Closed
@cknitt

Description

@cknitt

Before integrating Core into the compiler repo, we should sort out the standard library build procedure. We should get rid of the ninja scripts and build everything with rewatch (or maybe even still bsb at first).

It turns out to be difficult to set this up because of (among other things) cyclic dependencies that need to be resolved. A lot things need to be shuffled around. It would be easier to iterate on this outside of the compiler repo IMHO.

My proposal is therefore to create a separate repo rescript-stdlib to work on a monorepo structure where all standard libs can be built with a single build command and without relying on any pre-existing artifacts in lib/ocaml. For this, we do not even need the v12 compiler, it should work fine with v11, too. This rescript-stdlib repo would be a temporary one, allowing us to iterate quickly on the standard library build infrastructure. Once we everything is working, it can be taken over into the compiler repo.

A rough plan could look like this:

  • 1. Re-add the -nostdlib option, see Re-add -nostdlib option and make it actually do something #6824.
  • Creeate separate repo for the work on the standard libraries
  • Add a "stdlib mini" (the absolutely essential stuff to get the rest to build), runtime (caml_*.res) and belt and get everything to compile with "-nostdlib -nopervasives" in curried mode
  • Switch to uncurried mode and get runtime to compile
  • Add Core
  • Add (part of?) the old Js namespace as a compatibility package
  • Add (part of?) the old OCaml 4.06 stdlib as a compatibility package
  • Clean up

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

  • Status

    Done

Relationships

None yet

Development

No branches or pull requests

Issue actions