1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
| | From e4dc28db1d70819505fd1a68fd9d2bfc4fb61a7d Mon Sep 17 00:00:00 2001
From: nixo <nicolo@nixo.xyz>
Date: Fri, 17 Jan 2020 11:28:30 +0100
Subject: [PATCH] base: loading: support fake mtime with SOURCE_DATE_EPCOCH
Do this when loading libraries
---
base/loading.jl | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/base/loading.jl b/base/loading.jl
index 7f11a2d4fc..1b4686d1dc 100644
--- a/base/loading.jl
+++ b/base/loading.jl
@@ -807,7 +807,10 @@ function _include_dependency(mod::Module, _path::AbstractString)
path = normpath(joinpath(dirname(prev), _path))
end
if _track_dependencies[]
- push!(_require_dependencies, (mod, path, mtime(path)))
+ push!(_require_dependencies,
+ (mod, path,
+ haskey(ENV, "SOURCE_DATE_EPOCH") ?
+ parse(Float64, ENV["SOURCE_DATE_EPOCH"]) : mtime(path)))
end
return path, prev
end
--
2.24.1
|