From 8f304db90cbf4097fcdbdb0a9a0e675f1fe58579 Mon Sep 17 00:00:00 2001
From: JamesWrigley <james@puiterwijk.org>
Date: Thu, 21 Mar 2024 19:48:10 +0100
Subject: [PATCH] Fix import of ScopedValues in Julia v1.11

Previously `ScopedValues.with` was exported from `Base` but that was changed
recently, so the ScopedValues check was failing. Now we check if the module is
present instead.
---
 src/Dagger.jl | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/Dagger.jl b/src/Dagger.jl
index d4dd58002..81919124f 100644
--- a/src/Dagger.jl
+++ b/src/Dagger.jl
@@ -12,8 +12,10 @@ import LinearAlgebra: transpose
 
 using UUIDs
 
-if !isdefined(Base, :with)
-using ScopedValues
+if !isdefined(Base, :ScopedValues)
+    import ScopedValues: ScopedValue, with
+else
+    import Base.ScopedValues: ScopedValue, with
 end
 
 using Requires