This is an automated email from the ASF dual-hosted git repository.
xuanwo pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/opendal.git
The following commit(s) were added to refs/heads/main by this push:
new 500532ea9 ci: Try fixing haskell CI (#7164)
500532ea9 is described below
commit 500532ea92b622d44edd2d84a40e3b80ed5d6e6c
Author: Xuanwo <[email protected]>
AuthorDate: Mon Jan 26 19:16:52 2026 +0800
ci: Try fixing haskell CI (#7164)
* ci: Try fixing haskell CI
* Fix
---
bindings/haskell/Setup.hs | 16 +++++++++++++++-
1 file changed, 15 insertions(+), 1 deletion(-)
diff --git a/bindings/haskell/Setup.hs b/bindings/haskell/Setup.hs
index a894b2966..9f1147884 100644
--- a/bindings/haskell/Setup.hs
+++ b/bindings/haskell/Setup.hs
@@ -15,6 +15,8 @@
-- specific language governing permissions and limitations
-- under the License.
+{-# LANGUAGE CPP #-}
+
import Control.Monad
import Data.Maybe
import qualified Distribution.PackageDescription as PD
@@ -22,6 +24,9 @@ import Distribution.Simple
import Distribution.Simple.LocalBuildInfo
import Distribution.Simple.Setup
import Distribution.Simple.Utils
+#if MIN_VERSION_Cabal(3,14,0)
+import Distribution.Utils.Path (makeSymbolicPath)
+#endif
import Distribution.System
import System.Directory
import System.Environment
@@ -51,7 +56,12 @@ rustConfHook (description, buildInfo) flags = do
library
{ PD.libBuildInfo =
libraryBuildInfo
- { PD.extraLibDirs = dir : PD.extraLibDirs
libraryBuildInfo,
+ { PD.extraLibDirs =
+#if MIN_VERSION_Cabal(3,14,0)
+ makeSymbolicPath dir : PD.extraLibDirs
libraryBuildInfo,
+#else
+ dir : PD.extraLibDirs libraryBuildInfo,
+#endif
PD.ldOptions = ("-Wl,-rpath," ++ dir) :
(PD.ldOptions libraryBuildInfo)
}
}
@@ -63,7 +73,11 @@ rustBuildHook pkg_descr lbi hooks flags = do
putStrLn "Building Rust code..."
let isRelease = withProfLib lbi
let cargoArgs = if isRelease then ["build", "--release"] else ["build"]
+#if MIN_VERSION_Cabal(3,14,0)
+ rawSystemExit (fromFlag $ buildVerbosity flags) Nothing "cargo" cargoArgs
+#else
rawSystemExit (fromFlag $ buildVerbosity flags) "cargo" cargoArgs
+#endif
putStrLn "Build Rust code success!"
buildHook simpleUserHooks pkg_descr lbi hooks flags