@greenlabs/ppx-spice 0.1.7-rc1 → 0.1.7-rc2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/build_linux.yml +11 -29
- package/.github/workflows/build_macos.yml +10 -30
- package/.github/workflows/build_windows.yml +10 -24
- package/.github/workflows/publish.yml +21 -59
- package/.github/workflows/publish_prerelease.yml +24 -62
- package/README.md +5 -32
- package/package.json +1 -1
- package/ppx-linux.exe +0 -0
- package/ppx-osx.exe +0 -0
- package/src/ppx_spice.opam +2 -2
- package/src/esy.json +0 -21
|
@@ -4,48 +4,30 @@ on: [workflow_dispatch]
|
|
|
4
4
|
|
|
5
5
|
jobs:
|
|
6
6
|
build_linux:
|
|
7
|
-
name: ${{ matrix.os }}
|
|
7
|
+
name: ${{ matrix.os }}
|
|
8
8
|
runs-on: ${{ matrix.os }}
|
|
9
9
|
defaults:
|
|
10
10
|
run:
|
|
11
11
|
working-directory: src
|
|
12
12
|
strategy:
|
|
13
13
|
matrix:
|
|
14
|
-
node-version: [12.x]
|
|
15
14
|
os: [ubuntu-latest]
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
steps:
|
|
19
|
-
- name: Use Node.js ${{ matrix.node-version }}
|
|
20
|
-
uses: actions/setup-node@v1
|
|
21
|
-
with:
|
|
22
|
-
node-version: ${{ matrix.node-version }}
|
|
15
|
+
ocaml-compiler:
|
|
16
|
+
- 4.12.1
|
|
23
17
|
|
|
18
|
+
steps:
|
|
24
19
|
- uses: actions/checkout@v2
|
|
25
20
|
|
|
26
|
-
- name:
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
- name: Install
|
|
30
|
-
run: esy install
|
|
31
|
-
|
|
32
|
-
- name: Print esy cache
|
|
33
|
-
id: print_esy_cache
|
|
34
|
-
run: node ../.github/workflows/print_esy_cache.js
|
|
35
|
-
|
|
36
|
-
- name: Try to restore dependencies cache
|
|
37
|
-
uses: actions/cache@v2
|
|
38
|
-
id: deps-cache
|
|
21
|
+
- name: Use OCaml ${{ matrix.ocaml-compiler}}
|
|
22
|
+
uses: ocaml/setup-ocaml@v2
|
|
39
23
|
with:
|
|
40
|
-
|
|
41
|
-
key: build-${{ matrix.os }}-${{ hashFiles('**/index.json') }}
|
|
42
|
-
restore-keys: build-${{ matrix.os }}-
|
|
24
|
+
ocaml-compiler: ${{ matrix.ocaml-compiler }}
|
|
43
25
|
|
|
44
|
-
- name:
|
|
45
|
-
run:
|
|
26
|
+
- name: Install deps
|
|
27
|
+
run: opam install . --deps-only --with-test
|
|
46
28
|
|
|
47
|
-
- name: Build
|
|
48
|
-
run:
|
|
29
|
+
- name: Build
|
|
30
|
+
run: opam exec -- dune build
|
|
49
31
|
|
|
50
32
|
- name: Copy built PPX file
|
|
51
33
|
run: |
|
|
@@ -4,50 +4,30 @@ on: [workflow_dispatch]
|
|
|
4
4
|
|
|
5
5
|
jobs:
|
|
6
6
|
build_macos:
|
|
7
|
-
name: ${{ matrix.os }}
|
|
7
|
+
name: ${{ matrix.os }}
|
|
8
8
|
runs-on: ${{ matrix.os }}
|
|
9
9
|
defaults:
|
|
10
10
|
run:
|
|
11
11
|
working-directory: src
|
|
12
12
|
strategy:
|
|
13
13
|
matrix:
|
|
14
|
-
node-version: [12.x]
|
|
15
14
|
os: [macOS-latest]
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
uses: actions/setup-node@v1
|
|
19
|
-
with:
|
|
20
|
-
node-version: ${{ matrix.node-version }}
|
|
15
|
+
ocaml-compiler:
|
|
16
|
+
- 4.12.1
|
|
21
17
|
|
|
18
|
+
steps:
|
|
22
19
|
- uses: actions/checkout@v2
|
|
23
20
|
|
|
24
|
-
- name:
|
|
25
|
-
|
|
26
|
-
npm install -g esy
|
|
27
|
-
|
|
28
|
-
- name: Try to restore install cache
|
|
29
|
-
uses: actions/cache@v1
|
|
21
|
+
- name: Use OCaml ${{ matrix.ocaml-compiler}}
|
|
22
|
+
uses: ocaml/setup-ocaml@v2
|
|
30
23
|
with:
|
|
31
|
-
|
|
32
|
-
key: source-${{ matrix.os }}-${{ hashFiles('**/index.json') }}
|
|
33
|
-
|
|
34
|
-
- name: Install
|
|
35
|
-
run: esy install
|
|
24
|
+
ocaml-compiler: ${{ matrix.ocaml-compiler }}
|
|
36
25
|
|
|
37
|
-
- name:
|
|
38
|
-
|
|
39
|
-
run: node ../.github/workflows/print_esy_cache.js
|
|
40
|
-
|
|
41
|
-
- name: Try to restore dependencies cache
|
|
42
|
-
id: deps-cache
|
|
43
|
-
uses: actions/cache@v1
|
|
44
|
-
with:
|
|
45
|
-
path: ${{ steps.print_esy_cache.outputs.esy_cache }}
|
|
46
|
-
key: build-${{ matrix.os }}-${{ hashFiles('**/index.json') }}
|
|
47
|
-
restore-keys: build-${{ matrix.os }}-
|
|
26
|
+
- name: Install deps
|
|
27
|
+
run: opam install . --deps-only --with-test
|
|
48
28
|
|
|
49
29
|
- name: Build
|
|
50
|
-
run:
|
|
30
|
+
run: opam exec -- dune build
|
|
51
31
|
|
|
52
32
|
- name: Copy built PPX file
|
|
53
33
|
run: |
|
|
@@ -11,37 +11,23 @@ jobs:
|
|
|
11
11
|
working-directory: src
|
|
12
12
|
strategy:
|
|
13
13
|
matrix:
|
|
14
|
-
node-version: [12.x]
|
|
15
14
|
os: [windows-latest]
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
uses: actions/setup-node@v1
|
|
19
|
-
with:
|
|
20
|
-
node-version: ${{ matrix.node-version }}
|
|
15
|
+
ocaml-compiler:
|
|
16
|
+
- 4.12.1
|
|
21
17
|
|
|
18
|
+
steps:
|
|
22
19
|
- uses: actions/checkout@v2
|
|
23
20
|
|
|
24
|
-
- name:
|
|
25
|
-
|
|
26
|
-
npm install -g esy
|
|
27
|
-
|
|
28
|
-
- name: Install
|
|
29
|
-
run: esy install
|
|
30
|
-
|
|
31
|
-
- name: Print esy cache
|
|
32
|
-
id: print_esy_cache
|
|
33
|
-
run: node ../.github/workflows/print_esy_cache.js
|
|
34
|
-
|
|
35
|
-
- name: Try to restore dependencies cache
|
|
36
|
-
id: deps-cache
|
|
37
|
-
uses: actions/cache@v2
|
|
21
|
+
- name: Use OCaml ${{ matrix.ocaml-compiler}}
|
|
22
|
+
uses: ocaml/setup-ocaml@v2
|
|
38
23
|
with:
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
24
|
+
ocaml-compiler: ${{ matrix.ocaml-compiler }}
|
|
25
|
+
|
|
26
|
+
- name: Install deps
|
|
27
|
+
run: opam install . --deps-only --with-test
|
|
42
28
|
|
|
43
29
|
- name: Build
|
|
44
|
-
run:
|
|
30
|
+
run: opam exec -- dune build
|
|
45
31
|
|
|
46
32
|
- name: Copy built PPX file
|
|
47
33
|
run: |
|
|
@@ -4,48 +4,30 @@ on: [workflow_dispatch]
|
|
|
4
4
|
|
|
5
5
|
jobs:
|
|
6
6
|
build_linux:
|
|
7
|
-
name: ${{ matrix.os }}
|
|
7
|
+
name: ${{ matrix.os }}
|
|
8
8
|
runs-on: ${{ matrix.os }}
|
|
9
9
|
defaults:
|
|
10
10
|
run:
|
|
11
11
|
working-directory: src
|
|
12
12
|
strategy:
|
|
13
13
|
matrix:
|
|
14
|
-
node-version: [12.x]
|
|
15
14
|
os: [ubuntu-latest]
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
steps:
|
|
19
|
-
- name: Use Node.js ${{ matrix.node-version }}
|
|
20
|
-
uses: actions/setup-node@v1
|
|
21
|
-
with:
|
|
22
|
-
node-version: ${{ matrix.node-version }}
|
|
15
|
+
ocaml-compiler:
|
|
16
|
+
- 4.12.1
|
|
23
17
|
|
|
18
|
+
steps:
|
|
24
19
|
- uses: actions/checkout@v2
|
|
25
20
|
|
|
26
|
-
- name:
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
- name: Install
|
|
30
|
-
run: esy install
|
|
31
|
-
|
|
32
|
-
- name: Print esy cache
|
|
33
|
-
id: print_esy_cache
|
|
34
|
-
run: node ../.github/workflows/print_esy_cache.js
|
|
35
|
-
|
|
36
|
-
- name: Try to restore dependencies cache
|
|
37
|
-
uses: actions/cache@v2
|
|
38
|
-
id: deps-cache
|
|
21
|
+
- name: Use OCaml ${{ matrix.ocaml-compiler}}
|
|
22
|
+
uses: ocaml/setup-ocaml@v2
|
|
39
23
|
with:
|
|
40
|
-
|
|
41
|
-
key: build-${{ matrix.os }}-${{ hashFiles('**/index.json') }}
|
|
42
|
-
restore-keys: build-${{ matrix.os }}-
|
|
24
|
+
ocaml-compiler: ${{ matrix.ocaml-compiler }}
|
|
43
25
|
|
|
44
|
-
- name:
|
|
45
|
-
run:
|
|
26
|
+
- name: Install deps
|
|
27
|
+
run: opam install . --deps-only --with-test
|
|
46
28
|
|
|
47
|
-
- name: Build
|
|
48
|
-
run:
|
|
29
|
+
- name: Build
|
|
30
|
+
run: opam exec -- dune build
|
|
49
31
|
|
|
50
32
|
- name: Copy built PPX file
|
|
51
33
|
run: |
|
|
@@ -59,50 +41,30 @@ jobs:
|
|
|
59
41
|
if-no-files-found: error
|
|
60
42
|
|
|
61
43
|
build_macos:
|
|
62
|
-
name: ${{ matrix.os }}
|
|
44
|
+
name: ${{ matrix.os }}
|
|
63
45
|
runs-on: ${{ matrix.os }}
|
|
64
46
|
defaults:
|
|
65
47
|
run:
|
|
66
48
|
working-directory: src
|
|
67
49
|
strategy:
|
|
68
50
|
matrix:
|
|
69
|
-
node-version: [12.x]
|
|
70
51
|
os: [macOS-latest]
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
uses: actions/setup-node@v1
|
|
74
|
-
with:
|
|
75
|
-
node-version: ${{ matrix.node-version }}
|
|
52
|
+
ocaml-compiler:
|
|
53
|
+
- 4.12.1
|
|
76
54
|
|
|
55
|
+
steps:
|
|
77
56
|
- uses: actions/checkout@v2
|
|
78
57
|
|
|
79
|
-
- name:
|
|
80
|
-
|
|
81
|
-
npm install -g esy
|
|
82
|
-
|
|
83
|
-
- name: Try to restore install cache
|
|
84
|
-
uses: actions/cache@v1
|
|
58
|
+
- name: Use OCaml ${{ matrix.ocaml-compiler}}
|
|
59
|
+
uses: ocaml/setup-ocaml@v2
|
|
85
60
|
with:
|
|
86
|
-
|
|
87
|
-
key: source-${{ matrix.os }}-${{ hashFiles('**/index.json') }}
|
|
88
|
-
|
|
89
|
-
- name: Install
|
|
90
|
-
run: esy install
|
|
61
|
+
ocaml-compiler: ${{ matrix.ocaml-compiler }}
|
|
91
62
|
|
|
92
|
-
- name:
|
|
93
|
-
|
|
94
|
-
run: node ../.github/workflows/print_esy_cache.js
|
|
95
|
-
|
|
96
|
-
- name: Try to restore dependencies cache
|
|
97
|
-
id: deps-cache
|
|
98
|
-
uses: actions/cache@v1
|
|
99
|
-
with:
|
|
100
|
-
path: ${{ steps.print_esy_cache.outputs.esy_cache }}
|
|
101
|
-
key: build-${{ matrix.os }}-${{ hashFiles('**/index.json') }}
|
|
102
|
-
restore-keys: build-${{ matrix.os }}-
|
|
63
|
+
- name: Install deps
|
|
64
|
+
run: opam install . --deps-only --with-test
|
|
103
65
|
|
|
104
66
|
- name: Build
|
|
105
|
-
run:
|
|
67
|
+
run: opam exec -- dune build
|
|
106
68
|
|
|
107
69
|
- name: Copy built PPX file
|
|
108
70
|
run: |
|
|
@@ -4,54 +4,36 @@ on:
|
|
|
4
4
|
workflow_dispatch:
|
|
5
5
|
inputs:
|
|
6
6
|
release_version:
|
|
7
|
-
description:
|
|
8
|
-
required: true
|
|
9
|
-
default:
|
|
7
|
+
description: "change npm release version"
|
|
8
|
+
required: true
|
|
9
|
+
default: ""
|
|
10
10
|
|
|
11
11
|
jobs:
|
|
12
12
|
build_linux:
|
|
13
|
-
name: ${{ matrix.os }}
|
|
13
|
+
name: ${{ matrix.os }}
|
|
14
14
|
runs-on: ${{ matrix.os }}
|
|
15
15
|
defaults:
|
|
16
16
|
run:
|
|
17
17
|
working-directory: src
|
|
18
18
|
strategy:
|
|
19
19
|
matrix:
|
|
20
|
-
node-version: [12.x]
|
|
21
20
|
os: [ubuntu-latest]
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
steps:
|
|
25
|
-
- name: Use Node.js ${{ matrix.node-version }}
|
|
26
|
-
uses: actions/setup-node@v1
|
|
27
|
-
with:
|
|
28
|
-
node-version: ${{ matrix.node-version }}
|
|
21
|
+
ocaml-compiler:
|
|
22
|
+
- 4.12.1
|
|
29
23
|
|
|
24
|
+
steps:
|
|
30
25
|
- uses: actions/checkout@v2
|
|
31
26
|
|
|
32
|
-
- name:
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
- name: Install
|
|
36
|
-
run: esy install
|
|
37
|
-
|
|
38
|
-
- name: Print esy cache
|
|
39
|
-
id: print_esy_cache
|
|
40
|
-
run: node ../.github/workflows/print_esy_cache.js
|
|
41
|
-
|
|
42
|
-
- name: Try to restore dependencies cache
|
|
43
|
-
uses: actions/cache@v2
|
|
44
|
-
id: deps-cache
|
|
27
|
+
- name: Use OCaml ${{ matrix.ocaml-compiler}}
|
|
28
|
+
uses: ocaml/setup-ocaml@v2
|
|
45
29
|
with:
|
|
46
|
-
|
|
47
|
-
key: build-${{ matrix.os }}-${{ hashFiles('**/index.json') }}
|
|
48
|
-
restore-keys: build-${{ matrix.os }}-
|
|
30
|
+
ocaml-compiler: ${{ matrix.ocaml-compiler }}
|
|
49
31
|
|
|
50
|
-
- name:
|
|
51
|
-
run:
|
|
32
|
+
- name: Install deps
|
|
33
|
+
run: opam install . --deps-only --with-test
|
|
52
34
|
|
|
53
|
-
- name: Build
|
|
54
|
-
run:
|
|
35
|
+
- name: Build
|
|
36
|
+
run: opam exec -- dune build
|
|
55
37
|
|
|
56
38
|
- name: Copy built PPX file
|
|
57
39
|
run: |
|
|
@@ -65,50 +47,30 @@ jobs:
|
|
|
65
47
|
if-no-files-found: error
|
|
66
48
|
|
|
67
49
|
build_macos:
|
|
68
|
-
name: ${{ matrix.os }}
|
|
50
|
+
name: ${{ matrix.os }}
|
|
69
51
|
runs-on: ${{ matrix.os }}
|
|
70
52
|
defaults:
|
|
71
53
|
run:
|
|
72
54
|
working-directory: src
|
|
73
55
|
strategy:
|
|
74
56
|
matrix:
|
|
75
|
-
node-version: [12.x]
|
|
76
57
|
os: [macOS-latest]
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
uses: actions/setup-node@v1
|
|
80
|
-
with:
|
|
81
|
-
node-version: ${{ matrix.node-version }}
|
|
58
|
+
ocaml-compiler:
|
|
59
|
+
- 4.12.1
|
|
82
60
|
|
|
61
|
+
steps:
|
|
83
62
|
- uses: actions/checkout@v2
|
|
84
63
|
|
|
85
|
-
- name:
|
|
86
|
-
|
|
87
|
-
npm install -g esy
|
|
88
|
-
|
|
89
|
-
- name: Try to restore install cache
|
|
90
|
-
uses: actions/cache@v1
|
|
64
|
+
- name: Use OCaml ${{ matrix.ocaml-compiler}}
|
|
65
|
+
uses: ocaml/setup-ocaml@v2
|
|
91
66
|
with:
|
|
92
|
-
|
|
93
|
-
key: source-${{ matrix.os }}-${{ hashFiles('**/index.json') }}
|
|
94
|
-
|
|
95
|
-
- name: Install
|
|
96
|
-
run: esy install
|
|
67
|
+
ocaml-compiler: ${{ matrix.ocaml-compiler }}
|
|
97
68
|
|
|
98
|
-
- name:
|
|
99
|
-
|
|
100
|
-
run: node ../.github/workflows/print_esy_cache.js
|
|
101
|
-
|
|
102
|
-
- name: Try to restore dependencies cache
|
|
103
|
-
id: deps-cache
|
|
104
|
-
uses: actions/cache@v1
|
|
105
|
-
with:
|
|
106
|
-
path: ${{ steps.print_esy_cache.outputs.esy_cache }}
|
|
107
|
-
key: build-${{ matrix.os }}-${{ hashFiles('**/index.json') }}
|
|
108
|
-
restore-keys: build-${{ matrix.os }}-
|
|
69
|
+
- name: Install deps
|
|
70
|
+
run: opam install . --deps-only --with-test
|
|
109
71
|
|
|
110
72
|
- name: Build
|
|
111
|
-
run:
|
|
73
|
+
run: opam exec -- dune build
|
|
112
74
|
|
|
113
75
|
- name: Copy built PPX file
|
|
114
76
|
run: |
|
package/README.md
CHANGED
|
@@ -138,39 +138,10 @@ yarn add -D @greenlabs/ppx-spice
|
|
|
138
138
|
|
|
139
139
|
## Development
|
|
140
140
|
|
|
141
|
-
### With Esy
|
|
142
|
-
|
|
143
|
-
1. Install dependencies
|
|
144
|
-
|
|
145
|
-
```
|
|
146
|
-
cd src
|
|
147
|
-
esy install
|
|
148
|
-
```
|
|
149
|
-
|
|
150
|
-
2. Build
|
|
151
|
-
|
|
152
|
-
```
|
|
153
|
-
(make sure in /src directory)
|
|
154
|
-
esy build
|
|
155
|
-
```
|
|
156
|
-
|
|
157
|
-
3. Test
|
|
158
|
-
|
|
159
|
-
```
|
|
160
|
-
cd test
|
|
161
|
-
|
|
162
|
-
(install dependencies)
|
|
163
|
-
yarn
|
|
164
|
-
|
|
165
|
-
(build --watch)
|
|
166
|
-
yarn res:clean && yarn res:watch
|
|
167
|
-
|
|
168
|
-
(run test --watch)
|
|
169
|
-
yarn test:watch
|
|
170
|
-
```
|
|
171
|
-
|
|
172
141
|
### With Dune
|
|
173
142
|
|
|
143
|
+
Make sure running the below commands in `/src`.
|
|
144
|
+
|
|
174
145
|
1. Create a sandbox with opam
|
|
175
146
|
|
|
176
147
|
```
|
|
@@ -180,7 +151,7 @@ opam switch create spice 4.12.1
|
|
|
180
151
|
2. Install dependencies
|
|
181
152
|
|
|
182
153
|
```
|
|
183
|
-
opam install
|
|
154
|
+
opam install . --deps-only
|
|
184
155
|
```
|
|
185
156
|
|
|
186
157
|
3. Build
|
|
@@ -191,6 +162,8 @@ dune build
|
|
|
191
162
|
|
|
192
163
|
4. Test
|
|
193
164
|
|
|
165
|
+
Make sure running tests in `/test`
|
|
166
|
+
|
|
194
167
|
```
|
|
195
168
|
cd test
|
|
196
169
|
|
package/package.json
CHANGED
package/ppx-linux.exe
CHANGED
|
Binary file
|
package/ppx-osx.exe
CHANGED
|
Binary file
|
package/src/ppx_spice.opam
CHANGED
|
@@ -12,9 +12,9 @@ homepage: "https://github.com/green-labs/ppx_spice"
|
|
|
12
12
|
bug-reports: "https://github.com/green-labs/ppx_spice/issues"
|
|
13
13
|
dev-repo: "git+https://github.com/green-labs/ppx_spice.git"
|
|
14
14
|
depends: [
|
|
15
|
-
"ocaml" {"4.12.1"}
|
|
15
|
+
"ocaml" { = "4.12.1"}
|
|
16
16
|
"dune" { >= "2.7"}
|
|
17
|
-
"ppxlib" {"0.23.0"}
|
|
17
|
+
"ppxlib" { = "0.23.0"}
|
|
18
18
|
]
|
|
19
19
|
build: [
|
|
20
20
|
["dune" "build" "-p" name "-j" jobs]
|
package/src/esy.json
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "ppx_spice",
|
|
3
|
-
"description": "OCaml/ReasonML ppx that generate parse/stringify function",
|
|
4
|
-
"scripts": {
|
|
5
|
-
"format": "dune build @fmt --auto-promote",
|
|
6
|
-
"release-static": "dune build --root . --only-packages '#{self.name}' --ignore-promoted-rules --no-config --profile release-static"
|
|
7
|
-
},
|
|
8
|
-
"esy": {
|
|
9
|
-
"build": "dune build -p #{self.name}",
|
|
10
|
-
"buildsInSource": "_build"
|
|
11
|
-
},
|
|
12
|
-
"dependencies": {
|
|
13
|
-
"@opam/dune": "*",
|
|
14
|
-
"@opam/ppxlib": "0.23.0",
|
|
15
|
-
"ocaml": "4.12.x"
|
|
16
|
-
},
|
|
17
|
-
"devDependencies": {
|
|
18
|
-
"@opam/ocaml-lsp-server": "1.8.3",
|
|
19
|
-
"@opam/ocamlformat": "0.19.0"
|
|
20
|
-
}
|
|
21
|
-
}
|