Skip to content

Commit ae1d3eb

Browse files
committed
Merge remote-tracking branch 'origin/main' into doorgan/multiroot_support
2 parents 1a6a12e + 0dfa33a commit ae1d3eb

File tree

51 files changed

+931
-370
lines changed

Some content is hidden

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

51 files changed

+931
-370
lines changed

.github/matrix.json

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,113 +1,141 @@
11
{
22
"include": [
33
{
4+
"os": "ubuntu-latest",
45
"otp": "28",
56
"elixir": "1.19",
67
"project": "engine"
78
},
89
{
10+
"os": "ubuntu-latest",
911
"otp": "28",
1012
"elixir": "1.18.4",
1113
"project": "engine"
1214
},
1315
{
16+
"os": "ubuntu-latest",
1417
"otp": "27",
1518
"elixir": "1.18",
1619
"project": "engine"
1720
},
1821
{
22+
"os": "ubuntu-latest",
1923
"otp": "26",
2024
"elixir": "1.18",
2125
"project": "engine"
2226
},
2327
{
28+
"os": "ubuntu-latest",
2429
"otp": "27",
2530
"elixir": "1.17",
2631
"project": "engine"
2732
},
2833
{
34+
"os": "ubuntu-latest",
2935
"otp": "26",
3036
"elixir": "1.17",
3137
"project": "engine"
3238
},
3339
{
40+
"os": "ubuntu-latest",
3441
"otp": "26",
3542
"elixir": "1.16",
3643
"project": "engine"
3744
},
3845
{
46+
"os": "ubuntu-latest",
3947
"otp": "28",
4048
"elixir": "1.19",
4149
"project": "expert_credo"
4250
},
4351
{
52+
"os": "ubuntu-latest",
4453
"otp": "28",
4554
"elixir": "1.18.4",
4655
"project": "expert_credo"
4756
},
4857
{
58+
"os": "ubuntu-latest",
4959
"otp": "27",
5060
"elixir": "1.18",
5161
"project": "expert_credo"
5262
},
5363
{
64+
"os": "ubuntu-latest",
5465
"otp": "26",
5566
"elixir": "1.18",
5667
"project": "expert_credo"
5768
},
5869
{
70+
"os": "ubuntu-latest",
5971
"otp": "27",
6072
"elixir": "1.17",
6173
"project": "expert_credo"
6274
},
6375
{
76+
"os": "ubuntu-latest",
6477
"otp": "26",
6578
"elixir": "1.17",
6679
"project": "expert_credo"
6780
},
6881
{
82+
"os": "ubuntu-latest",
6983
"otp": "26",
7084
"elixir": "1.16",
7185
"project": "expert_credo"
7286
},
7387
{
88+
"os": "ubuntu-latest",
7489
"otp": "28",
7590
"elixir": "1.19",
7691
"project": "forge"
7792
},
7893
{
94+
"os": "ubuntu-latest",
7995
"otp": "28",
8096
"elixir": "1.18.4",
8197
"project": "forge"
8298
},
8399
{
100+
"os": "ubuntu-latest",
84101
"otp": "27",
85102
"elixir": "1.18",
86103
"project": "forge"
87104
},
88105
{
106+
"os": "ubuntu-latest",
89107
"otp": "26",
90108
"elixir": "1.18",
91109
"project": "forge"
92110
},
93111
{
112+
"os": "ubuntu-latest",
94113
"otp": "27",
95114
"elixir": "1.17",
96115
"project": "forge"
97116
},
98117
{
118+
"os": "ubuntu-latest",
99119
"otp": "26",
100120
"elixir": "1.17",
101121
"project": "forge"
102122
},
103123
{
124+
"os": "ubuntu-latest",
104125
"otp": "26",
105126
"elixir": "1.16",
106127
"project": "forge"
107128
},
108129
{
130+
"os": "ubuntu-latest",
109131
"otp": "27.3.4.1",
110-
"elixir": "1.17.3",
132+
"elixir": "1.18.4",
133+
"project": "expert"
134+
},
135+
{
136+
"os": "windows-2022",
137+
"otp": "27.3.4.1",
138+
"elixir": "1.18.4",
111139
"project": "expert"
112140
}
113141
]

.github/workflows/ci-nix.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
2020

2121
- name: Install Nix
22-
uses: cachix/install-nix-action@0b0e072294b088b73964f1d72dfdac0951439dbd # v31.8.4
22+
uses: cachix/install-nix-action@4e002c8ec80594ecd40e759629461e26c8abed15 # v31.9.0
2323

2424
- name: Setup Nix GHA Cache
2525
uses: DeterminateSystems/magic-nix-cache-action@565684385bcd71bad329742eefe8d12f2e765b39 # v13

.github/workflows/ci.yml

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ jobs:
4141
# Step: Define how to cache deps. Restores existing cache if present.
4242
- name: Cache deps
4343
id: cache-deps
44-
uses: actions/cache@v4
44+
uses: actions/cache@v5
4545
with:
4646
path: |
4747
apps/${{ matrix.project }}/deps
@@ -89,7 +89,7 @@ jobs:
8989
# Step: Define how to cache deps. Restores existing cache if present.
9090
- name: Cache deps
9191
id: cache-deps
92-
uses: actions/cache@v4
92+
uses: actions/cache@v5
9393
with:
9494
path: |
9595
apps/${{ matrix.project }}/deps
@@ -102,7 +102,7 @@ jobs:
102102
# Step: Create dialyzer .plt files if they're not present
103103
- name: Cache dialyzer plt files
104104
id: cache-plt
105-
uses: actions/cache@v4
105+
uses: actions/cache@v5
106106
with:
107107
key: expert-plts-${{ env.DEFAULT_OTP }}-${{ env.DEFAULT_ELIXIR }}-${{ hashFiles('apps/${{ matrix.project }}/mix.lock' ) }}
108108
restore-keys: |
@@ -135,9 +135,9 @@ jobs:
135135
os:
136136
- name: ubuntu-latest
137137
target: linux_amd64
138-
- name: macos-14
138+
- name: macos-15
139139
target: darwin_arm64
140-
- name: macos-13
140+
- name: macos-14
141141
target: darwin_amd64
142142

143143
include:
@@ -161,7 +161,7 @@ jobs:
161161

162162
- name: Cache deps
163163
id: cache-deps
164-
uses: actions/cache@v4
164+
uses: actions/cache@v5
165165
with:
166166
path: |
167167
apps/**/deps
@@ -172,7 +172,7 @@ jobs:
172172
${{ runner.os }}-mix-${{ matrix.elixir }}-${{ matrix.otp }}-
173173
174174
- name: Build and release
175-
run: just release-local
175+
run: just burrito-local
176176

177177
prep-matrix:
178178
runs-on: ubuntu-latest
@@ -186,12 +186,15 @@ jobs:
186186
run: echo "matrix=$(jq -c . < .github/matrix.json)" >> $GITHUB_OUTPUT
187187

188188
test:
189-
runs-on: ubuntu-latest
190-
name: Test ${{ matrix.project }} on OTP ${{matrix.otp}} / Elixir ${{matrix.elixir}}
189+
runs-on: ${{matrix.os}}
190+
name: Test ${{ matrix.project }} on OTP ${{matrix.otp}} / Elixir ${{matrix.elixir}} / ${{matrix.os}}
191191
needs: prep-matrix
192192
strategy:
193193
matrix: ${{ fromJson(needs.prep-matrix.outputs.matrix) }}
194194
steps:
195+
- name: Set git to use original line ending (Windows)
196+
if: runner.os == 'Windows'
197+
run: git config --global core.autocrlf false
195198
- name: Checkout code
196199
uses: actions/checkout@v6
197200

@@ -204,7 +207,7 @@ jobs:
204207

205208
- name: Cache deps
206209
id: cache-deps
207-
uses: actions/cache@v4
210+
uses: actions/cache@v5
208211
with:
209212
path: |
210213
apps/${{ matrix.project }}/deps

.github/workflows/nightly.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
- run: just deps engine
2727
- name: Set release version to latest rev
2828
run: sed -i "$ s/$/-$(git rev-parse --short HEAD)/" version.txt
29-
- run: just release-all
29+
- run: just burrito
3030
env:
3131
MIX_ENV: prod
3232
- name: Create Checksum

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ jobs:
4747
with:
4848
version: "0.15.2"
4949
- uses: actions/checkout@v6
50-
- run: just release-all
50+
- run: just burrito
5151
env:
5252
MIX_ENV: prod
5353
- name: Create Checksum

README.md

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,17 +23,36 @@ Then point your editor to the downloaded binary.
2323

2424
### Building from source
2525

26-
To build Expert from source, you need Zig `0.15.2` installed on your system. Later versions will not work.
26+
Expert can be built in two ways: building a regular release for your own system(a "plain" release), or building
27+
a "burrito" release that works on multiple systems.
2728

28-
Then you can run the following command or follow the instructions in the [Installation Instructions](pages/installation.md):
29+
To build Expert for your system, run the following command:
2930

3031
```sh
31-
just release-local
32+
just release
33+
```
34+
35+
You can then point your editor to the `start_expert` executable in the generated release.
36+
You can also run `start_expert --help` to see available options.
37+
38+
> [!IMPORTANT]
39+
>
40+
> If your editor doesn't do it automatically, make sure to pass the `--stdio` flag to Expert.
41+
42+
To build Expert using burrito, you need Zig `0.15.2` installed on your system.
43+
Later versions will not work.
44+
45+
Then you can run the following command:
46+
47+
```sh
48+
just burrito-local
3249
```
3350

3451
This will build the Expert binary and place it in the `apps/expert/burrito_out` directory. You can then point your
3552
editor to this binary.
3653

54+
You can find more information in the [Installation Instructions](pages/installation.md).
55+
3756
## Sponsorship
3857

3958
Thank you to our corporate sponsors! Expert is currently in alpha and [we have organized all future work, including the first release, as milestones](https://github.com/elixir-lang/expert/milestones). If you'd like to start sponsoring the project, please read more below.

apps/engine/lib/engine/bootstrap.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ defmodule Engine.Bootstrap do
5252
defp start_logger(%Project{} = project) do
5353
log_file_name =
5454
project
55-
|> Project.workspace_path("project.log")
55+
|> Project.workspace_path("project-#{Project.name(project)}.log")
5656
|> String.to_charlist()
5757

5858
handler_name = :"#{Project.name(project)}_handler"

apps/engine/lib/engine/code_mod/diff.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ defmodule Engine.CodeMod.Diff do
101101
end
102102

103103
defp advance(<<c::utf8, rest::binary>>, {line, unit}, edits) do
104-
increment = CodeUnit.count(:utf8, <<c::utf8>>)
104+
increment = CodeUnit.count(:utf16, <<c::utf8>>)
105105
advance(rest, {line, unit + increment}, edits)
106106
end
107107

apps/engine/lib/engine/mix.tasks.deps.safe_compile.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ unless Elixir.Features.compile_keeps_current_directory?() do
282282
makefile_win? = makefile_win?(dep)
283283

284284
command =
285-
case :os.type() do
285+
case Forge.OS.type() do
286286
{:win32, _} when makefile_win? ->
287287
"nmake /F Makefile.win"
288288

apps/engine/lib/engine/module/loader.ex

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,18 @@ defmodule Engine.Module.Loader do
2323

2424
state ->
2525
result = Code.ensure_loaded(module_name)
26-
{result, Map.put(state, module_name, result)}
26+
# Note(doorgan): I'm not sure if it's just a timing issue, but on Windows it
27+
# can sometimes take a little bit before this function returns {:module, name}
28+
# so I figured not caching the error result here should work. This module is a
29+
# cache and I think most of the time this is called the module will already
30+
# have been loaded.
31+
new_state =
32+
case result do
33+
{:module, ^module_name} -> Map.put(state, module_name, result)
34+
_ -> state
35+
end
36+
37+
{result, new_state}
2738
end)
2839
end
2940

0 commit comments

Comments
 (0)