Skip to content

Commit 3bf6fd3

Browse files
committed
Unify with dev binary name
1 parent 754f707 commit 3bf6fd3

File tree

8 files changed

+23
-20
lines changed

8 files changed

+23
-20
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ jobs:
6262
run: |
6363
cd analysis
6464
mkdir ${{matrix.artifact-folder}}
65-
mv run.exe ${{matrix.artifact-folder}}/rescript-editor-analysis.exe
65+
mv rescript-editor-analysis.exe ${{matrix.artifact-folder}}
6666
tar -cvf binary.tar ${{matrix.artifact-folder}}
6767
6868
- uses: actions/upload-artifact@v2

CONTRIBUTING.md

Lines changed: 2 additions & 2 deletions
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

Lines changed: 5 additions & 3 deletions
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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,34 +3,34 @@ let help =
33
**Private CLI For rescript-vscode usage only**
44

55
Examples:
6-
./run.exe dump src/MyFile.res src/MyFile2.res
7-
./run.exe complete src/MyFile.res 0 4 currentContent.res
8-
./run.exe hover src/MyFile.res 10 2
9-
./run.exe definition src/MyFile.res 9 3
6+
./rescript-editor-analysis.exe dump src/MyFile.res src/MyFile2.res
7+
./rescript-editor-analysis.exe complete src/MyFile.res 0 4 currentContent.res
8+
./rescript-editor-analysis.exe hover src/MyFile.res 10 2
9+
./rescript-editor-analysis.exe definition src/MyFile.res 9 3
1010

1111
Note: coordinates are zero-based, so the first position is 0 0.
1212

1313
Options:
1414
dump: debugging. definition and hover for Foo.res and Foo2.res:
1515

16-
./run.exe dump src/Foo.res src/Foo2.res
16+
./rescript-editor-analysis.exe dump src/Foo.res src/Foo2.res
1717

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

21-
./run.exe complete src/Foo.res 0 4 current.res
21+
./rescript-editor-analysis.exe complete src/Foo.res 0 4 current.res
2222

2323
hover: get inferred type for Foo.res at line 10 column 2:
2424

25-
./run.exe hover src/Foo.res 10 2
25+
./rescript-editor-analysis.exe hover src/Foo.res 10 2
2626

2727
definition: get definition for item in Foo.res at line 10 column 2:
2828

29-
./run.exe definition src/Foo.res 10 2
29+
./rescript-editor-analysis.exe definition src/Foo.res 10 2
3030

3131
references: get references to item in Foo.res at line 10 column 2:
3232

33-
./run.exe references src/Foo.res 10 2|}
33+
./rescript-editor-analysis.exe references src/Foo.res 10 2|}
3434

3535
let main () =
3636
match Array.to_list Sys.argv with

analysis/test.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ function exp {
33
}
44

55
for file in tests/src/*.res; 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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 3 additions & 2 deletions
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)