Skip to content

Commit 70a3846

Browse files
committed
Merge branch 'master' into feat-publish-diagnostics
2 parents d11c143 + d48ee33 commit 70a3846

File tree

330 files changed

+71488
-1365
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

330 files changed

+71488
-1365
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
- Fix issue where the server would crash if the project contains an OCaml file with a syntax error.
1212
- Add configuration option for suppressing the "Do you want to start a build?" prompt.
1313
- Add configuration option for autostarting the Code Analyzer.
14+
- Sync with latest parser/printer.
1415

1516
## 1.3.0
1617

Makefile

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
SHELL = /bin/bash
2+
3+
build:
4+
make -C analysis build
5+
6+
clean:
7+
make -C analysis clean
8+
9+
clean-deep:
10+
make -C analysis clean-deep
11+
12+
test:
13+
make -C analysis test
14+
15+
.DEFAULT_GOAL := build
16+
17+
.PHONY: build clean clean-deep test

analysis/.ocamlformat

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
profile = default
2+
version = 0.22.4
3+
4+
field-space = tight-decl
5+
break-cases = toplevel
6+
module-item-spacing = preserve
17
cases-exp-indent = 2
28
space-around-arrays = false
39
space-around-lists = false

analysis/.ocamlformat-ignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
vendor/compiler-libs-406/*
2+
vendor/res_outcome_printer/*

analysis/Makefile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ build: build-analysis-binary build-reanalyze build-tests
1616
dce: build-analysis-binary
1717
opam exec reanalyze.exe -- -dce-cmt _build -suppress vendor
1818

19+
format:
20+
dune build @fmt --auto-promote
21+
1922
test-analysis-binary: build-analysis-binary
2023
make -C tests test
2124

@@ -35,4 +38,4 @@ clean-deep:
3538

3639
.DEFAULT_GOAL := build
3740

38-
.PHONY: build-analysis-binary build-reanalyze build-tests dce clean clean-deep test
41+
.PHONY: build-analysis-binary build-reanalyze build-tests dce clean clean-deep format test
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
/node_modules
2+
/lib
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
####{BSB GENERATED: NO EDIT
2+
FLG -ppx '/Users/cristianocalcagno/GitHub/rescript-vscode/analysis/examples/larger-project/node_modules/rescript/darwin/bsc.exe -as-ppx -bs-jsx 3'
3+
S /Users/cristianocalcagno/GitHub/rescript-vscode/analysis/examples/larger-project/node_modules/rescript/lib/ocaml
4+
B /Users/cristianocalcagno/GitHub/rescript-vscode/analysis/examples/larger-project/node_modules/rescript/lib/ocaml
5+
FLG -w +a-4-9-20-40-41-42-50-61-102
6+
S /Users/cristianocalcagno/GitHub/rescript-vscode/analysis/examples/larger-project/node_modules/@rescript/react/lib/ocaml
7+
B /Users/cristianocalcagno/GitHub/rescript-vscode/analysis/examples/larger-project/node_modules/@rescript/react/lib/ocaml
8+
S /Users/cristianocalcagno/GitHub/rescript-vscode/analysis/examples/larger-project/node_modules/@glennsl/bs-json/lib/ocaml
9+
B /Users/cristianocalcagno/GitHub/rescript-vscode/analysis/examples/larger-project/node_modules/@glennsl/bs-json/lib/ocaml
10+
S src
11+
B lib/bs/src
12+
S src/exception
13+
B lib/bs/src/exception
14+
####BSB GENERATED: NO EDIT}

analysis/examples/larger-project/.watchmanconfig

Whitespace-only changes.
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"reanalyze": {
3+
"analysis": ["dce"],
4+
"suppress": [],
5+
"unsuppress": []
6+
},
7+
"name": "sample-typescript-app",
8+
"bsc-flags": ["-bs-super-errors -w a"],
9+
"reason": { "react-jsx": 3 },
10+
"bs-dependencies": ["@rescript/react", "@glennsl/bs-json"],
11+
"sources": [
12+
{
13+
"dir": "src",
14+
"subdirs": true
15+
}
16+
],
17+
"package-specs": {
18+
"module": "es6",
19+
"in-source": true
20+
}
21+
}

analysis/examples/larger-project/package-lock.json

Lines changed: 192 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"name": "large-project",
3+
"version": "0.1.0",
4+
"private": true,
5+
"scripts": {
6+
"start": "rescript build -w",
7+
"build": "rescript build",
8+
"clean": "rescript clean -with-deps"
9+
},
10+
"devDependencies": {
11+
"react": "^16.13.1",
12+
"react-dom": "^16.8.6",
13+
"rescript": "^9.1.4"
14+
},
15+
"dependencies": {
16+
"@glennsl/bs-json": "^5.0.4",
17+
"@rescript/react": "^0.10.3"
18+
}
19+
}

analysis/examples/larger-project/src/AutoAnnotate.js

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
type variant = R(int)
2+
3+
@genType
4+
type record = {variant: variant}
5+
6+
type r2 = {r2: int}
7+
8+
type r3 = {r3: int}
9+
10+
type r4 = {r4: int}
11+
12+
@genType
13+
type annotatedVariant =
14+
| R2(r2, r3)
15+
| R4(r4)

analysis/examples/larger-project/src/BootloaderResource.js

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
/* NOTE: This is a spooky interface that provides no type safety. It should be
2+
* improved. Use with caution. */
3+
@module("BootloaderResource")
4+
external read: JSResource.t<'a> => 'a = "read"

analysis/examples/larger-project/src/BucklescriptAnnotations.js

Lines changed: 13 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
@genType
2+
type someMutableFields = {
3+
@set
4+
"mutable0": string,
5+
"immutable": int,
6+
@set
7+
"mutable1": string,
8+
@set
9+
"mutable2": string,
10+
}
11+
12+
@genType
13+
type someMethods = {
14+
@meth
15+
"send": string => unit,
16+
@meth
17+
"on": (string, (. int) => unit) => unit,
18+
@meth
19+
"threeargs": (int, string, int) => string,
20+
"twoArgs": (. int, string) => int,
21+
}
22+
23+
// let foo = (x: someMethods) => x["threeargs"](3, "a", 4)
24+
25+
let bar = (x: someMethods) => {
26+
let f = x["twoArgs"]
27+
f(. 3, "a")
28+
}

analysis/examples/larger-project/src/ComponentAsProp.js

Lines changed: 19 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)