File tree Expand file tree Collapse file tree 1 file changed +53
-8
lines changed
apps/language_server/lib/language_server/dialyzer Expand file tree Collapse file tree 1 file changed +53
-8
lines changed Original file line number Diff line number Diff line change @@ -56,21 +56,66 @@ defmodule ElixirLS.LanguageServer.Dialyzer.Analyzer do
56
56
log_cache: [ ]
57
57
]
58
58
59
- Record . defrecordp ( :analysis , Record . extract ( :analysis , from_lib: "dialyzer/src/dialyzer.hrl" ) )
59
+ Record . defrecordp (
60
+ :analysis_24 ,
61
+ :analysis ,
62
+ analysis_pid: :undefined ,
63
+ type: :succ_typings ,
64
+ defines: [ ] ,
65
+ doc_plt: :undefined ,
66
+ files: [ ] ,
67
+ include_dirs: [ ] ,
68
+ start_from: :byte_code ,
69
+ plt: :undefined ,
70
+ use_contracts: true ,
71
+ race_detection: false ,
72
+ behaviours_chk: false ,
73
+ timing: false ,
74
+ timing_server: :none ,
75
+ callgraph_file: [ ] ,
76
+ solvers: :undefined
77
+ )
78
+
79
+ Record . defrecordp (
80
+ :analysis_25 ,
81
+ :analysis ,
82
+ analysis_pid: :undefined ,
83
+ type: :succ_typings ,
84
+ defines: [ ] ,
85
+ doc_plt: :undefined ,
86
+ files: [ ] ,
87
+ include_dirs: [ ] ,
88
+ start_from: :byte_code ,
89
+ plt: :undefined ,
90
+ use_contracts: true ,
91
+ behaviours_chk: false ,
92
+ timing: false ,
93
+ timing_server: :none ,
94
+ callgraph_file: [ ] ,
95
+ solvers: :undefined
96
+ )
60
97
61
98
def analyze ( active_plt , [ ] ) do
62
99
{ active_plt , % { } , [ ] }
63
100
end
64
101
65
102
def analyze ( active_plt , files ) do
66
103
analysis_config =
67
- analysis (
68
- plt: active_plt ,
69
- files: files ,
70
- type: :succ_typings ,
71
- start_from: :byte_code ,
72
- solvers: [ ]
73
- )
104
+ case System . otp_release ( ) |> String . to_integer ( ) do
105
+ ver when ver < 25 ->
106
+ analysis_24 (
107
+ plt: active_plt ,
108
+ files: files ,
109
+ solvers: [ ]
110
+ )
111
+
112
+ _ ->
113
+ analysis_25 (
114
+ plt: active_plt ,
115
+ files: files ,
116
+ solvers: [ ]
117
+ )
118
+ end
74
119
75
120
parent = self ( )
76
121
You can’t perform that action at this time.
0 commit comments