packages feed

hsdev 0.3.3.6 → 0.3.3.8

raw patch · 4 files changed

+51/−32 lines, 4 filesdep ~haddock-apidep ~haskell-src-extsPVP: major bump suggested

API removals or changes: PVP suggests a major version bump

Dependency ranges changed: haddock-api, haskell-src-exts

API changes (from Hackage documentation)

- HsDev.Project.Types: entity :: forall a_a1x73 a_a1yxX. Lens (Extensions a_a1x73) (Extensions a_a1yxX) a_a1x73 a_a1yxX
+ HsDev.Project.Types: entity :: forall a_a1xqo a_a1yRo. Lens (Extensions a_a1xqo) (Extensions a_a1yRo) a_a1xqo a_a1yRo
- HsDev.Project.Types: extensions :: forall a_a1x73. Lens' (Extensions a_a1x73) [Extension]
+ HsDev.Project.Types: extensions :: forall a_a1xqo. Lens' (Extensions a_a1xqo) [Extension]
- HsDev.Project.Types: ghcOptions :: forall a_a1x73. Lens' (Extensions a_a1x73) [Text]
+ HsDev.Project.Types: ghcOptions :: forall a_a1xqo. Lens' (Extensions a_a1xqo) [Text]
- HsDev.Server.Message: message :: forall a_a1Xll a_a1XqJ. Lens (Message a_a1Xll) (Message a_a1XqJ) a_a1Xll a_a1XqJ
+ HsDev.Server.Message: message :: forall a_a1XEM a_a1XKa. Lens (Message a_a1XEM) (Message a_a1XKa) a_a1XEM a_a1XKa
- HsDev.Server.Message: messageId :: forall a_a1Xll. Lens' (Message a_a1Xll) (Maybe String)
+ HsDev.Server.Message: messageId :: forall a_a1XEM. Lens' (Message a_a1XEM) (Maybe String)
- HsDev.Symbols.Types: inspectedKey :: forall k_a2Dtz t_a2DtA a_a2DtB k_a2GIW. Lens (Inspected k_a2Dtz t_a2DtA a_a2DtB) (Inspected k_a2GIW t_a2DtA a_a2DtB) k_a2Dtz k_a2GIW
+ HsDev.Symbols.Types: inspectedKey :: forall k_a2DW5 t_a2DW6 a_a2DW7 k_a2Hbs. Lens (Inspected k_a2DW5 t_a2DW6 a_a2DW7) (Inspected k_a2Hbs t_a2DW6 a_a2DW7) k_a2DW5 k_a2Hbs
- HsDev.Symbols.Types: inspection :: forall k_a2Dtz t_a2DtA a_a2DtB. Lens' (Inspected k_a2Dtz t_a2DtA a_a2DtB) Inspection
+ HsDev.Symbols.Types: inspection :: forall k_a2DW5 t_a2DW6 a_a2DW7. Lens' (Inspected k_a2DW5 t_a2DW6 a_a2DW7) Inspection
- HsDev.Symbols.Types: inspectionResult :: forall k_a2Dtz t_a2DtA a_a2DtB a_a2GIX. Lens (Inspected k_a2Dtz t_a2DtA a_a2DtB) (Inspected k_a2Dtz t_a2DtA a_a2GIX) (Either HsDevError a_a2DtB) (Either HsDevError a_a2GIX)
+ HsDev.Symbols.Types: inspectionResult :: forall k_a2DW5 t_a2DW6 a_a2DW7 a_a2Hbt. Lens (Inspected k_a2DW5 t_a2DW6 a_a2DW7) (Inspected k_a2DW5 t_a2DW6 a_a2Hbt) (Either HsDevError a_a2DW7) (Either HsDevError a_a2Hbt)
- HsDev.Symbols.Types: inspectionTags :: forall k_a2Dtz t_a2DtA a_a2DtB t_a2GIY. Lens (Inspected k_a2Dtz t_a2DtA a_a2DtB) (Inspected k_a2Dtz t_a2GIY a_a2DtB) (Set t_a2DtA) (Set t_a2GIY)
+ HsDev.Symbols.Types: inspectionTags :: forall k_a2DW5 t_a2DW6 a_a2DW7 t_a2Hbu. Lens (Inspected k_a2DW5 t_a2DW6 a_a2DW7) (Inspected k_a2DW5 t_a2Hbu a_a2DW7) (Set t_a2DW6) (Set t_a2Hbu)
- HsDev.Symbols.Types: scopeQualifier :: forall a_a2DtC. Lens' (Scoped a_a2DtC) (Maybe Text)
+ HsDev.Symbols.Types: scopeQualifier :: forall a_a2DW8. Lens' (Scoped a_a2DW8) (Maybe Text)
- HsDev.Symbols.Types: scoped :: forall a_a2DtC a_a2GDO. Lens (Scoped a_a2DtC) (Scoped a_a2GDO) a_a2DtC a_a2GDO
+ HsDev.Symbols.Types: scoped :: forall a_a2DW8 a_a2H6k. Lens (Scoped a_a2DW8) (Scoped a_a2H6k) a_a2DW8 a_a2H6k
- HsDev.Tools.Types: note :: forall a_a20Ay a_a20Ms. Lens (Note a_a20Ay) (Note a_a20Ms) a_a20Ay a_a20Ms
+ HsDev.Tools.Types: note :: forall a_a20TZ a_a215T. Lens (Note a_a20TZ) (Note a_a215T) a_a20TZ a_a215T
- HsDev.Tools.Types: noteLevel :: forall a_a20Ay. Lens' (Note a_a20Ay) (Maybe Severity)
+ HsDev.Tools.Types: noteLevel :: forall a_a20TZ. Lens' (Note a_a20TZ) (Maybe Severity)
- HsDev.Tools.Types: noteRegion :: forall a_a20Ay. Lens' (Note a_a20Ay) Region
+ HsDev.Tools.Types: noteRegion :: forall a_a20TZ. Lens' (Note a_a20TZ) Region
- HsDev.Tools.Types: noteSource :: forall a_a20Ay. Lens' (Note a_a20Ay) ModuleLocation
+ HsDev.Tools.Types: noteSource :: forall a_a20TZ. Lens' (Note a_a20TZ) ModuleLocation

Files

hsdev.cabal view
@@ -1,5 +1,5 @@ name:                hsdev
-version:             0.3.3.6
+version:             0.3.3.8
 synopsis:            Haskell development library
 description:
   Haskell development library and tool with support of autocompletion, symbol info, go to declaration, find references, hayoo search etc.
@@ -159,9 +159,29 @@   if flag(docs)
     build-depends:
       hdocs >= 0.5.3,
-      haddock-api >= 2.17.4,
       haddock-library >= 1.4.3 && < 1.9
 
+    if impl(ghc >= 8.8) && impl(ghc < 8.9)
+      build-depends:
+        haddock-api >= 2.23
+
+    if impl(ghc >= 8.6) && impl(ghc < 8.7)
+      build-depends:
+        haddock-api >= 2.21 && < 2.23
+
+    if impl(ghc >= 8.4) && impl(ghc < 8.5)
+      build-depends:
+        haddock-api == 2.20.*
+
+    if impl(ghc >= 8.2) && impl(ghc < 8.3)
+      build-depends:
+        haddock-api == 2.18.*
+
+    if impl(ghc >= 8.0) && impl(ghc < 8.2)
+      build-depends:
+        haddock-api == 2.17.*
+
+
   if flag(hlint)
     build-depends:
       hlint >= 2.0.11 && < 2.3
@@ -188,7 +208,7 @@     ghc-boot                          >= 8.0.1 && < 8.9,
     ghc-paths                         >= 0.1.0.9 && < 0.2,
     haskell-names                     >= 0.9.1 && < 0.10.0,
-    haskell-src-exts                  >= 1.19.1 && < 1.22.0,
+    haskell-src-exts                  >= 1.19.1 && < 1.24.0,
     hformat                           >= 0.1.0.1 && < 0.4,
     hlint                             >= 2.0.11 && < 2.3,
     http-client                    >= 0.5 && < 0.7,
src/HsDev/Client/Commands.hs view
@@ -97,33 +97,29 @@ 	Update.scanPackageDbStack [] pdbs]
 runCommand (SetFileContents f mcts) = toValue $ serverSetFileContents f mcts
 runCommand (RefineDocs projs fs)
-	| HDocs.hdocsSupported = toValue $ do
+	| HDocs.hdocsSupported = toValue $ updateProcess def $ return $ do
 		projects <- traverse findProject projs
-		mods <- do
-			projMods <- liftM concat $ forM projects $ \proj -> do
-				ms <- loadModules "select id from modules where cabal == ? and json_extract(tags, '$.docs') is null"
-					(Only $ proj ^. projectCabal)
-				p <- SQLite.loadProject (proj ^. projectCabal)
-				return $ set (each . moduleId . moduleLocation . moduleProject) (Just p) ms
-			fileMods <- liftM concat $ forM fs $ \f ->
-				loadModules "select id from modules where file == ? and json_extract(tags, '$.docs') is null"
-					(Only f)
-			return $ projMods ++ fileMods
-		updateProcess def [Update.scanDocs mods]
-	| otherwise = hsdevError $ OtherError "docs not supported"
-runCommand (InferTypes projs fs) = toValue $ do
-	projects <- traverse findProject projs
-	mods <- do
 		projMods <- liftM concat $ forM projects $ \proj -> do
-			ms <- loadModules "select id from modules where cabal == ? and json_extract(tags, '$.types') is null"
+			ms <- loadModules "select id from modules where cabal == ? and json_extract(tags, '$.docs') is null"
 				(Only $ proj ^. projectCabal)
 			p <- SQLite.loadProject (proj ^. projectCabal)
 			return $ set (each . moduleId . moduleLocation . moduleProject) (Just p) ms
 		fileMods <- liftM concat $ forM fs $ \f ->
-			loadModules "select id from modules where file == ? and json_extract(tags, '$.types') is null"
+			loadModules "select id from modules where file == ? and json_extract(tags, '$.docs') is null"
 				(Only f)
-		return $ projMods ++ fileMods
-	updateProcess def [Update.inferModTypes mods]
+		Update.scanDocs $ projMods ++ fileMods
+	| otherwise = hsdevError $ OtherError "docs not supported"
+runCommand (InferTypes projs fs) = toValue $ updateProcess def $ return $ do
+	projects <- traverse findProject projs
+	projMods <- liftM concat $ forM projects $ \proj -> do
+		ms <- loadModules "select id from modules where cabal == ? and json_extract(tags, '$.types') is null"
+			(Only $ proj ^. projectCabal)
+		p <- SQLite.loadProject (proj ^. projectCabal)
+		return $ set (each . moduleId . moduleLocation . moduleProject) (Just p) ms
+	fileMods <- liftM concat $ forM fs $ \f ->
+		loadModules "select id from modules where file == ? and json_extract(tags, '$.types') is null"
+			(Only f)
+	Update.inferModTypes $ projMods ++ fileMods
 runCommand (Remove projs cabal sboxes files) = toValue $ withSqlConnection $ SQLite.transaction_ SQLite.Immediate $ do
 	let
 		-- We can safely remove package-db from db iff doesn't used by some of other package-dbs
src/HsDev/Tools/Ghc/Compat.hs view
@@ -29,9 +29,14 @@ import qualified Packages as GHC
 import qualified PatSyn as GHC
 import qualified Pretty
-import qualified SysTools
 import Outputable
 
+#if __GLASGOW_HASKELL__ >= 804
+import FileCleanup (cleanTempDirs, cleanTempFiles)
+#else
+import SysTools (cleanTempDirs, cleanTempFiles)
+#endif
+
 #if __GLASGOW_HASKELL__ >= 800
 import Data.List (nub)
 import qualified IdInfo
@@ -241,13 +246,9 @@ #endif
 
 cleanTemps :: GHC.DynFlags -> IO ()
-#if __GLASGOW_HASKELL__ >= 804
-cleanTemps _ = return ()
-#else
 cleanTemps df = do
-	SysTools.cleanTempFiles df
-	SysTools.cleanTempDirs df
-#endif
+	cleanTempFiles df
+	cleanTempDirs df
 
 mgArgTys :: GHC.MatchGroup TcId (GHC.LHsExpr TcId) -> Maybe [GHC.Type]
 #if __GLASGOW_HASKELL__ >= 806
src/HsDev/Tools/Ghc/Worker.hs view
@@ -30,6 +30,7 @@ import Exception (ExceptionMonad(..), ghandle)
 import GHC hiding (Warning, Module)
 import GHC.Paths
+import Linker (initDynLinker)
 
 import Control.Concurrent.Worker
 import HsDev.PackageDb.Types
@@ -93,6 +94,7 @@ 	Log.sendLog Log.Trace $ "session: {}" ~~ SessionConfig ty pdbs
 	switchSession_ (SessionConfig ty pdbs) $ Just initialize
 	setSessionFlags
+	Log.sendLog Log.Trace "session set"
 	where
 		toKill (SessionConfig ty' pdbs') = or [
 			(ty == ty' && pdbs /= pdbs'),
@@ -103,8 +105,8 @@ 			setSessionData (First $ Just dflags)
 		run = case ty of
 			SessionGhci -> ghcRun pdbsOpts (importModules preludeModules)
-			SessionGhc -> ghcRun pdbsOpts (return ())
-			SessionTmp -> ghcRun pdbsOpts (return ())
+			SessionGhc -> ghcRun pdbsOpts (getSession >>= liftIO . initDynLinker)
+			SessionTmp -> ghcRun pdbsOpts (getSession >>= liftIO . initDynLinker)
 			SessionHaddock -> ghcRunWith noLinkFlags ("-haddock" : pdbsOpts) (return ())
 		setSessionFlags = do
 			Log.sendLog Log.Trace $ "setting flags: {}" ~~ unwords opts