Skip to content

Commit ec30963

Browse files
committed
Retain MIT-licensed Flow collection sources
Signed-off-by: Christoph Knittel <ck@cca.io>
1 parent 3810089 commit ec30963

14 files changed

Lines changed: 89 additions & 16 deletions

File tree

compiler/flow_parser/README.md

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,17 @@ This directory contains the OCaml Flow parser used by the ReScript compiler.
44

55
- Upstream repository: https://github.com/facebook/flow
66
- Flow parser version: `0.320.0`
7-
- Source commit: `7c64d4b077bc6fc45c12cee3cfa7368fdb2186ce`
7+
- Parser and Sedlex source commit: `7c64d4b077bc6fc45c12cee3cfa7368fdb2186ce`
8+
- Collection source commit: `9ea4062c0b7e037415c4413a7634c459ebd5c31b`
9+
from Flow parser 0.267.0
810
- Original source directories: `src/parser`, `src/third-party/sedlex`,
911
`src/third-party/sedlex-ppx`, and `src/hack_forked/utils/collections`
1012

13+
The collection helpers retain the MIT-licensed 0.267.0 sources. Their code is
14+
identical in Flow 0.320.0, but that release replaces their MIT notices with
15+
"Confidential and proprietary" notices that do not grant redistribution
16+
rights.
17+
1118
The Dune files were adapted to build these sources as private libraries inside
1219
the ReScript repository. Sources used only by the upstream JavaScript and C API
1320
targets are not included. One ambiguous Sedlex documentation comment was
@@ -18,5 +25,6 @@ call uses an empty-list comparison to retain OCaml 5.0 compatibility.
1825
Vendored sources are excluded from the repository-wide OCamlformat check so
1926
that they remain comparable with their upstream versions.
2027

21-
The Flow sources are licensed under the MIT licence in `LICENSE`. Vendored
22-
Sedlex and collections sources retain their own licence files.
28+
The Flow parser and retained collection sources are licensed under the MIT
29+
licence in `LICENSE` and their source headers. Vendored Sedlex and collection
30+
third-party sources retain the licence files in their respective directories.

compiler/flow_parser/collections/iMap.ml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
1-
(* (c) Meta Platforms, Inc. and affiliates. Confidential and proprietary. *)
1+
(*
2+
* Copyright (c) Meta Platforms, Inc. and affiliates.
3+
*
4+
* This source code is licensed under the MIT license found in the
5+
* LICENSE file in the root directory of this source tree.
6+
*)
27

38
include WrappedMap.Make (IntKey)
49

compiler/flow_parser/collections/iSet.ml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
1-
(* (c) Meta Platforms, Inc. and affiliates. Confidential and proprietary. *)
1+
(*
2+
* Copyright (c) Meta Platforms, Inc. and affiliates.
3+
*
4+
* This source code is licensed under the MIT license found in the
5+
* LICENSE file in the root directory of this source tree.
6+
*)
27

38
include Flow_set.Make (IntKey)
49

compiler/flow_parser/collections/immQueue.ml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
1-
(* (c) Meta Platforms, Inc. and affiliates. Confidential and proprietary. *)
1+
(*
2+
* Copyright (c) Meta Platforms, Inc. and affiliates.
3+
*
4+
* This source code is licensed under the MIT license found in the
5+
* LICENSE file in the root directory of this source tree.
6+
*)
27

38
type 'a t = {
49
incoming: 'a list;

compiler/flow_parser/collections/immQueue.mli

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
1-
(* (c) Meta Platforms, Inc. and affiliates. Confidential and proprietary. *)
1+
(*
2+
* Copyright (c) Meta Platforms, Inc. and affiliates.
3+
*
4+
* This source code is licensed under the MIT license found in the
5+
* LICENSE file in the root directory of this source tree.
6+
*)
27

38
(*
49
* Immutable queue implementation. Modeled loosely after the mutable stdlib

compiler/flow_parser/collections/intKey.ml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
1-
(* (c) Meta Platforms, Inc. and affiliates. Confidential and proprietary. *)
1+
(*
2+
* Copyright (c) Meta Platforms, Inc. and affiliates.
3+
*
4+
* This source code is licensed under the MIT license found in the
5+
* LICENSE file in the root directory of this source tree.
6+
*)
27

38
type t = int
49

compiler/flow_parser/collections/priorityQueue.ml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
1-
(* (c) Meta Platforms, Inc. and affiliates. Confidential and proprietary. *)
1+
(*
2+
* Copyright (c) Meta Platforms, Inc. and affiliates.
3+
*
4+
* This source code is licensed under the MIT license found in the
5+
* LICENSE file in the root directory of this source tree.
6+
*)
27

38
module Make (Ord : Set.OrderedType) = struct
49
type elt = Ord.t

compiler/flow_parser/collections/sMap.ml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
1-
(* (c) Meta Platforms, Inc. and affiliates. Confidential and proprietary. *)
1+
(*
2+
* Copyright (c) Meta Platforms, Inc. and affiliates.
3+
*
4+
* This source code is licensed under the MIT license found in the
5+
* LICENSE file in the root directory of this source tree.
6+
*)
27

38
include WrappedMap.Make (StringKey)
49

compiler/flow_parser/collections/sSet.ml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
1-
(* (c) Meta Platforms, Inc. and affiliates. Confidential and proprietary. *)
1+
(*
2+
* Copyright (c) Meta Platforms, Inc. and affiliates.
3+
*
4+
* This source code is licensed under the MIT license found in the
5+
* LICENSE file in the root directory of this source tree.
6+
*)
27

38
include Flow_set.Make (StringKey)
49

compiler/flow_parser/collections/stringKey.ml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
1-
(* (c) Meta Platforms, Inc. and affiliates. Confidential and proprietary. *)
1+
(*
2+
* Copyright (c) Meta Platforms, Inc. and affiliates.
3+
*
4+
* This source code is licensed under the MIT license found in the
5+
* LICENSE file in the root directory of this source tree.
6+
*)
27

38
type t = string
49

0 commit comments

Comments
 (0)