From 183ec965380606fcd06cdf4215e1eef1967ccd63 Mon Sep 17 00:00:00 2001 From: Fons van der Plas Date: Sun, 30 Aug 2020 16:44:50 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=A7=B1=20LOAD=5FPATH=20special=20case?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Project.toml | 2 +- src/analysis/Topology.jl | 11 +++++++---- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/Project.toml b/Project.toml index 1a6c4887c2..feb2a3bf9a 100644 --- a/Project.toml +++ b/Project.toml @@ -2,7 +2,7 @@ name = "Pluto" uuid = "c3e4b0f8-55cb-11ea-2926-15256bba5781" license = "MIT" authors = ["Fons van der Plas ", "Mikołaj Bochenski "] -version = "0.11.9" +version = "0.11.10" [deps] Base64 = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f" diff --git a/src/analysis/Topology.jl b/src/analysis/Topology.jl index 4b1a3513d6..251b009966 100644 --- a/src/analysis/Topology.jl +++ b/src/analysis/Topology.jl @@ -127,14 +127,17 @@ end This is used to treat reactive dependencies between cells that cannot be found using static code anylsis.""" function cell_precedence_heuristic(topology::NotebookTopology, cell::Cell)::Number - if !isempty(cell.module_usings) - # always do `using X` before other cells, because we don't (yet) know which cells depend on it (we only know it with `import X` and `import X: y, z`) + if :LOAD_PATH ∈ topology[cell].references + # https://github.com/fonsp/Pluto.jl/issues/323 1 + elseif !isempty(cell.module_usings) + # always do `using X` before other cells, because we don't (yet) know which cells depend on it (we only know it with `import X` and `import X: y, z`) + 2 elseif [:include] ∈ topology[cell].funccalls # https://github.com/fonsp/Pluto.jl/issues/193 # because we don't (yet) know which cells depend on it - 2 - else 3 + else + 4 end end \ No newline at end of file