Skip to content

Commit 452f341

Browse files
committed
optimize export check
1 parent 4945153 commit 452f341

File tree

2 files changed

+374
-5
lines changed

2 files changed

+374
-5
lines changed

.elixir-tools/next-ls.log

Lines changed: 368 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,368 @@
1+
2+
17:15:48.303 [info] Loading 147 CA(s) from :otp store
3+
4+
17:15:48.381 id=1 [debug] handled request client -> server initialize in 53ms
5+
6+
17:15:48.395 [debug] sent notification server -> client window/logMessage
7+
8+
17:15:48.404 [debug] sent notification server -> client window/logMessage
9+
10+
17:15:48.404 [debug] sent notification server -> client window/logMessage
11+
12+
17:15:48.404 [info] [extension] Credo initializing with options %NextLS.InitOpts.Extensions.Credo{enable: true, cli_options: []}
13+
14+
17:15:48.407 id=6 [debug] sent request server -> client window/workDoneProgress/create
15+
16+
17:15:48.432 [debug] sent notification server -> client window/logMessage
17+
18+
17:15:48.432 [info] Beginning DB migration...
19+
20+
17:15:48.441 [debug] sent notification server -> client window/logMessage
21+
22+
17:15:48.441 [info] Database is being upgraded from version 5 to 6.
23+
24+
This will trigger a full recompilation in order to re-index your codebase.
25+
26+
27+
17:15:48.453 [debug] sent notification server -> client window/logMessage
28+
29+
17:15:48.453 [info] Finished DB migration...
30+
31+
17:15:48.454 [debug] sent notification server -> client window/logMessage
32+
33+
17:15:48.454 [info] Booting runtime for elixir.
34+
35+
- elixir: /home/kuku/.asdf/shims/elixir
36+
- zombie wrapper script: /home/kuku/.local/share/.burrito/next_ls_erts-14.2.1_0.20.2/lib/next_ls-0.20.2/priv/cmd
37+
- working_dir: /home/kuku/Projects/elixir/lib/elixir
38+
- command: /home/kuku/.asdf/shims/elixir --no-halt --sname nextls-runtime-1714407348453726277 --cookie NWQIY2Q6HI4GUCI6E623JLGQVEC4H6JLD4ZORVW7TK53PIODNXWQ==== -S mix loadpaths --no-compile
39+
40+
Environment:
41+
42+
LSP=nextls
43+
NEXTLS_PARENT_PID=g1h3IW5leHQtbHMtMTcxNDQwNzM0ODMxMTUyMjE1M0BsZW5ueQAAAQkAAAAAZi/HtQ==
44+
MIX_ENV=dev
45+
MIX_TARGET=host
46+
MIX_BUILD_ROOT=.elixir-tools/_build
47+
ROOTDIR=false
48+
BINDIR=false
49+
RELEASE_ROOT=false
50+
RELEASE_SYS_CONFIG=false
51+
PATH=/home/kuku/.local/share/.burrito/next_ls_erts-14.2.1_0.20.2/bin:/home/kuku/.local/share/nvim/mason/bin:/home/kuku/.local/share/nvim/mason/bin:/home/kuku/.cargo/bin:/home/kuku/bin:/home/kuku/.asdf/shims:/opt/asdf-vm/bin:/home/kuku/.local/bin:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl
52+
53+
54+
17:15:48.455 [debug] handled notification client -> server initialized in 63ms
55+
56+
17:15:48.455 [debug] sent notification server -> client $/progress
57+
58+
17:15:48.459 [debug] handled notification client -> server textDocument/didOpen in 4ms
59+
60+
17:15:49.464 [debug] sent notification server -> client window/logMessage
61+
62+
17:15:49.464 [info] Connected to node nextls-runtime-1714407348453726277@lenny
63+
64+
17:15:49.710 [debug] sent notification server -> client window/logMessage
65+
66+
17:15:49.710 [info] warning: got "@impl true" for function run/1 but no behaviour was declared
67+
68+
262 │ def run(args) do
69+
│ ~~~~~~~~~~~~~~~~
70+
71+
└─ /home/kuku/.local/share/.burrito/next_ls_erts-14.2.1_0.20.2/lib/next_ls-0.20.2/priv/monkey/_next_ls_private_compiler.ex:262: :_next_ls_private_formatter (module)
72+
73+
74+
75+
17:15:49.710 [debug] sent notification server -> client $/progress
76+
77+
17:15:49.713 [debug] sent notification server -> client window/logMessage
78+
79+
17:15:49.714 id=199 [debug] sent request server -> client window/workDoneProgress/create
80+
81+
17:15:49.715 [debug] sent notification server -> client $/progress
82+
83+
17:15:49.732 [debug] sent notification server -> client window/logMessage
84+
85+
17:15:49.732 [info] warning: in order to compile .yrl files, you must add "compilers: [:yecc] ++ Mix.compilers()" to the "def project" section of elixir's mix.exs
86+
(mix 1.16.2) lib/mix/tasks/compile.yecc.ex:70: Mix.Tasks.Compile.Yecc.preload/1
87+
(mix 1.16.2) lib/mix/compilers/erlang.ex:66: Mix.Compilers.Erlang.compile/6
88+
(mix 1.16.2) lib/mix/task.ex:478: anonymous fn/3 in Mix.Task.run_task/5
89+
(mix 1.16.2) lib/mix/tasks/compile.all.ex:124: Mix.Tasks.Compile.All.run_compiler/2
90+
(mix 1.16.2) lib/mix/tasks/compile.all.ex:104: Mix.Tasks.Compile.All.compile/4
91+
(mix 1.16.2) lib/mix/tasks/compile.all.ex:93: Mix.Tasks.Compile.All.with_logger_app/2
92+
93+
94+
95+
17:15:49.922 [debug] sent notification server -> client window/logMessage
96+
97+
17:15:49.923 [info] Compiling 35 files (.erl)
98+
99+
100+
17:15:52.936 [debug] sent notification server -> client window/logMessage
101+
102+
17:15:52.936 [info] Compiling 102 files (.ex)
103+
104+
105+
17:15:52.966 id=69 [debug] sent request server -> client window/workDoneProgress/create
106+
107+
17:15:52.967 [debug] sent notification server -> client $/progress
108+
109+
17:15:52.986 [debug] sent notification server -> client window/logMessage
110+
111+
17:15:52.986 [info]
112+
== Compilation error in file lib/agent/server.ex ==
113+
** (UndefinedFunctionError) function :elixir_aliases.expand_or_concat/2 is undefined or private. Did you mean:
114+
115+
* expand_or_concat/4
116+
117+
(elixir 1.16.2) lib/macro.ex:1809: Macro.do_expand_once/2
118+
(elixir 1.16.2) lib/macro.ex:2152: Macro.expand_until/2
119+
(elixir 1.16.2) lib/kernel.ex:5849: Kernel.expand_aliases/2
120+
(elixir 1.16.2) lib/kernel.ex:5817: Kernel."MACRO-use"/3
121+
(elixir 1.16.2) expanding macro: Kernel.use/1
122+
lib/agent/server.ex:4: Agent.Server (module)
123+
124+
125+
17:15:52.990 [debug] sent notification server -> client $/progress
126+
127+
17:15:52.990 [debug] sent notification server -> client window/logMessage
128+
129+
17:15:52.990 [info] Compiled elixir!
130+
131+
17:15:52.992 [debug] sent notification server -> client textDocument/publishDiagnostics
132+
133+
17:15:52.992 [debug] sent notification server -> client textDocument/publishDiagnostics
134+
135+
17:15:53.363 [debug] sent notification server -> client $/progress
136+
137+
17:17:26.122 id=2 [debug] handled request client -> server textDocument/definition in 50ms
138+
139+
17:17:35.058 [debug] handled notification client -> server textDocument/didClose in 2ms
140+
141+
17:17:36.671 id=3 [debug] handled request client -> server shutdown in 1ms
142+
143+
17:17:36.684 [debug] sent notification server -> client window/logMessage
144+
145+
17:17:36.685 [info] The runtime for elixir has successfully shut down.
146+
147+
17:17:36.685 [debug] sent notification server -> client window/logMessage
148+
149+
17:17:36.685 [info] Beginning DB migration...
150+
151+
17:17:36.685 [debug] sent notification server -> client window/logMessage
152+
153+
17:17:36.685 [info] Database is on the latest version: 6
154+
155+
17:17:36.685 [debug] sent notification server -> client window/logMessage
156+
157+
17:17:36.685 [info] Finished DB migration...
158+
159+
03:28:06.461 [info] Loading 147 CA(s) from :otp store
160+
161+
03:28:06.540 id=1 [debug] handled request client -> server initialize in 50ms
162+
163+
03:28:06.624 [debug] sent notification server -> client window/logMessage
164+
165+
03:28:06.628 [debug] NextLS v0.22.4 has initialized!
166+
167+
03:28:06.628 [debug] sent notification server -> client window/logMessage
168+
169+
03:28:06.628 [debug] Log file located at /home/kuku/Projects/elixir/.elixir-tools/next-ls.log
170+
171+
03:28:06.631 [debug] sent notification server -> client window/logMessage
172+
173+
03:28:06.631 [info] [extension] Credo initializing with options %NextLS.InitOpts.Extensions.Credo{enable: true, cli_options: []}
174+
175+
03:28:08.958 [debug] sent notification server -> client window/logMessage
176+
177+
03:28:08.959 [debug] Booting runtimes...
178+
179+
03:28:08.962 id=2 [debug] sent request server -> client window/workDoneProgress/create
180+
181+
03:28:08.973 [debug] sent notification server -> client window/logMessage
182+
183+
03:28:08.973 [info] Beginning DB migration...
184+
185+
03:28:08.978 [debug] sent notification server -> client window/logMessage
186+
187+
03:28:08.978 [info] Database is being upgraded from version 0 to 7.
188+
189+
This will trigger a full recompilation in order to re-index your codebase.
190+
191+
192+
03:28:08.978 [debug] sent notification server -> client window/logMessage
193+
194+
03:28:08.978 [info] Finished DB migration...
195+
196+
03:28:08.979 [debug] sent notification server -> client window/logMessage
197+
198+
03:28:08.979 [info] Booting runtime for iex.
199+
200+
- elixir: /home/kuku/.asdf/shims/elixir
201+
- zombie wrapper script: /home/kuku/.local/share/.burrito/next_ls_erts-14.2.1_0.22.4/lib/next_ls-0.22.4/priv/cmd
202+
- working_dir: /home/kuku/Projects/elixir/lib/iex
203+
- command: /home/kuku/.asdf/shims/elixir --no-halt --sname nextls-runtime-1716172088978768503 --cookie T3K6Y7DFHGW4EBH4FCHRYXG54QZH4Q7ESPZ32S5BUANGIISPMPYA==== -S mix loadpaths --no-compile
204+
205+
Environment:
206+
207+
LSP=nextls
208+
NEXTLS_PARENT_PID=g1h3IW5leHQtbHMtMTcxNjE3MjA4NjQ3MDg3NzgwNUBsZW5ueQAAARAAAAAAZkq1Nw==
209+
MIX_ENV=dev
210+
MIX_TARGET=host
211+
MIX_BUILD_ROOT=.elixir-tools/_build
212+
ROOTDIR=false
213+
BINDIR=false
214+
RELEASE_ROOT=false
215+
RELEASE_SYS_CONFIG=false
216+
PATH=/home/kuku/.asdf/shims:/home/kuku/.local/share/.burrito/next_ls_erts-14.2.1_0.22.4/bin:/home/kuku/.local/share/nvim/mason/bin:/home/kuku/.local/share/nvim/mason/bin:/home/kuku/.asdf/installs/rust/1.77.1/toolchains/esp/xtensa-esp-elf/esp-13.2.0_20230928/xtensa-esp-elf/bin:/home/kuku/.cargo/bin:/home/kuku/bin:/home/kuku/.asdf/shims:/opt/asdf-vm/bin:/home/kuku/.local/bin:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl:/opt/rocm/bin
217+
218+
219+
03:28:08.979 [debug] handled notification client -> server initialized in 2364ms
220+
221+
03:28:08.981 [debug] handled notification client -> server textDocument/didOpen in 2ms
222+
223+
03:28:09.988 [debug] sent notification server -> client window/logMessage
224+
225+
03:28:09.988 [info] Connected to node nextls-runtime-1716172088978768503@lenny
226+
227+
03:28:10.194 [debug] sent notification server -> client $/progress
228+
229+
03:28:10.197 [debug] sent notification server -> client window/logMessage
230+
231+
03:28:10.197 [debug] Runtime for folder iex is ready...
232+
233+
03:28:10.198 id=69 [debug] sent request server -> client window/workDoneProgress/create
234+
235+
03:28:10.215 [debug] sent notification server -> client window/logMessage
236+
237+
03:28:10.215 [info] Compiling 13 files (.ex)
238+
239+
240+
03:28:10.226 id=133 [debug] sent request server -> client window/workDoneProgress/create
241+
242+
03:28:10.660 [debug] sent notification server -> client window/logMessage
243+
244+
03:28:10.660 [info] warning: :iex.start/0 is undefined or private
245+
246+
865 │ :iex.start()
247+
│ ~
248+
249+
└─ (iex 1.16.2) lib/iex.ex:865:10: IEx.start/0
250+
251+
252+
253+
03:28:10.668 [debug] sent notification server -> client window/logMessage
254+
255+
03:28:10.668 [info] Generated iex app
256+
257+
258+
03:28:10.674 [debug] sent notification server -> client $/progress
259+
260+
03:28:10.674 [debug] sent notification server -> client window/logMessage
261+
262+
03:28:10.674 [info] Compiled iex!
263+
264+
03:28:10.676 [debug] sent notification server -> client textDocument/publishDiagnostics
265+
266+
03:28:10.676 [debug] sent notification server -> client textDocument/publishDiagnostics
267+
268+
03:28:12.307 [debug] sent notification server -> client $/progress
269+
270+
03:28:15.414 [debug] sent notification server -> client $/progress
271+
272+
03:28:15.414 [debug] sent notification server -> client $/progress
273+
274+
03:28:15.414 [debug] sent notification server -> client $/progress
275+
276+
03:28:38.218 [info] Loading 147 CA(s) from :otp store
277+
278+
03:28:38.285 id=1 [debug] handled request client -> server initialize in 40ms
279+
280+
03:28:38.296 [debug] sent notification server -> client window/logMessage
281+
282+
03:28:38.302 [debug] NextLS v0.22.4 has initialized!
283+
284+
03:28:38.302 [debug] sent notification server -> client window/logMessage
285+
286+
03:28:38.302 [debug] Log file located at /home/kuku/Projects/elixir/.elixir-tools/next-ls.log
287+
288+
03:28:38.304 [debug] sent notification server -> client window/logMessage
289+
290+
03:28:38.304 [info] [extension] Credo initializing with options %NextLS.InitOpts.Extensions.Credo{enable: true, cli_options: []}
291+
292+
03:28:40.251 [debug] sent notification server -> client window/logMessage
293+
294+
03:28:40.251 [debug] Booting runtimes...
295+
296+
03:28:40.254 id=258 [debug] sent request server -> client window/workDoneProgress/create
297+
298+
03:28:40.272 [debug] sent notification server -> client window/logMessage
299+
300+
03:28:40.273 [info] Beginning DB migration...
301+
302+
03:28:40.276 [debug] sent notification server -> client window/logMessage
303+
304+
03:28:40.276 [info] Database is being upgraded from version 6 to 7.
305+
306+
This will trigger a full recompilation in order to re-index your codebase.
307+
308+
309+
03:28:40.284 [debug] sent notification server -> client window/logMessage
310+
311+
03:28:40.284 [info] Finished DB migration...
312+
313+
03:28:40.285 [debug] sent notification server -> client window/logMessage
314+
315+
03:28:40.285 [info] Booting runtime for elixir.
316+
317+
- elixir: /home/kuku/.asdf/shims/elixir
318+
- zombie wrapper script: /home/kuku/.local/share/.burrito/next_ls_erts-14.2.1_0.22.4/lib/next_ls-0.22.4/priv/cmd
319+
- working_dir: /home/kuku/Projects/elixir/lib/elixir
320+
- command: /home/kuku/.asdf/shims/elixir --no-halt --sname nextls-runtime-1716172120284976472 --cookie T3K6Y7DFHGW4EBH4FCHRYXG54QZH4Q7ESPZ32S5BUANGIISPMPYA==== -S mix loadpaths --no-compile
321+
322+
Environment:
323+
324+
LSP=nextls
325+
NEXTLS_PARENT_PID=g1h3IW5leHQtbHMtMTcxNjE3MjExODIyNjY1NjI1NkBsZW5ueQAAARAAAAAAZkq1Vw==
326+
MIX_ENV=dev
327+
MIX_TARGET=host
328+
MIX_BUILD_ROOT=.elixir-tools/_build
329+
ROOTDIR=false
330+
BINDIR=false
331+
RELEASE_ROOT=false
332+
RELEASE_SYS_CONFIG=false
333+
PATH=/home/kuku/.asdf/shims:/home/kuku/.local/share/.burrito/next_ls_erts-14.2.1_0.22.4/bin:/home/kuku/.local/share/nvim/mason/bin:/home/kuku/.local/share/nvim/mason/bin:/home/kuku/.asdf/installs/rust/1.77.1/toolchains/esp/xtensa-esp-elf/esp-13.2.0_20230928/xtensa-esp-elf/bin:/home/kuku/.cargo/bin:/home/kuku/bin:/home/kuku/.asdf/shims:/opt/asdf-vm/bin:/home/kuku/.local/bin:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl:/opt/rocm/bin
334+
335+
336+
03:28:40.285 [debug] handled notification client -> server initialized in 1993ms
337+
338+
03:28:40.289 [debug] handled notification client -> server textDocument/didOpen in 3ms
339+
340+
03:28:41.296 [debug] sent notification server -> client window/logMessage
341+
342+
03:28:41.296 [info] Connected to node nextls-runtime-1716172120284976472@lenny
343+
344+
03:28:41.393 [debug] sent notification server -> client window/logMessage
345+
346+
03:28:41.393 [debug] sent notification server -> client $/progress
347+
348+
03:28:41.393 [error] Bad RPC call to node nextls-runtime-1716172120284976472@lenny: {:EXIT, {{:badmatch, {:elixir_ex, false, {%{{:file, nil} => 0, {:formatter_opts, nil} => 1, {:formatter_opts_and_subs, nil} => 4, {:size, nil} => 5, {:sub, nil} => 3, {:subs, nil} => 2}, 6, :none}, false, {%{{{:prefix, nil}, 6} => {[line: 607, column: 11], false}}, 7}, {%{{:file, nil} => 0, {:formatter_opts, nil} => 1, {:formatter_opts_and_subs, nil} => 4, {:prefix, nil} => 6, {:size, nil} => 5, {:sub, nil} => 3, {:subs, nil} => 2}, %{{:file, nil} => 0, {:formatter_opts, nil} => 1, {:formatter_opts_and_subs, nil} => 4, {:prefix, nil} => 6, {:size, nil} => 5, {:sub, nil} => 3, {:subs, nil} => 2}}}}, [{:elixir_bitstring, :expand_spec_arg, 4, [file: ~c"src/elixir_bitstring.erl", line: 276]}, {:elixir_bitstring, :expand_each_spec, 6, [file: ~c"src/elixir_bitstring.erl", line: 205]}, {:elixir_bitstring, :expand_specs, 7, [file: ~c"src/elixir_bitstring.erl", line: 163]}, {:elixir_bitstring, :expand, 8, [file: ~c"src/elixir_bitstring.erl", line: 43]}, {:elixir_bitstring, :expand, 5, [file: ~c"src/elixir_bitstring.erl", line: 14]}, {:elixir_expand, :expand_args, 3, [file: ~c"src/elixir_expand.erl", line: 603]}, {:elixir_clauses, :"-head/3-fun-0-", 6, [file: ~c"src/elixir_clauses.erl", line: 56]}, {:elixir_clauses, :match, 5, [file: ~c"src/elixir_clauses.erl", line: 23]}]}}
349+
350+
03:28:41.395 [debug] sent notification server -> client window/logMessage
351+
352+
03:28:41.395 [error] Runtime for folder elixir failed to initialize
353+
354+
03:28:41.396 [debug] sent notification server -> client window/logMessage
355+
356+
03:28:41.396 [info] The runtime for elixir has successfully shut down.
357+
358+
03:28:44.208 [debug] sent notification server -> client $/progress
359+
360+
03:29:07.648 [debug] handled notification client -> server textDocument/didOpen in 689µs
361+
362+
03:37:46.193 id=2 [debug] handled request client -> server shutdown in 5ms
363+
364+
03:37:46.193 id=2 [debug] handled request client -> server shutdown in 4ms
365+
366+
03:37:46.211 [debug] sent notification server -> client window/logMessage
367+
368+
03:37:46.211 [info] The runtime for iex has successfully shut down.

lib/elixir/lib/macro.ex

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2643,11 +2643,12 @@ defmodule Macro do
26432643
end
26442644

26452645
defp dbg_ast_to_debuggable({:if, _meta, [condition_ast, _clauses]} = ast, env) do
2646-
if get_in(env.macros, [
2647-
Access.find(&(elem(&1, 0) == Kernel)),
2648-
Access.elem(1),
2649-
:if
2650-
]) == 2 do
2646+
if_from_kernel? =
2647+
for {Kernel, macros} <- env.macros, {:if, 2} <- macros do
2648+
true
2649+
end == [true]
2650+
2651+
if if_from_kernel? do
26512652
quote do
26522653
condition_result = unquote(condition_ast)
26532654
result = unquote(ast)

0 commit comments

Comments
 (0)