We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6d42f09 commit 2042426Copy full SHA for 2042426
deps/build.jl
@@ -200,6 +200,20 @@ else
200
error("Unknown binary $binary")
201
end
202
203
-open("deps.jl", write=true) do f
204
- print(f, deps)
+remove_line_numbers(x) = x
+function remove_line_numbers(ex::Expr)
205
+ if ex.head == :macrocall
206
+ ex.args[2] = nothing
207
+ else
208
+ ex.args = [remove_line_numbers(arg) for arg in ex.args if !(arg isa LineNumberNode)]
209
+ end
210
+ return ex
211
+end
212
+
213
+# only update deps.jl if it has changed.
214
+# allows users to call Pkg.build("MPI") without triggering another round of precompilation
215
+deps_str = string(remove_line_numbers(deps))
216
217
+if !isfile("deps.jl") || deps_str != read("deps.jl", String)
218
+ write("deps.jl", deps_str)
219
0 commit comments