Skip to content

Commit 102ef34

Browse files
committed
refactor: integrate GenLSP
1 parent c081bf9 commit 102ef34

Some content is hidden

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

57 files changed

+378
-1257
lines changed

.credo.exs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@
1818
{Credo.Check.Readability.PreferImplicitTry, false},
1919
{Credo.Check.Refactor.CyclomaticComplexity, max_complexity: 10},
2020
{Credo.Check.Refactor.Nesting, max_nesting: 3},
21+
{Credo.Check.Design.TagTODO, false},
22+
{Credo.Check.Design.TagFIXME, false},
2123
{Credo.Check.Refactor.PipeChainStart, []}
2224
]
2325
}

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,3 +29,4 @@ expert_debug
2929
priv/plts
3030

3131
apps/forge/src/future_elixir_parser.erl
32+
.notes/

Makefile

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,10 @@ env.test:
1212
export MIX_ENV=test
1313

1414
deps.poncho:
15-
$(foreach dir, $(poncho_dirs), cd apps/$(dir) && mix deps.get && cd ../..;)
15+
$(foreach dir, $(poncho_dirs), cd apps/$(dir) && echo $(dir) && mix deps.get && cd ../..;)
16+
17+
clean.poncho:
18+
$(foreach dir, $(poncho_dirs), cd apps/$(dir) && echo $(dir) && mix clean && cd ../..;)
1619

1720
deps.compile.poncho: deps.poncho
1821
$(foreach dir, $(poncho_dirs), cd apps/$(dir) && mix deps.compile && cd ../..;)
@@ -39,4 +42,4 @@ dialyzer.poncho: compile.poncho compile.protocols.poncho
3942
$(foreach dir, $(poncho_dirs), cd apps/$(dir) && mix dialyzer && cd ../..;)
4043

4144
package:
42-
cd apps/server && mix package
45+
cd apps/expert && mix package

apps/engine/benchmarks/ets_bench.exs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ defmodule BenchHelper do
3333
end
3434

3535
cwd = __DIR__
36-
project = Project.new("file://#{cwd}")
36+
project = Project.new(%GenLSP.LSP{mod: :foo}, "file://#{cwd}")
3737

3838
Engine.set_project(project)
3939
Project.ensure_workspace(project)

apps/engine/mix.exs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ defmodule Engine.MixProject do
4646
Mix.Dialyzer.dependency(),
4747
{:elixir_sense,
4848
github: "elixir-lsp/elixir_sense", ref: "73ce7e0d239342fb9527d7ba567203e77dbb9b25"},
49-
{:gen_lsp, "~> 0.10"},
49+
{:gen_lsp, github: "elixir-tools/gen_lsp", branch: "async"},
5050
{:patch, "~> 0.15", only: [:dev, :test], optional: true, runtime: false},
5151
{:path_glob, "~> 0.2", optional: true},
5252
{:phoenix_live_view, "~> 1.0", only: [:test], optional: true, runtime: false},

apps/engine/mix.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22
"benchee": {:hex, :benchee, "1.3.1", "c786e6a76321121a44229dde3988fc772bca73ea75170a73fd5f4ddf1af95ccf", [:mix], [{:deep_merge, "~> 1.0", [hex: :deep_merge, repo: "hexpm", optional: false]}, {:statistex, "~> 1.0", [hex: :statistex, repo: "hexpm", optional: false]}, {:table, "~> 0.1.0", [hex: :table, repo: "hexpm", optional: true]}], "hexpm", "76224c58ea1d0391c8309a8ecbfe27d71062878f59bd41a390266bf4ac1cc56d"},
33
"bunt": {:hex, :bunt, "1.0.0", "081c2c665f086849e6d57900292b3a161727ab40431219529f13c4ddcf3e7a44", [:mix], [], "hexpm", "dc5f86aa08a5f6fa6b8096f0735c4e76d54ae5c9fa2c143e5a1fc7c1cd9bb6b5"},
44
"castore": {:hex, :castore, "1.0.12", "053f0e32700cbec356280c0e835df425a3be4bc1e0627b714330ad9d0f05497f", [:mix], [], "hexpm", "3dca286b2186055ba0c9449b4e95b97bf1b57b47c1f2644555879e659960c224"},
5-
"credo": {:hex, :credo, "1.7.11", "d3e805f7ddf6c9c854fd36f089649d7cf6ba74c42bc3795d587814e3c9847102", [:mix], [{:bunt, "~> 0.2.1 or ~> 1.0", [hex: :bunt, repo: "hexpm", optional: false]}, {:file_system, "~> 0.2 or ~> 1.0", [hex: :file_system, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: false]}], "hexpm", "56826b4306843253a66e47ae45e98e7d284ee1f95d53d1612bb483f88a8cf219"},
5+
"credo": {:git, "https://github.com/rrrene/credo.git", "f731459d4fb5c3359303e99fde9fa1e51d6fbea9", []},
66
"deep_merge": {:hex, :deep_merge, "1.0.0", "b4aa1a0d1acac393bdf38b2291af38cb1d4a52806cf7a4906f718e1feb5ee961", [:mix], [], "hexpm", "ce708e5f094b9cd4e8f2be4f00d2f4250c4095be93f8cd6d018c753894885430"},
77
"dialyxir": {:hex, :dialyxir, "1.4.5", "ca1571ac18e0f88d4ab245f0b60fa31ff1b12cbae2b11bd25d207f865e8ae78a", [:mix], [{:erlex, ">= 0.2.7", [hex: :erlex, repo: "hexpm", optional: false]}], "hexpm", "b0fb08bb8107c750db5c0b324fa2df5ceaa0f9307690ee3c1f6ba5b9eb5d35c3"},
88
"elixir_sense": {:git, "https://github.com/elixir-lsp/elixir_sense.git", "73ce7e0d239342fb9527d7ba567203e77dbb9b25", [ref: "73ce7e0d239342fb9527d7ba567203e77dbb9b25"]},
99
"erlex": {:hex, :erlex, "0.2.7", "810e8725f96ab74d17aac676e748627a07bc87eb950d2b83acd29dc047a30595", [:mix], [], "hexpm", "3ed95f79d1a844c3f6bf0cea61e0d5612a42ce56da9c03f01df538685365efb0"},
1010
"file_system": {:hex, :file_system, "1.1.0", "08d232062284546c6c34426997dd7ef6ec9f8bbd090eb91780283c9016840e8f", [:mix], [], "hexpm", "bfcf81244f416871f2a2e15c1b515287faa5db9c6bcf290222206d120b3d43f6"},
11-
"gen_lsp": {:hex, :gen_lsp, "0.10.0", "f6da076b5ccedf937d17aa9743635a2c3d0f31265c853e58b02ab84d71852270", [:mix], [{:jason, "~> 1.3", [hex: :jason, repo: "hexpm", optional: false]}, {:nimble_options, "~> 0.5 or ~> 1.0", [hex: :nimble_options, repo: "hexpm", optional: false]}, {:schematic, "~> 0.2.1", [hex: :schematic, repo: "hexpm", optional: false]}, {:typed_struct, "~> 0.3.0", [hex: :typed_struct, repo: "hexpm", optional: false]}], "hexpm", "768f8f7b5c5e218fb36dcebd30dcd6275b61ca77052c98c3c4c0375158392c4a"},
11+
"gen_lsp": {:git, "https://github.com/elixir-tools/gen_lsp.git", "7b8d9fabba34b88fff36b62c316c538e6acdea5f", [branch: "async"]},
1212
"jason": {:hex, :jason, "1.4.4", "b9226785a9aa77b6857ca22832cffa5d5011a667207eb2a0ad56adb5db443b8a", [:mix], [{:decimal, "~> 1.0 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: true]}], "hexpm", "c5eb0cab91f094599f94d55bc63409236a8ec69a21a67814529e8d5f6cc90b3b"},
1313
"mime": {:hex, :mime, "2.0.6", "8f18486773d9b15f95f4f4f1e39b710045fa1de891fada4516559967276e4dc2", [:mix], [], "hexpm", "c9945363a6b26d747389aac3643f8e0e09d30499a138ad64fe8fd1d13d9b153e"},
1414
"nimble_options": {:hex, :nimble_options, "1.1.1", "e3a492d54d85fc3fd7c5baf411d9d2852922f66e69476317787a7b2bb000a61b", [:mix], [], "hexpm", "821b2470ca9442c4b6984882fe9bb0389371b8ddec4d45a9504f00a66f650b44"},

apps/engine/test/engine/build/state_test.exs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ defmodule Engine.Build.StateTest do
4040

4141
project_name = to_string(project_name)
4242
fixture_dir = Path.join(fixtures_path(), project_name)
43-
project = Project.new("file://#{fixture_dir}")
43+
project = Project.new(%GenLSP.LSP{mod: :foo}, "file://#{fixture_dir}")
4444
state = State.new(project)
4545

4646
Engine.set_project(project)

apps/engine/test/engine/build_test.exs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ defmodule Engine.BuildTest do
3535
def with_project(project_name) do
3636
project_name = to_string(project_name)
3737
fixture_dir = Path.join(fixtures_path(), project_name)
38-
project = Project.new("file://#{fixture_dir}")
38+
project = Project.new(%GenLSP.LSP{mod: :foo}, "file://#{fixture_dir}")
3939

4040
project
4141
|> Project.workspace_path()

apps/engine/test/engine/plugin/runner/coordinator_test.exs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ defmodule Engine.Plugin.Runner.CoordinatorTest do
7777
end
7878

7979
test "works with projects" do
80-
project = Project.new("file://" <> __DIR__)
80+
project = Project.new(%GenLSP.LSP{mod: :foo}, "file://" <> __DIR__)
8181

8282
Runner.diagnose(project, notifier())
8383

apps/engine/test/remote_control_test.exs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ defmodule EngineTest do
2424
[fixtures_path(), "umbrella", "apps", "first"]
2525
|> Path.join()
2626
|> Document.Path.to_uri()
27-
|> Project.new()
27+
|> then(&Project.new(%GenLSP.LSP{mod: :foo}, &1))
2828

2929
start_project(subapp_project)
3030

0 commit comments

Comments
 (0)