Skip to content

1.2.0 release is not uploaded to Hackage #1919

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
felixonmars opened this issue Jun 14, 2021 · 15 comments
Closed

1.2.0 release is not uploaded to Hackage #1919

felixonmars opened this issue Jun 14, 2021 · 15 comments
Labels
old_type: distribution type: bug Something isn't right: doesn't work as intended, documentation is missing/outdated, etc..

Comments

@felixonmars
Copy link
Contributor

It would be nice to keep git tags and Hackage releases in sync :)

@jneira jneira added type: bug Something isn't right: doesn't work as intended, documentation is missing/outdated, etc.. old_type: distribution labels Jun 14, 2021
@jneira
Copy link
Member

jneira commented Jun 14, 2021

For now we are uploading new versions to hackage after the github release, unfortunately it continue being a manual process that takes some time and require maintainers coordination (i hope some day we could do it in a semiautomatic way: #1310)

@pepeiborra
Copy link
Collaborator

pepeiborra commented Jun 14, 2021

  • hie-compat
  • hls-plugin-api
  • hls-test-utils
  • his-graph
  • ghcide
  • hls-brittany-plugin
  • hls-class-plugin
  • hls-eval-plugin
  • hls-explicit-imports-plugin
  • hls-floskell-plugin
  • hls-fourmolu-plugin
  • hls-haddock-comments-plugin
  • hls-hlint-plugin
  • hls-module-name-plugin
  • hls-ormolu-plugin
  • hls-pragmas-plugin
  • hls-refine-imports-plugin
  • hls-retrie-plugin
  • hls-splice-plugin
  • hls-stylish-haskell-plugin
  • hls-tactics-plugin
  • haskell-language-server

@pepeiborra
Copy link
Collaborator

I don't have Hackage privileges to upload the eval plugin - please someone else upload it

@jneira
Copy link
Member

jneira commented Jun 14, 2021

@pepeiborra i've just navigate to https://hackage.haskell.org/package/hls-eval-plugin/maintainers/ and i can see you in the list
(https://hackage.haskell.org/user/PepeIborra just in case)

@berberman
Copy link
Collaborator

@pepeiborra I uploaded it and added you to the maintainers

@berberman
Copy link
Collaborator

hls-brittany-plugin needs a bump - the version 1.0.0.1 was uploaded two months ago.

@pepeiborra
Copy link
Collaborator

pepeiborra commented Jun 14, 2021

hls-brittany-plugin needs a bump - the version 1.0.0.1 was uploaded two months ago.

I am going through all the unreleased plugins and making revisions to relax the upper bounds on ghcide.

@jneira
Copy link
Member

jneira commented Jun 14, 2021

Mmm in case changes should be applied to the repo it would be great to have a 1.2.0-hackage branch, like in previous releases

@pepeiborra
Copy link
Collaborator

pepeiborra commented Jun 14, 2021

For reference, this is what I did:

  1. Generate tar files: cabal sdist ghcide hls-plugin-api hls-graph hls-test-utils hie-compat haskell-language-server hls-brittany-plugin hls-class-plugin hls-eval-plugin hls-explicit-imports-plugin hls-floskell-plugin hls-fourmolu-plugin hls-haddock-comments-plugin hls-hlint-plugin hls-module-name-plugin hls-ormolu-plugin hls-pragmas-plugin hls-retrie-plugin hls-splice-plugin hls-stylish-haskell-plugin hls-tactics-plugin hls-refine-imports-plugin

  2. Upload tar files, ideally cabal upload dist-newstyle/sdist/* --publish but this fails for the plugins that didn't get a new version, so in the interest of automation it might make sense to bump all the plugins when making a release.

  3. Verify: cabal update && cabal install haskell-language-server-1.2.0.0

  4. Produce Hackage revisions to relax upper bounds for the plugins that didn't get released

  5. Verify again, until done

@pepeiborra
Copy link
Collaborator

pepeiborra commented Jun 14, 2021

Mmm in case changes should be applied to the repo it would be great to have a 1.2.0-hackage branch, like in previous releases

There were no changes needed in the repo

@jneira
Copy link
Member

jneira commented Jun 14, 2021

There were no changes needed in the repo

ok, maybe i am little bit obssesed with consistency but i will create a 1.2.0-hackage branch pointing to https://github.com/haskell/haskell-language-server/tree/1.2.0 (the base commit used for upload packages i suppose), if you dont mind

EDIT: created

@berberman
Copy link
Collaborator

Why don't we make a release of hls-brittany-plugin? There should be something more than a cabal revision:

$ git diff 1.1.0-hackage 1.2.0 -- plugins/hls-brittany-plugin
diff --git a/plugins/hls-brittany-plugin/hls-brittany-plugin.cabal b/plugins/hls-brittany-plugin/hls-brittany-plugin.cabal
index b2964348..51d278c2 100644
--- a/plugins/hls-brittany-plugin/hls-brittany-plugin.cabal
+++ b/plugins/hls-brittany-plugin/hls-brittany-plugin.cabal
@@ -25,7 +25,7 @@ library
     , filepath
     , ghc
     , ghc-boot-th
-    , ghcide          ^>=1.2
+    , ghcide           >=1.2 && <1.5
     , hls-plugin-api  ^>=1.1
     , lens
     , lsp-types
@@ -42,7 +42,6 @@ test-suite tests
   ghc-options:      -threaded -rtsopts -with-rtsopts=-N
   build-depends:
     , base
-    , bytestring
+    , filepath
     , hls-brittany-plugin
     , hls-test-utils       ^>=1.0
-    , text
diff --git a/plugins/hls-brittany-plugin/src/Ide/Plugin/Brittany.hs b/plugins/hls-brittany-plugin/src/Ide/Plugin/Brittany.hs
index ff90bfec..8f6e4e19 100644
--- a/plugins/hls-brittany-plugin/src/Ide/Plugin/Brittany.hs
+++ b/plugins/hls-brittany-plugin/src/Ide/Plugin/Brittany.hs
@@ -6,7 +6,6 @@ import           Control.Exception           (bracket_)
 import           Control.Lens
 import           Control.Monad.IO.Class
 import           Control.Monad.Trans.Maybe   (MaybeT, runMaybeT)
-import           Data.Coerce
 import           Data.Maybe                  (mapMaybe, maybeToList)
 import           Data.Semigroup
 import           Data.Text                   (Text)
@@ -81,7 +80,7 @@ runBrittany :: Int              -- ^ tab  size
 runBrittany tabSize df confPath text = do
   let cfg = mempty
               { _conf_layout =
-                  mempty { _lconfig_indentAmount = opt (coerce tabSize)
+                  mempty { _lconfig_indentAmount = opt (Last tabSize)
                          }
               , _conf_forward =
                   (mempty :: CForwardOptions Option)
diff --git a/plugins/hls-brittany-plugin/test/Main.hs b/plugins/hls-brittany-plugin/test/Main.hs
index 4f8f1853..2a4ef9f7 100644
--- a/plugins/hls-brittany-plugin/test/Main.hs
+++ b/plugins/hls-brittany-plugin/test/Main.hs
@@ -1,39 +1,37 @@
 {-# LANGUAGE OverloadedStrings #-}
-module Main(main) where
+module Main
+  ( main
+  ) where
 
-import qualified Data.ByteString.Lazy as BS
-import qualified Data.Text.Encoding   as T
-import qualified Data.Text.IO         as T
-import qualified Ide.Plugin.Brittany  as Brittany
+import qualified Ide.Plugin.Brittany as Brittany
+import           System.FilePath
 import           Test.Hls
 
 main :: IO ()
 main = defaultTestRunner tests
 
-plugin :: PluginDescriptor IdeState
-plugin = Brittany.descriptor "brittany"
+brittanyPlugin :: PluginDescriptor IdeState
+brittanyPlugin = Brittany.descriptor "brittany"
 
 tests :: TestTree
-tests = testGroup "brittany" [
-    goldenGitDiff "formats a document with LF endings" "test/testdata/BrittanyLF.formatted_document.hs" $ runSessionWithServerFormatter plugin "brittany" "test/testdata" $ do
-        doc <- openDoc "BrittanyLF.hs" "haskell"
-        formatDoc doc (FormattingOptions 4 True Nothing Nothing Nothing)
-        BS.fromStrict . T.encodeUtf8 <$> documentContents doc
-
-    , goldenGitDiff "formats a document with CRLF endings" "test/testdata/BrittanyCRLF.formatted_document.hs" $ runSessionWithServerFormatter plugin "brittany" "test/testdata" $ do
-        doc <- openDoc "BrittanyCRLF.hs" "haskell"
-        formatDoc doc (FormattingOptions 4 True Nothing Nothing Nothing)
-        BS.fromStrict . T.encodeUtf8 <$> documentContents doc
-
-    , goldenGitDiff "formats a range with LF endings" "test/testdata/BrittanyLF.formatted_range.hs" $ runSessionWithServerFormatter plugin "brittany" "test/testdata" $ do
-        doc <- openDoc "BrittanyLF.hs" "haskell"
-        let range = Range (Position 1 0) (Position 2 22)
-        formatRange doc (FormattingOptions 4 True Nothing Nothing Nothing) range
-        BS.fromStrict . T.encodeUtf8 <$> documentContents doc
-
-    , goldenGitDiff "formats a range with CRLF endings" "test/testdata/BrittanyCRLF.formatted_range.hs" $ runSessionWithServerFormatter plugin "brittany" "test/testdata" $ do
-        doc <- openDoc "BrittanyCRLF.hs" "haskell"
-        let range = Range (Position 1 0) (Position 2 22)
-        formatRange doc (FormattingOptions 4 True Nothing Nothing Nothing) range
-        BS.fromStrict . T.encodeUtf8 <$> documentContents doc
-    ]
+tests = testGroup "brittany"
+  [ brittanyGolden "formats a document with LF endings" "BrittanyLF" "formatted_document" $ \doc -> do
+      formatDoc doc (FormattingOptions 4 True Nothing Nothing Nothing)
+
+  , brittanyGolden "formats a document with CRLF endings" "BrittanyCRLF" "formatted_document" $ \doc -> do
+      formatDoc doc (FormattingOptions 4 True Nothing Nothing Nothing)
+
+  , brittanyGolden "formats a range with LF endings" "BrittanyLF" "formatted_range" $ \doc -> do
+      let range = Range (Position 1 0) (Position 2 22)
+      formatRange doc (FormattingOptions 4 True Nothing Nothing Nothing) range
+
+  , brittanyGolden "formats a range with CRLF endings" "BrittanyCRLF" "formatted_range" $ \doc -> do
+      let range = Range (Position 1 0) (Position 2 22)
+      formatRange doc (FormattingOptions 4 True Nothing Nothing Nothing) range
+  ]
+
+brittanyGolden :: TestName -> FilePath -> FilePath -> (TextDocumentIdentifier -> Session ()) -> TestTree
+brittanyGolden title path desc = goldenWithHaskellDocFormatter brittanyPlugin "brittany" title testDataDir path desc "hs"
+
+testDataDir :: FilePath
+testDataDir = "test" </> "testdata"
diff --git a/plugins/hls-brittany-plugin/test/testdata/hie.yaml b/plugins/hls-brittany-plugin/test/testdata/hie.yaml
new file mode 100644
index 00000000..82455814
--- /dev/null
+++ b/plugins/hls-brittany-plugin/test/testdata/hie.yaml
@@ -0,0 +1,3 @@
+cradle:
+  direct:
+    arguments: []

@pepeiborra
Copy link
Collaborator

I don't see any observable changes in that Diff, I guess that's why @Ailrun did not bump the version.

Given that there are no reasons to make a release, other than consistency, what would be the cost of making it, and who would do it?

@berberman
Copy link
Collaborator

OK, fair enough :)

@Ailrun
Copy link
Member

Ailrun commented Jun 14, 2021

Could you also add me to package maintainer lists? I don't have privilege for many of the packages.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
old_type: distribution type: bug Something isn't right: doesn't work as intended, documentation is missing/outdated, etc..
Projects
None yet
Development

No branches or pull requests

5 participants