Git Product home page Git Product logo

ruby-marshal's People

Contributors

etherz10 avatar filib avatar jackkelly-bellroy avatar mcfilib avatar tristano8 avatar zyla avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

ruby-marshal's Issues

Cabal file version bounds

While constructing the build plan, the following exceptions were encountered:

In the dependencies for ruby-marshal-0.1.1:
    cereal-0.5.1.0 must match >=0.4.0 && <=0.5.0 (latest applicable is 0.4.1.1)
    vector-0.11.0.0 must match >=0.10.0 && <=0.11.0 (latest applicable is 0.10.12.3)
needed due to authservice-0.1.0.0 -> ruby-marshal-0.1.1

Authservice is a private repo. I will try to provide more details soon on what is causing this conflict

Docs don't build on hackage

src/Data/Ruby/Marshal/Get.hs:57:7:
    Can't find interface-file declaration for data constructor NilChar
      Probable cause: bug in .hi-boot file, or inconsistent .hi file
      Use -ddump-if-trace to get an idea of which file caused the error
    In the pattern: NilChar
    In a case alternative: NilChar -> return RNil
    In the second argument of ‘(>>=)’, namely
      ‘\case {
         NilChar -> return RNil
         TrueChar -> return $ RBool True
         FalseChar -> return $ RBool False
         FixnumChar -> RFixnum <$> getFixnum
         FloatChar -> RFloat <$> getFloat
         StringChar -> RString <$> getString
         SymbolChar -> RSymbol <$> getSymbol
         ObjectLinkChar -> RIVar <$> getObjectLink
         SymlinkChar -> RSymbol <$> getSymlink
         ArrayChar -> RArray <$> getArray go
         HashChar -> RHash <$> getHash go go
         IVarChar -> RIVar <$> getIVar go
         _ -> return Unsupported }’
Haddock coverage:
 100% ( 13 / 13) in 'Data.Ruby.Marshal.Int'
 100% (  5 /  5) in 'Data.Ruby.Marshal.Encoding'
  19% (  3 / 16) in 'Data.Ruby.Marshal.RubyObject'
 100% (  9 /  9) in 'Data.Ruby.Marshal.Monad'
Warning: Not found in environment: Data.Ruby.Marshal.Types.NilChar
Warning: Not found in environment: Data.Ruby.Marshal.Types.FalseChar
Warning: Not found in environment: Data.Ruby.Marshal.Types.TrueChar
Warning: Not found in environment: Data.Ruby.Marshal.Types.ArrayChar
Warning: Not found in environment: Data.Ruby.Marshal.Types.FixnumChar
Warning: Not found in environment: Data.Ruby.Marshal.Types.FloatChar
Warning: Not found in environment: Data.Ruby.Marshal.Types.HashChar
Warning: Not found in environment: Data.Ruby.Marshal.Types.IVarChar
Warning: Not found in environment: Data.Ruby.Marshal.Types.ObjectLinkChar
Warning: Not found in environment: Data.Ruby.Marshal.Types.StringChar
Warning: Not found in environment: Data.Ruby.Marshal.Types.SymbolChar
Warning: Not found in environment: Data.Ruby.Marshal.Types.SymlinkChar

No instance for `MonadFail Marshal`

Under a GHC new enough that the MonadFail split is complete, the library fails to compile Data.Ruby.Marshal.Get:

ruby-marshal            > /run/user/1000/stack-bc4132fd6e708d1d/ruby-marshal-0.1.3/src/Data/Ruby/Marshal/Get.hs:122:20: error:
ruby-marshal            >     • No instance for (MonadFail Marshal) arising from a use of ‘fail’
ruby-marshal            >     • In the expression: fail "expected single character"
ruby-marshal            >       In a stmt of a 'do' block:
ruby-marshal            >         if | len /= 1 -> fail "expected single character"
ruby-marshal            >            | otherwise
ruby-marshal            >                -> do symbol <- g
ruby-marshal            >                      denote <- g
ruby-marshal            >                      ....
ruby-marshal            >       In the second argument of ‘($)’, namely
ruby-marshal            >         ‘do str <- g
ruby-marshal            >             len <- getFixnum
ruby-marshal            >             if | len /= 1 -> fail "expected single character"
ruby-marshal            >                | otherwise -> do ...’
ruby-marshal            >     |
ruby-marshal            > 122 |   if | len /= 1 -> fail "expected single character"
ruby-marshal            >     |                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ruby-marshal            >  

Haddock source not generated with GHC 7.10.1

I've found that this works properly on my work machine which has a different version of GHC, Cabal and Haddock.

Work Machine

[filib@benbecula:~/Projects/ruby-marshal on master]
% ghc --version
The Glorious Glasgow Haskell Compilation System, version 7.8.4
[filib@benbecula:~/Projects/ruby-marshal on master]
% cabal --version
cabal-install version 1.22.6.0
using version 1.22.4.0 of the Cabal library
[filib@benbecula:~/Projects/ruby-marshal on master]
% haddock --version
Haddock version 2.14.3, (c) Simon Marlow 2006
Ported to use the GHC API by David Waern 2006-2008

Personal Machine

[filib@colonsay:~/Projects/ruby-marshal on issue-49]
% ghc --version
The Glorious Glasgow Haskell Compilation System, version 7.10.1
[filib@colonsay:~/Projects/ruby-marshal on issue-49]
% cabal --version
cabal-install version 1.22.2.0
using version 1.22.2.0 of the Cabal library
[filib@colonsay:~/Projects/ruby-marshal on issue-49]
% haddock --version
Haddock version 2.16.0, (c) Simon Marlow 2006
Ported to use the GHC API by David Waern 2006-2008

Consider re-exporting Get monad

We're exposing a bunch of parser combinators that require us to lift a Get into the Marshal monad. It sort of makes sense to expose it.

Support Symlinks

Overview

When a symbol is repeated multiple times, the Marshal encoding allows subsequent instances to reference the first instance to save space in the stream.

Example

irb(main):010:0> Marshal.dump([:x, :x]).bytes
=> [4, 8, 91, 7, 58, 6, 120, 59, 0]

In the above example, the last two values of the array are the symlink. 59 identifies that the object is a symlink and 0 is the index of the symbol cache where we should lookup our object.

Prepare for public release

  • Polish README.
  • Use a proper Map instead of Vector (a, b) for RHash.
  • Re-consider Ivar API - should consumers have to deal with character encodings themselves?
  • Minor code shuffling.
  • Ask for feedback [link]
  • Push to Hackage.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.