Giter VIP home page Giter VIP logo

leveldb.jl's People

Contributors

asbisen avatar gdkrmr avatar growler avatar huwenshuo avatar jerry-cai-chanjet avatar jerryzhenleicai avatar phelimb avatar tmlbl avatar wildart avatar

Stargazers

 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

leveldb.jl's Issues

Install Attobot.jl

I am trying to make a new release. So far I always used Attobot but cannot install it on this repo, I think that only the owner can do it. I installed Attobot on my fork but it does not seem to work. Can you please install Attobot and activate it for this repo.

You can find a description here: https://github.com/attobot/attobot

I also asked, but did not get a reply yet: attobot/attobot#60

Support for arbitrary keys and values

It seems that this module only supports Vector{UInt8} keys and values, which makes it pretty unusable.

Why not add support for general types?

E.g. something like:

using LevelDB
using Serialization

function obj2buf(t::T) where T
    io = IOBuffer()
    serialize(io, t)
    return take!(io)
end

buf2obj(v::Vector{UInt8}) = deserialize(IOBuffer(v))

Base.setindex!(db::LevelDB.DB, i::T, v::S) where {T,S} = Base.setindex!(db, obj2buf(i), obj2buf(v))
Base.getindex(db::LevelDB.DB, i::T) where T = buf2obj(Base.getindex(db, obj2buf(i)))

...

db = LevelDB.DB("level.db", create_if_missing = true)
db["aa"] = "bb"
db["aa"]
# "aa"

Obviously, a faster/more stable serialization should be used -- e.g. code from JLD2 could be used.

LevelDB doesn't compile on Julia 1.7.2 on MacOS aarch64 (Apple Silicon)

See following log:

% julia
               _
   _       _ _(_)_     |  Documentation: https://docs.julialang.org
  (_)     | (_) (_)    |
   _ _   _| |_  __ _   |  Type "?" for help, "]?" for Pkg help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 1.7.2 (2022-02-06)
 _/ |\__'_|_|_|\__'_|  |  HEAD/bf53498635 (fork: 461 commits, 274 days)
|__/                   |

(@v1.7) pkg> activate test
  Activating new project at `~/test`

(test) pkg> add LevelDB
    Updating registry at `~/.julia/registries/General.toml`
   Resolving package versions...
    Updating `~/test/Project.toml`
  [6248df61] + LevelDB v2.1.0
    Updating `~/test/Manifest.toml`
  [9e28174c] + BinDeps v1.0.2
  [6248df61] + LevelDB v2.1.0
  [30578b45] + URIParser v0.4.1
  [0dad84c5] + ArgTools
  [56f22d72] + Artifacts
  [2a0f44e3] + Base64
  [ade2ca70] + Dates
  [f43a241f] + Downloads
  [b77e0a4c] + InteractiveUtils
  [b27032c2] + LibCURL
  [76f85450] + LibGit2
  [8f399da3] + Libdl
  [56ddb016] + Logging
  [d6f4376e] + Markdown
  [ca575930] + NetworkOptions
  [44cfe95a] + Pkg
  [de0858da] + Printf
  [3fa0cd96] + REPL
  [9a3f8284] + Random
  [ea8e919c] + SHA
  [9e88b42a] + Serialization
  [6462fe0b] + Sockets
  [fa267f1f] + TOML
  [a4e569a6] + Tar
  [cf7118a7] + UUIDs
  [4ec0a83e] + Unicode
  [deac9b47] + LibCURL_jll
  [29816b5a] + LibSSH2_jll
  [c8ffd9c3] + MbedTLS_jll
  [14a3606d] + MozillaCACerts_jll
  [83775a58] + Zlib_jll
  [8e850ede] + nghttp2_jll
  [3f19e933] + p7zip_jll
Precompiling project...
  ✗ LevelDB
  0 dependencies successfully precompiled in 1 seconds (5 already precompiled)
  1 dependency errored. To see a full report either run `import Pkg; Pkg.precompile()` or load the package
julia> import Pkg; Pkg.precompile()
Precompiling project...
  ✗ LevelDB
  0 dependencies successfully precompiled in 1 seconds (5 already precompiled)

ERROR: The following 1 direct dependency failed to precompile:

LevelDB [6248df61-47b1-58fa-9b7c-c0f1183480ca]

Failed to precompile LevelDB [6248df61-47b1-58fa-9b7c-c0f1183480ca] to ~/.julia/compiled/v1.7/LevelDB/jl_0O0mgZ.
ERROR: LoadError: LevelDB not properly installed. Please run Pkg.build("LevelDB")
Stacktrace:
 [1] error(s::String)
   @ Base ./error.jl:33
 [2] top-level scope
   @ ~/.julia/packages/LevelDB/LN2B8/src/LevelDB.jl:9
 [3] include
   @ ./Base.jl:418 [inlined]
 [4] include_package_for_output(pkg::Base.PkgId, input::String, depot_path::Vector{String}, dl_load_path::Vector{String}, load_path::Vector{String}, concrete_deps::Vector{Pair{Base.PkgId, UInt64}}, source::Nothing)
   @ Base ./loading.jl:1318
 [5] top-level scope
   @ none:1
 [6] eval
   @ ./boot.jl:373 [inlined]
 [7] eval(x::Expr)
   @ Base.MainInclude ./client.jl:453
 [8] top-level scope
   @ none:1
in expression starting at ~/.julia/packages/LevelDB/LN2B8/src/LevelDB.jl:1
Stacktrace:
 [1] pkgerror(msg::String)
   @ Pkg.Types ~/.julia/juliaup/julia-1.7.2+0~aarch64/share/julia/stdlib/v1.7/Pkg/src/Types.jl:68
 [2] precompile(ctx::Pkg.Types.Context; internal_call::Bool, strict::Bool, warn_loaded::Bool, already_instantiated::Bool, kwargs::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
   @ Pkg.API ~/.julia/juliaup/julia-1.7.2+0~aarch64/share/julia/stdlib/v1.7/Pkg/src/API.jl:1362
 [3] precompile
   @ ~/.julia/juliaup/julia-1.7.2+0~aarch64/share/julia/stdlib/v1.7/Pkg/src/API.jl:1013 [inlined]
 [4] #precompile#220
   @ ~/.julia/juliaup/julia-1.7.2+0~aarch64/share/julia/stdlib/v1.7/Pkg/src/API.jl:1011 [inlined]
 [5] precompile()
   @ Pkg.API ~/.julia/juliaup/julia-1.7.2+0~aarch64/share/julia/stdlib/v1.7/Pkg/src/API.jl:1011
 [6] top-level scope
   @ REPL[3]:1

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.