File tree Expand file tree Collapse file tree 5 files changed +94
-14
lines changed Expand file tree Collapse file tree 5 files changed +94
-14
lines changed Original file line number Diff line number Diff line change @@ -37,16 +37,35 @@ https://github.com/sponsors/mhanberg
37
37
38
38
## Development
39
39
40
+ Next LS uses [ just] ( https://github.com/casey/just ) to coordinate command tasks.
41
+
40
42
``` bash
43
+ # list all tasks
44
+ just --list
45
+ # show a fzf finder of all tasks
46
+ just choose
47
+
48
+ # default task, runs `deps compile build-local
49
+ just
50
+
41
51
# install deps
42
- mix deps.get
52
+ just deps
53
+
54
+ # install compile
55
+ just compile
43
56
44
57
# start the local server for development in TCP mode
45
58
# see editor extension docs for information on how to connect to a server in TCP mode
46
- bin/start --port 9000
59
+ just start
47
60
48
61
# run the tests
49
- mix test
62
+ just test
63
+
64
+ # build a local burrito'd exe
65
+ just build-local
66
+
67
+ # build burrito'd exes for all platforms
68
+ just build-all
50
69
```
51
70
52
71
## Production release
@@ -59,18 +78,18 @@ Executables are output to `./burrito_out`.
59
78
60
79
``` bash
61
80
# produces executables for all the targets specified in the `mix.exs` file
62
- NEXTLS_RELEASE_MODE= " burrito " MIX_ENV=prod mix release
81
+ just build-all
63
82
64
83
# produce an executable for a single target
65
- BURRITO_TARGET=linux_amd64 MIX_ENV=prod mix release
84
+ just build-local
66
85
```
67
86
68
87
### Traditional
69
88
70
89
You can also build Next LS as a traditional Mix release.
71
90
72
91
``` bash
73
- MIX_ENV=prod mix release plain
92
+ just build- plain
74
93
```
75
94
76
95
## Contributing
Original file line number Diff line number Diff line change @@ -2,4 +2,12 @@ import Config
2
2
3
3
config :next_ls , :indexing_timeout , 100
4
4
5
+ case System . get_env ( "NEXTLS_RELEASE_MODE" , "plain" ) do
6
+ "burrito" ->
7
+ config :next_ls , arg_parser: { Burrito.Util.Args , :get_arguments , [ ] }
8
+
9
+ "plain" ->
10
+ config :next_ls , arg_parser: { System , :argv , [ ] }
11
+ end
12
+
5
13
import_config "#{ config_env ( ) } .exs"
Original file line number Diff line number Diff line change 1
1
import Config
2
2
3
- case System . get_env ( "NEXTLS_RELEASE_MODE" , "plain" ) do
4
- "burrito" ->
5
- config :next_ls , arg_parser: { Burrito.Util.Args , :get_arguments , [ ] }
6
-
7
- "plain" ->
8
- config :next_ls , arg_parser: { System , :argv , [ ] }
9
- end
10
-
11
3
if System . get_env ( "NEXTLS_OTEL" ) == "1" do
12
4
config :next_ls ,
13
5
otel: true
Original file line number Diff line number Diff line change 111
111
elixir
112
112
aliased_7zz
113
113
pkgs . autoconf
114
+ pkgs . just
114
115
pkgs . automake
115
116
pkgs . ncurses5
116
117
pkgs . openssl
Original file line number Diff line number Diff line change
1
+ default : deps compile build-local
2
+
3
+ choose :
4
+ just --choose
5
+
6
+ deps :
7
+ mix deps.get
8
+
9
+ compile :
10
+ mix compile
11
+
12
+ start :
13
+ bin/ start --port 9000
14
+
15
+ test :
16
+ mix test
17
+
18
+ format :
19
+ mix format
20
+
21
+ lint :
22
+ #!/usr/bin/env bash
23
+ set -euxo pipefail
24
+
25
+ mix format --check-formatted
26
+ mix credo
27
+ mix dialyzer
28
+
29
+ [unix ]
30
+ build-local :
31
+ #!/usr/bin/env bash
32
+ case " {{ os ()}} -{{ arch ()}} " in
33
+ " linux-arm" | " linux-aarch64" )
34
+ target=linux_arm64 ;;
35
+ " linux-x86" | " linux-x86_64" )
36
+ target=linux_amd64 ;;
37
+ " macos-arm" | " macos-aarch64" )
38
+ target=darwin_arm64 ;;
39
+ " macos-x86" | " macos-x86_64" )
40
+ target=darwin_amd64 ;;
41
+ *)
42
+ echo " unsupported OS/Arch combination"
43
+ exit 1 ;;
44
+ esac
45
+
46
+ NEXTLS_RELEASE_MODE=burrito BURRITO_TARGET=" $target" MIX_ENV=prod mix release
47
+
48
+ [windows ]
49
+ build-local :
50
+ # idk actually how to set env vars like this on windows, might crash
51
+ NEXTLS_RELEASE_MODE=burrito BURRITO_TARGET=" windows_amd64" MIX_ENV=prod mix release
52
+
53
+ build-all :
54
+ NEXTLS_RELEASE_MODE=burrito MIX_ENV=prod mix release
55
+
56
+ build-plain :
57
+ MIX_ENV=prod mix release plain
58
+
59
+ bump-spitfire :
60
+ mix deps.update spitfire
You can’t perform that action at this time.
0 commit comments