Skip to content

Commit 9bc8fbd

Browse files
committed
feat: on the fly engine compilation
1 parent 9345e31 commit 9bc8fbd

File tree

25 files changed

+168
-39
lines changed

25 files changed

+168
-39
lines changed

apps/engine/.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,6 @@ engine-*.tar
2424

2525
# Temporary files, for example, from tests.
2626
/tmp/
27+
28+
# Ignore the package zip built via `mix build --zip`.
29+
engine-*.zip

apps/engine/lib/engine/build/document/compilers/eex.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ defmodule Engine.Build.Document.Compilers.EEx do
9595
def do_eval_quoted(quoted_ast, path) do
9696
eval_heex_quoted? =
9797
quoted_ast
98-
|> Future.Macro.path(&match?({:require, [context: Phoenix.LiveView.TagEngine], _}, &1))
98+
|> Forge.Future.Macro.path(&match?({:require, [context: Phoenix.LiveView.TagEngine], _}, &1))
9999
|> then(&(not is_nil(&1)))
100100

101101
env =

apps/engine/lib/engine/code_intelligence/definition.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ defmodule Engine.CodeIntelligence.Definition do
88
alias Forge.Document.Location
99
alias Forge.Document.Position
1010
alias Forge.Formats
11+
alias Forge.Future.Code
1112
alias Forge.Search.Indexer.Entry
1213
alias Forge.Text
13-
alias Future.Code
1414

1515
require Logger
1616

apps/engine/lib/engine/code_intelligence/entity.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ defmodule Engine.CodeIntelligence.Entity do
55
alias Forge.Document.Position
66
alias Forge.Document.Range
77
alias Forge.Formats
8-
alias Future.Code, as: Code
8+
alias Forge.Future.Code, as: Code
99

1010
alias Sourceror.Zipper
1111

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ defmodule Engine.Module.Loader do
55
is that having a cache will improve performance
66
"""
77

8-
alias Future.Code
8+
alias Forge.Future.Code
99
use Agent
1010

1111
def start_link(_) do

apps/engine/lib/engine/modules.ex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ defmodule Engine.Modules do
44
"""
55

66
alias Engine.Module.Loader
7-
alias Future.Code.Typespec
7+
alias Forge.Future.Code.Typespec
88

99
@typedoc "Module documentation record as defined by EEP-48"
1010
@type docs_v1 :: tuple()
@@ -146,7 +146,7 @@ defmodule Engine.Modules do
146146

147147
defp format_definition(quoted) do
148148
quoted
149-
|> Future.Code.quoted_to_algebra()
149+
|> Forge.Future.Code.quoted_to_algebra()
150150
|> Inspect.Algebra.format(60)
151151
|> IO.iodata_to_binary()
152152
end

apps/expert/lib/expert.ex

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@ defmodule Expert do
2323

2424
@dialyzer {:nowarn_function, apply_to_state: 2}
2525

26+
@version Mix.Project.config()[:version]
27+
28+
def vsn, do: @version
29+
2630
def get_lsp, do: :persistent_term.get(:expert_lsp, nil)
2731

2832
def start_link(args) do

apps/expert/lib/expert/code_intelligence/completion.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ defmodule Expert.CodeIntelligence.Completion do
88
alias Forge.Ast.Env
99
alias Forge.Completion.Candidate
1010
alias Forge.Document.Position
11+
alias Forge.Future.Code, as: Code
1112
alias Forge.Project
12-
alias Future.Code, as: Code
1313
alias GenLSP.Enumerations.CompletionTriggerKind
1414
alias GenLSP.Structures.CompletionContext
1515
alias GenLSP.Structures.CompletionItem

apps/expert/lib/expert/code_intelligence/completion/builder.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ defmodule Expert.CodeIntelligence.Completion.Builder do
1616
alias Forge.Document.Edit
1717
alias Forge.Document.Position
1818
alias Forge.Document.Range
19-
alias Future.Code, as: Code
19+
alias Forge.Future.Code, as: Code
2020
alias GenLSP.Enumerations.InsertTextFormat
2121
alias GenLSP.Enumerations.MarkupKind
2222
alias GenLSP.Structures.CompletionItem

apps/expert/lib/expert/code_intelligence/completion/translations/struct.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
defmodule Expert.CodeIntelligence.Completion.Translations.Struct do
22
alias Forge.Ast.Env
33
alias Forge.Formats
4-
alias Future.Code, as: Code
4+
alias Forge.Future.Code, as: Code
55
alias GenLSP.Enumerations.CompletionItemKind
66

77
def completion(%Env{} = _env, _builder, _module_name, _full_name, 0) do

0 commit comments

Comments
 (0)