The Crystal programming language | http://crystal-lang.org | Fund Crystal's development: http://is.gd/X7PRtI | Docs: http://crystal-lang.org/docs/ | API: http://crystal-lang.org/api/
Unhandled exception: operator does not exist: text = text[]
args:
from the query_all
call)
.so
files at runtime, so maybe there's an easier way of just checking if they're there.
apt upgrade
is no fun.
Running into an interesting issue trying to work with libgit2 bindings - libgit2 passes the same payload of typeVoid*
to each remote callback when cloning
so to intercept each callback from crystal, I have to pass an object containing all the callbacks (essentially a {} of String => AliasForCallbackFunctions
) for each type.
Boxing the object and passing it through causes an invalid memory access
error, whereas not passing it does not. I've been able to pass single boxed blocks for payloads so far, wondering what I might be doing wrong here.
@on_credentials_acquirw = block
Box.box("hello")
as the payload
int (*)(git_remote_completion_t, void *)
in the context of a callback function. options = Grits::Cloning::CloneOptions.default
options.fetch_options.on_credentials_acquire do |credential, url, username|
# handle credentials
credential
end
Grits::Repo.clone("git@github.com:skinnyjames/grits.git", "./directory", options)