Skip to content
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

Update sexp-grammar.cabal #16

Closed
wants to merge 1 commit into from
Closed

Conversation

Munksgaard
Copy link
Contributor

@Munksgaard Munksgaard commented Aug 11, 2020

Fixes #15.

@Munksgaard
Copy link
Contributor Author

You'll probably need to release a new version once this is merged.

@esmolanka
Copy link
Owner

Oh, this is unfortunate!

Restricting the version of prettyprinter is not a option – this would prevent the package from including to the next stackage.

They basically removed a deprecated module in favor of a new one. But Parser.y still referred to the old one.

- import qualified Data.Text.Prettyprint.Doc.Render.ShowS as Render
+ import qualified Data.Text.Prettyprint.Doc.Render.String as Render

@Munksgaard
Copy link
Contributor Author

I see. We've already restricted recursion-schemes though, will that also be a problem?

@Munksgaard Munksgaard closed this Aug 11, 2020
@Munksgaard Munksgaard deleted the patch-1 branch August 11, 2020 11:39
@esmolanka
Copy link
Owner

esmolanka commented Aug 11, 2020

You'll probably need to release a new version ...

I edited the metadata inplace, so now sexp-grammar-2.2.0 is restricted to prettyprinter<1.7. I'll also release sexp-grammar-2.2.1 today with the fix.

Thanks for reporting the problem!

We've already restricted recursion-schemes though, will that also be a problem?

I am not sure about recursion-schemes as I haven't received any incompatibility notification from Stackage maintainers yet. But I'll try to support both pre-5.2 and 5.2 versions of the package, anyway.

@Munksgaard
Copy link
Contributor Author

You're welcome! Before you release a new version: I'm also having problems actually building sexp-grammar when I use the newest revision from github: it complains about a module from invertible-grammar not being safe to import in a safe module. But perhaps that's because I'm using an old version of invertible-grammar, somehow?

@Munksgaard
Copy link
Contributor Author

Building sexp-grammar as a dependency of another library, that is.

@Munksgaard
Copy link
Contributor Author

Here's the error I'm getting:

Configuring library for sexp-grammar-2.2.0..
Preprocessing library for sexp-grammar-2.2.0..
Building library for sexp-grammar-2.2.0..
[ 1 of 13] Compiling Language.Sexp.Types ( src/Language/Sexp/Types.hs, /home/munksgaard/src/futhark/dist-newstyle/build/x86_64-linux/ghc-8.10.1/sexp-grammar-2.2.0/build/Language/Sexp/Types.o, /home/munksgaard/src/futhark/dist-newstyle/build/x86_64-linux/ghc-8.10.1/sexp-grammar-2.2.0/build/Language/Sexp/Types.dyn_o )

src/Language/Sexp/Types.hs:31:1: warning: [-Wunused-imports]
    The import of ‘<>’
    from module ‘Data.Text.Prettyprint.Doc’ is redundant
   |
31 | import Data.Text.Prettyprint.Doc (Pretty (..), colon, (<>))
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[ 2 of 13] Compiling Language.Sexp.Token ( src/Language/Sexp/Token.hs, /home/munksgaard/src/futhark/dist-newstyle/build/x86_64-linux/ghc-8.10.1/sexp-grammar-2.2.0/build/Language/Sexp/Token.o, /home/munksgaard/src/futhark/dist-newstyle/build/x86_64-linux/ghc-8.10.1/sexp-grammar-2.2.0/build/Language/Sexp/Token.dyn_o )
Installing   th-orphans-0.13.10 (lib)
Completed    th-orphans-0.13.10 (lib)
[ 3 of 13] Compiling Language.Sexp.Pretty ( src/Language/Sexp/Pretty.hs, /home/munksgaard/src/futhark/dist-newstyle/build/x86_64-linux/ghc-8.10.1/sexp-grammar-2.2.0/build/Language/Sexp/Pretty.o, /home/munksgaard/src/futhark/dist-newstyle/build/x86_64-linux/ghc-8.10.1/sexp-grammar-2.2.0/build/Language/Sexp/Pretty.dyn_o )
[ 4 of 13] Compiling Language.Sexp.Lexer ( /home/munksgaard/src/futhark/dist-newstyle/build/x86_64-linux/ghc-8.10.1/sexp-grammar-2.2.0/build/Language/Sexp/Lexer.hs, /home/munksgaard/src/futhark/dist-newstyle/build/x86_64-linux/ghc-8.10.1/sexp-grammar-2.2.0/build/Language/Sexp/Lexer.o, /home/munksgaard/src/futhark/dist-newstyle/build/x86_64-linux/ghc-8.10.1/sexp-grammar-2.2.0/build/Language/Sexp/Lexer.dyn_o )
[ 5 of 13] Compiling Language.Sexp.Parser ( /home/munksgaard/src/futhark/dist-newstyle/build/x86_64-linux/ghc-8.10.1/sexp-grammar-2.2.0/build/Language/Sexp/Parser.hs, /home/munksgaard/src/futhark/dist-newstyle/build/x86_64-linux/ghc-8.10.1/sexp-grammar-2.2.0/build/Language/Sexp/Parser.o, /home/munksgaard/src/futhark/dist-newstyle/build/x86_64-linux/ghc-8.10.1/sexp-grammar-2.2.0/build/Language/Sexp/Parser.dyn_o )
[ 6 of 13] Compiling Language.Sexp.Encode ( src/Language/Sexp/Encode.hs, /home/munksgaard/src/futhark/dist-newstyle/build/x86_64-linux/ghc-8.10.1/sexp-grammar-2.2.0/build/Language/Sexp/Encode.o, /home/munksgaard/src/futhark/dist-newstyle/build/x86_64-linux/ghc-8.10.1/sexp-grammar-2.2.0/build/Language/Sexp/Encode.dyn_o )
[ 7 of 13] Compiling Language.Sexp.Located ( src/Language/Sexp/Located.hs, /home/munksgaard/src/futhark/dist-newstyle/build/x86_64-linux/ghc-8.10.1/sexp-grammar-2.2.0/build/Language/Sexp/Located.o, /home/munksgaard/src/futhark/dist-newstyle/build/x86_64-linux/ghc-8.10.1/sexp-grammar-2.2.0/build/Language/Sexp/Located.dyn_o )

src/Language/Sexp/Located.hs:44:1: warning: [-Wunused-imports]
    The import of ‘Data.Functor.Foldable’ is redundant
      except perhaps to import instances from ‘Data.Functor.Foldable’
    To import instances alone, use: import Data.Functor.Foldable()
   |
44 | import Data.Functor.Foldable (Fix (..))
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[ 8 of 13] Compiling Language.Sexp    ( src/Language/Sexp.hs, /home/munksgaard/src/futhark/dist-newstyle/build/x86_64-linux/ghc-8.10.1/sexp-grammar-2.2.0/build/Language/Sexp.o, /home/munksgaard/src/futhark/dist-newstyle/build/x86_64-linux/ghc-8.10.1/sexp-grammar-2.2.0/build/Language/Sexp.dyn_o )
[ 9 of 13] Compiling Language.SexpGrammar.Base ( src/Language/SexpGrammar/Base.hs, /home/munksgaard/src/futhark/dist-newstyle/build/x86_64-linux/ghc-8.10.1/sexp-grammar-2.2.0/build/Language/SexpGrammar/Base.o, /home/munksgaard/src/futhark/dist-newstyle/build/x86_64-linux/ghc-8.10.1/sexp-grammar-2.2.0/build/Language/SexpGrammar/Base.dyn_o )
[10 of 13] Compiling Language.SexpGrammar.Generic ( src/Language/SexpGrammar/Generic.hs, /home/munksgaard/src/futhark/dist-newstyle/build/x86_64-linux/ghc-8.10.1/sexp-grammar-2.2.0/build/Language/SexpGrammar/Generic.o, /home/munksgaard/src/futhark/dist-newstyle/build/x86_64-linux/ghc-8.10.1/sexp-grammar-2.2.0/build/Language/SexpGrammar/Generic.dyn_o )

src/Language/SexpGrammar/Generic.hs:10:1: error:
    Data.InvertibleGrammar.Generic: Can't be safely imported!
    The module itself isn't safe.
   |
10 | import Data.InvertibleGrammar.Generic
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

And here is my cabal.project entry:

source-repository-package
    type: git
    location: https://github.com/esmolanka/sexp-grammar
    tag: 3e12c6b131131c57545f8bd450038b63411c97a2
    subdir: sexp-grammar

@Munksgaard
Copy link
Contributor Author

Is invertible-grammar building correctly on hackage?

@Munksgaard
Copy link
Contributor Author

Or perhaps we need to specify in sexp-grammar.cabal that invertible-grammar should be >= 0.1.3?

@esmolanka
Copy link
Owner

Or perhaps we need to specify in sexp-grammar.cabal that invertible-grammar should be >= 0.1.3?

Yes, you're right. Otherwise safety annotations do not match. I will edit metadata on Hackage directly so this won't be a problem for 2.2.0 and will also include it in the next release which I'll do this evening.

@Munksgaard
Copy link
Contributor Author

Sounds great :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Builds are failing on hackage
2 participants