Skip to content

Commit c37921e

Browse files
authored
Merge branch 'master' into remove-bs-send-pipe
2 parents 0334c38 + 60f3e16 commit c37921e

File tree

22 files changed

+71
-772
lines changed

22 files changed

+71
-772
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
- Add `rewatch` to the npm package as an alternative build tool. https://github.com/rescript-lang/rescript-compiler/pull/6762
1919
- Throws an instance of JavaScript's `new Error()` and adds the extension payload for `cause` option. https://github.com/rescript-lang/rescript-compiler/pull/6611
2020
- Allow free vars in types for type coercion `e :> t`. https://github.com/rescript-lang/rescript-compiler/pull/6828
21+
- Allow `private` in with constraints. https://github.com/rescript-lang/rescript-compiler/pull/6843
2122

2223
#### :boom: Breaking Change
2324

@@ -30,6 +31,7 @@
3031
- Some global names and old keywords are no longer prefixed. https://github.com/rescript-lang/rescript-compiler/pull/6831
3132
- Remove ml parsing tests and conversion from `.ml` to `.res` via format. https://github.com/rescript-lang/rescript-compiler/pull/6848
3233
- Remove support for compiling `.ml` files, and general cleanup. https://github.com/rescript-lang/rescript-compiler/pull/6852
34+
- Remove `rescript convert` subcommand. https://github.com/rescript-lang/rescript-compiler/pull/6860
3335
- Remove support for `@bs.send.pipe`. https://github.com/rescript-lang/rescript-compiler/pull/6858
3436

3537
#### :bug: Bug Fix

cli/rescript_bsb.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -322,10 +322,7 @@ Please pick a different one using the \`-ws [host:]port\` flag from bsb.`);
322322
if (!fileName) return true;
323323

324324
return (
325-
((fileName.endsWith(".res") ||
326-
fileName.endsWith(".resi") ||
327-
fileName.endsWith(".ml") ||
328-
fileName.endsWith(".mli")) &&
325+
((fileName.endsWith(".res") || fileName.endsWith(".resi")) &&
329326
!watchGenerated.includes(fileName)) ||
330327
fileName === resConfig
331328
);

cli/rescript_convert.js

Lines changed: 0 additions & 128 deletions
This file was deleted.

jscomp/build_tests/cli_help/input.js

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ const cliHelp =
1616
" build\n" +
1717
" clean\n" +
1818
" format\n" +
19-
" convert\n" +
2019
" dump\n" +
2120
" help\n" +
2221
"\n" +
@@ -58,17 +57,6 @@ const formatHelp =
5857
" -all Format the whole project \n" +
5958
" -check Check formatting for file or the whole project. Use `-all` to check the whole project\n";
6059

61-
const convertHelp =
62-
"Usage: rescript convert <options> [files]\n" +
63-
"\n" +
64-
"`rescript convert` converts the current directory\n" +
65-
"\n" +
66-
"**This command removes old OCaml files and creates new ReScript \n" +
67-
"files. Make sure your work is saved first!**\n" +
68-
"\n" +
69-
"Options:\n" +
70-
" -all Convert the whole project\n";
71-
7260
const dumpHelp =
7361
"Usage: rescript dump <options> [target]\n" +
7462
"`rescript dump` dumps the information for the target\n";
@@ -232,26 +220,6 @@ async function test() {
232220
assert.equal(out.status, 0);
233221
}
234222

235-
{
236-
// Shows convert help with --help arg
237-
const out = await exec(`../../../rescript`, ["convert", "--help"], {
238-
cwd: __dirname,
239-
});
240-
assert.equal(out.stdout, convertHelp);
241-
assert.equal(out.stderr, "");
242-
assert.equal(out.status, 0);
243-
}
244-
245-
{
246-
// Shows convert help with -h arg
247-
const out = await exec(`../../../rescript`, ["convert", "-h"], {
248-
cwd: __dirname,
249-
});
250-
assert.equal(out.stdout, convertHelp);
251-
assert.equal(out.stderr, "");
252-
assert.equal(out.status, 0);
253-
}
254-
255223
{
256224
// Shows dump help with --help arg
257225
const out = await exec(`../../../rescript`, ["dump", "--help"], {

jscomp/core/bs_conditional_initial.ml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,6 @@
2222
* along with this program; if not, write to the Free Software
2323
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *)
2424

25-
(* Clflags.keep_docs := false; *)
26-
(* default to false -check later*)
27-
(* Clflags.keep_locs := false; *)
2825
let setup_env () =
2926
Env.Persistent_signature.load := Bs_cmi_load.load_cmi;
3027
Matching.make_test_sequence_variant_constant := Polyvar_pattern_match.make_test_sequence_variant_constant;

jscomp/gentype/Annotation.ml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,8 @@ let tag_is_one_of_the_gentype_annotations s =
3636
let tag_is_gentype_ignore_interface s =
3737
s = "genType.ignoreInterface" || s = "gentype.ignoreInterface"
3838

39-
let tag_is_doc s =
40-
match s with
41-
| "ocaml.doc" | "res.doc" -> true
42-
| _ -> false
39+
let tag_is_doc s = s = "res.doc"
40+
4341
let tag_is_intern_local s = s = "internal.local"
4442

4543
let rec get_attribute_payload check_text (attributes : Typedtree.attributes) =

jscomp/gentype_tests/typescript-react-example/src/Docstrings.gen.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,11 @@ export type t = "A" | "B";
1010
/** hello */
1111
export const flat: number = DocstringsJS.flat as any;
1212

13-
/** \n * Sign a message with a key.\n *\n * @param message - A message to be signed\n * @param key - The key with which to sign the message\n * @returns A signed message\n */
13+
/** * Sign a message with a key.
14+
*
15+
* @param message - A message to be signed
16+
* @param key - The key with which to sign the message
17+
* @returns A signed message */
1418
export const signMessage: (message:string, key:number) => string = DocstringsJS.signMessage as any;
1519

1620
export const one: (a:number) => number = DocstringsJS.one as any;

jscomp/gentype_tests/typescript-react-example/src/Docstrings.res

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
1-
@ocaml.doc(" hello ") @genType
1+
/** hello */
2+
@genType
23
let flat = 34
34

4-
@ocaml.doc("
5+
/**
56
* Sign a message with a key.
67
*
78
* @param message - A message to be signed
89
* @param key - The key with which to sign the message
910
* @returns A signed message
10-
")
11+
*/
1112
@genType
1213
let signMessage = (. message, key) => message ++ string_of_int(key)
1314

0 commit comments

Comments
 (0)