packages feed

hie-bios 0.16.0 → 0.17.0

raw patch · 4 files changed

+46/−13 lines, 4 filesdep ~optparse-applicative

Dependency ranges changed: optparse-applicative

Files

ChangeLog.md view
@@ -1,7 +1,8 @@ # ChangeLog hie-bios -* Rename `findFileUpwards` as `findFileUpwardsPredicate` and implement-  `findFileUpward` which does have better performance guarantees.+## 2025-08-07 - 0.17.0++* Add support for cabal 3.16.1.0 [#470](https://github.com/haskell/hie-bios/pull/470)  ## 2025-07-09 - 0.16.0 
hie-bios.cabal view
@@ -1,6 +1,6 @@ Cabal-Version:          2.2 Name:                   hie-bios-Version:                0.16.0+Version:                0.17.0 Author:                 Matthew Pickering <matthewtpickering@gmail.com> Maintainer:             Matthew Pickering <matthewtpickering@gmail.com> License:                BSD-3-Clause
src/HIE/Bios/Cradle/Cabal.hs view
@@ -194,9 +194,10 @@             }         Just (componentDir, ghc_args) -> do           deps <- liftIO $ cabalCradleDependencies projectFile workDir componentDir-          final_args <- case cabalFeatures of-            CabalWithRepl -> liftIO $ expandGhcOptionResponseFile ghc_args-            CabalWithGhcShimWrapper -> pure ghc_args+          usesResponseFiles <- usesResponseFilesForAllGhcOptions progVersions+          final_args <- case usesResponseFiles of+            True -> liftIO $ expandGhcOptionResponseFile ghc_args+            False -> pure ghc_args           CradleLoadResultT $ pure $ CradleSuccess             ComponentOptions               { componentOptions = final_args@@ -594,6 +595,37 @@       | ver >= makeVersion [3, 15] -> pure CabalWithRepl       | otherwise -> pure CabalWithGhcShimWrapper     _ -> pure CabalWithGhcShimWrapper++-- | As `cabal repl` started to hit maximum cli invocation length, we changed how repl arguments are+-- passed to GHC. In `cabal 3.15`, `cabal 3.16.0.0`, `cabal 3.17` and onwards, ghc options are+-- passed to GHC via response files.+--+-- This breaks HLS release binary distributions before 2.12, as neither HLS nor hie-bios are capable of handling+-- response files at the top-level.+--+-- In particular, `cabal 3.16.0.0` was released with this change and no HLS bindist before 2.12 works+-- with `cabal 3.16.0.0`.+-- To make `cabal 3.16.*` series compatible with released HLS binaries, we reverted the response file+-- change for the ghc options. This change will apply once `cabal 3.16.1.*` is released.+-- Note, in `cabal 3.17`, i.e. cabal HEAD, we still pass the arguments via response files and will do that for the+-- `cabal 3.18` release.+--+-- So, we have a weird matrix now, between some commit in `cabal 3.15` and `cabal 3.16`, ghc arguments+-- are supplied encoded in a response file, while in `>= cabal 3.16.1`, the arguments are passed verbatim.+-- Then, later on in `cabal-3.17`, we use response files again.+--+-- 'usesResponseFilesForAllGhcOptions' encodes all of this history.+usesResponseFilesForAllGhcOptions :: MonadIO m => ProgramVersions -> m Bool+usesResponseFilesForAllGhcOptions vs = do+  cabal_version <- liftIO $ runCachedIO $ cabalVersion vs+  -- determine which load style is supported by this cabal cradle.+  case cabal_version of+    Just ver+      | ver >= makeVersion [3, 15] && ver <= makeVersion [3, 16, 0, 0] -> pure True+      | ver >= makeVersion [3, 17] -> pure True+      | otherwise -> pure False+    _ -> pure False+  -- | When @cabal repl --with-repl@ is called in a project with a custom setup which forces -- an older @lib:Cabal@ version, then the error message looks roughly like:
tests/BiosTests.hs view
@@ -407,12 +407,14 @@  stackYamlResolver :: String stackYamlResolver =-#if (defined(MIN_VERSION_GLASGOW_HASKELL) && (MIN_VERSION_GLASGOW_HASKELL(9,10,0,0)))-  "nightly-2025-04-24" -- GHC 9.10.1+#if (defined(MIN_VERSION_GLASGOW_HASKELL) && (MIN_VERSION_GLASGOW_HASKELL(9,12,0,0)))+  "nightly-2025-08-07" -- GHC 9.12.2+#elif (defined(MIN_VERSION_GLASGOW_HASKELL) && (MIN_VERSION_GLASGOW_HASKELL(9,10,0,0)))+  "lts-24.3" -- GHC 9.10.2 #elif (defined(MIN_VERSION_GLASGOW_HASKELL) && (MIN_VERSION_GLASGOW_HASKELL(9,8,0,0)))   "lts-23.19" -- GHC 9.8.4 #elif (defined(MIN_VERSION_GLASGOW_HASKELL) && (MIN_VERSION_GLASGOW_HASKELL(9,6,0,0)))-  "lts-22.43" -- GHC 9.6.6+  "lts-22.44" -- GHC 9.6.7 #elif (defined(MIN_VERSION_GLASGOW_HASKELL) && (MIN_VERSION_GLASGOW_HASKELL(9,4,0,0)))   "lts-21.25" -- GHC 9.4.8 #elif (defined(MIN_VERSION_GLASGOW_HASKELL) && (MIN_VERSION_GLASGOW_HASKELL(9,2,0,0)))@@ -491,13 +493,11 @@   \_opts _tree -> Nothing  -- --------------------------------------------------------------------- Ignore test group if built with GHC 9.6.7 and GHC 9.12.2+-- Ignore test group if not supported by any stackage snapshot -- ------------------------------------------------------------------  ignoreOnUnsupportedGhc :: TestTree -> TestTree ignoreOnUnsupportedGhc tt =-#if (defined(MIN_VERSION_GLASGOW_HASKELL) && (MIN_VERSION_GLASGOW_HASKELL(9,6,7,0) && !MIN_VERSION_GLASGOW_HASKELL(9,6,8,0)) || (MIN_VERSION_GLASGOW_HASKELL(9,12,2,0) && !MIN_VERSION_GLASGOW_HASKELL(9,12,3,0)))-  ignoreTestBecause "Not supported on 9.6.7 and 9.12.2"-#endif+  -- Currently, all GHC versions are supported! Yay!   tt