Skip to content

Commit d01d1e4

Browse files
committed
Unify with dev binary name
1 parent 2a65409 commit d01d1e4

File tree

8 files changed

+28
-25
lines changed

8 files changed

+28
-25
lines changed

.github/workflows/ci.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ jobs:
6363
run: |
6464
cd analysis
6565
mkdir ${{matrix.artifact-folder}}
66-
mv run.exe ${{matrix.artifact-folder}}/rescript-editor-analysis.exe
66+
mv rescript-editor-analysis.exe ${{matrix.artifact-folder}}
6767
tar -cvf binary.tar ${{matrix.artifact-folder}}
6868
6969
- uses: actions/upload-artifact@v2

CONTRIBUTING.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Thanks for your interest. Below is an informal spec of how the plugin's server c
1111
│ └── extension.ts // Language Client entry point
1212
├── analysis // Native binary powering hover, autocomplete, etc.
1313
│ ├── src
14-
│ └── run.exe // Dev-time analysis binary
14+
│ └── rescript-editor-analysis.exe // Dev-time analysis binary
1515
├── package.json // The extension manifest
1616
└── server // Language Server. Usable standalone
1717
├── src
@@ -164,6 +164,6 @@ Currently the release is vetted and done by @chenglou.
164164

165165
- Bump the version properly in `package.json` and `server/package.json` and their lockfiles and make a new commit.
166166
- Make sure @ryyppy is aware of your changes. He needs to sync them over to the vim plugin.
167-
- Download and unzip the 3 platforms' production binaries from the Github CI. Put them into `server/analysis_binaries`. Name them `darwin-run.exe`, `linux-run.exe` and `win32-run.exe`.
167+
- Download and unzip the 3 platforms' production binaries from the Github CI. Put them into `server/analysis_binaries`.
168168
- Use `vsce publish` to publish. Official VSCode guide [here](https://code.visualstudio.com/api/working-with-extensions/publishing-extension). Only @chenglou has the publishing rights right now.
169169
- Not done! Make a new manual release [here](https://github.com/rescript-lang/rescript-vscode/releases); use `vsce package` to package up a standalone `.vsix` plugin and attach it onto that new release. This is for folks who don't use the VSCode marketplace.

analysis/Makefile

+5-3
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ OCAMLOPT = ocamlopt.opt
66
OCAMLFLAGS = -g -w +26+27+32+33+39 -bin-annot -I +compiler-libs $(INCLUDES)
77
OCAMLDEP = ocamldep.opt
88

9+
OUTPUT = rescript-editor-analysis.exe
10+
911
%.cmi : %.mli
1012
@echo Building $@
1113
@$(OCAMLOPT) $(OCAMLFLAGS) -c $<
@@ -19,13 +21,13 @@ depend:
1921

2022
SOURCE_FILES = $(shell $(OCAMLDEP) -sort `find src -name "*.ml"` | sed -E "s/\.ml/.cmx/g")
2123

22-
run.exe: $(SOURCE_FILES)
24+
$(OUTPUT): $(SOURCE_FILES)
2325
@echo Linking...
24-
@$(OCAMLOPT) $(OCAMLFLAGS) -O2 -o run.exe \
26+
@$(OCAMLOPT) $(OCAMLFLAGS) -O2 -o $(OUTPUT) \
2527
-I +compiler-libs unix.cmxa str.cmxa ocamlcommon.cmxa $(INCLUDES) $(SOURCE_FILES)
2628
@echo Done!
2729

28-
build-native: run.exe depend
30+
build-native: $(OUTPUT) depend
2931

3032
dce: build-native
3133
../node_modules/.bin/reanalyze -dce-cmt src -suppress src/vendor

analysis/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ See main CONTRIBUTING.md's repo structure. Additionally, `examples/` is a conven
1313
## Usage
1414

1515
```sh
16-
./run.exe --help
16+
./rescript-editor-analysis.exe --help
1717
```
1818

1919
## History

analysis/src/Cli.ml

+14-14
Original file line numberDiff line numberDiff line change
@@ -3,45 +3,45 @@ let help =
33
**Private CLI For rescript-vscode usage only**
44

55
Examples:
6-
./run.exe complete src/MyFile.res 0 4 currentContent.res
7-
./run.exe definition src/MyFile.res 9 3
8-
./run.exe dump src/MyFile.res src/MyFile2.res
9-
./run.exe documentSymbol src/Foo.res
10-
./run.exe hover src/MyFile.res 10 2
11-
./run.exe references src/MyFile.res 10 2
12-
./run.exe test src/MyFile.res
6+
./rescript-editor-analysis.exe complete src/MyFile.res 0 4 currentContent.res
7+
./rescript-editor-analysis.exe definition src/MyFile.res 9 3
8+
./rescript-editor-analysis.exe dump src/MyFile.res src/MyFile2.res
9+
./rescript-editor-analysis.exe documentSymbol src/Foo.res
10+
./rescript-editor-analysis.exe hover src/MyFile.res 10 2
11+
./rescript-editor-analysis.exe references src/MyFile.res 10 2
12+
./rescript-editor-analysis.exe test src/MyFile.res
1313

1414
Note: coordinates are zero-based, so the first position is 0 0.
1515

1616
Options:
1717
complete: compute autocomplete for MyFile.res at line 0 and column 4,
1818
where MyFile.res is being edited and the editor content is in file current.res.
1919

20-
./run.exe complete src/MyFile.res 0 4 current.res
20+
./rescript-editor-analysis.exe complete src/MyFile.res 0 4 current.res
2121

2222
definition: get definition for item in MyFile.res at line 10 column 2:
2323

24-
./run.exe definition src/MyFile.res 10 2
24+
./rescript-editor-analysis.exe definition src/MyFile.res 10 2
2525

2626
dump: for debugging, show all definitions and hovers for MyFile.res and MyFile.res:
2727

28-
./run.exe dump src/Foo.res src/MyFile.res
28+
./rescript-editor-analysis.exe dump src/Foo.res src/MyFile.res
2929

3030
documentSymbol: get all symbols declared in MyFile.res
3131

32-
./run.exe documentSymbol src/MyFile.res
32+
./rescript-editor-analysis.exe documentSymbol src/MyFile.res
3333

3434
hover: get inferred type for MyFile.res at line 10 column 2:
3535

36-
./run.exe hover src/MyFile.res 10 2
36+
./rescript-editor-analysis.exe hover src/MyFile.res 10 2
3737

3838
references: get all references to item in MyFile.res at line 10 column 2:
3939

40-
./run.exe references src/MyFile.res 10 2
40+
./rescript-editor-analysis.exe references src/MyFile.res 10 2
4141

4242
test: run tests specified by special comments in file src/MyFile.res
4343

44-
./run.exe test src/src/MyFile.res
44+
./rescript-editor-analysis.exe test src/src/MyFile.res
4545
|}
4646

4747
let main () =

analysis/test.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ function exp {
33
}
44

55
for file in tests/src/*.res[i]; do
6-
./run.exe test $file &> $(exp $file)
6+
./rescript-editor-analysis.exe test $file &> $(exp $file)
77
done
88

99
warningYellow='\033[0;33m'

server/analysis_binaries/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
We store the analysis production binaries here.
1+
Put the `linux`, `darwin` and `win32` folders unzipped from CI here. These are the production binaries.

server/src/constants.ts

+3-2
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,13 @@ export let analysisDevPath = path.join(
2020
path.dirname(__dirname),
2121
"..",
2222
"analysis",
23-
"run.exe"
23+
"rescript-editor-analysis.exe"
2424
);
2525
export let analysisProdPath = path.join(
2626
path.dirname(__dirname),
2727
"analysis_binaries",
28-
process.platform + "-run.exe"
28+
process.platform,
29+
"rescript-editor-analysis.exe"
2930
);
3031

3132
// can't use the native bsb since we might need the watcher -w flag, which is only in the js wrapper

0 commit comments

Comments
 (0)