-
Notifications
You must be signed in to change notification settings - Fork 13
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
Issue running sample in README #26
Comments
Hi Lucas, Probably what you're looking for is this exapmle: (ns clojurewerkz.buffy.core-test
(:refer-clojure :exclude [read])
(:require [clojure.test :refer :all]
[clojurewerkz.buffy.util :refer :all]
[clojurewerkz.buffy.core :refer :all]
[clojurewerkz.buffy.types.protocols :refer :all]))
(deftest complete-access-test
(let [s (spec :first-field (int32-type)
:second-field (string-type 10)
:third-field (boolean-type))
b (compose-buffer s)]
(compose b {:first-field 101
:second-field "string"
:third-field true})
(is (= {:third-field true :second-field "string" :first-field 101}
(decompose b))))) Could you please point me to the place in README you've constructed your example from?.. It'd be good to improve the readme for future. |
Hi @ifesdjeen I constructed the example from the dynamic frames section: Code was from the following line: The actual issue is that I hadn't required clojurewerkz.buffy.types.protocols Seems like it is the same issue discussed here: I'd be happy to submit a PR. Thanks again |
That's true, yes... Thanks! |
@michaelklishin @ifesdjeen do you have any plans to fix the issue within the README ? I am having the following exception while running the same code
|
@bcambel yes, sorry, it somehow got lost in the pit of my todo list. I'll check it out over the weekend. |
@ifesdjeen thanks! |
First off, thank you for buffy, it seems like exactly what I need.
I'm having some trouble running the compose / decompose on the dynamic-type as it's described in the README.
I receive this error message:
CompilerException java.lang.IllegalArgumentException: No implementation of method: :decompose of protocol: #'clojurewerkz.buffy.core/Composable found for class: io.netty.buffer.UnpooledUnsafeDirectByteBuf, compiling:(buffy_test/core.clj:1:25)
For this minimal example extracted from the readme:
https://github.com/lbradstreet/buffy-test/blob/master/src/buffy_test/core.clj
The only thing I could think I could possibly be doing wrong is using the wrong namespaces on the functions.
If you could just point me in the right directly I'll happily to solve things myself and provide a PR for the README (if required).
Thanks again,
Lucas
The text was updated successfully, but these errors were encountered: