Re: spec error output in web context

2019-06-09 Thread 'Sven Richter' via Clojure
Am Sonntag, 9. Juni 2019 16:15:38 UTC+2 schrieb Alex Miller: > > > > On Sun, Jun 9, 2019 at 8:43 AM 'Sven Richter' via Clojure < > clo...@googlegroups.com > wrote: > >> >> I also tried to catch the exception and *(-> ex Throwable->map >> clo

Re: spec error output in web context

2019-06-09 Thread 'Sven Richter' via Clojure
Hi Alex, I tracked it down to a minimal example with an explanation here: https://gist.github.com/sveri/1aaad9b12a8ec90d243206ab3b6073e3 The short version is. Running a specced function in the clj repl will produce meaningful output, while running in the web context with immutant will print a

Re: spec error output in web context

2019-06-08 Thread 'Sven Richter' via Clojure
Am Freitag, 7. Juni 2019 15:35:41 UTC+2 schrieb Alex Miller: > > How do you start the web server? > I use component to startup immutant web, I also tried with http-kit, but that didnt make a difference. Who is printing the error? > I think thats the key point here, right now I dont know as I

spec error output in web context

2019-06-07 Thread 'Sven Richter' via Clojure
Hi, I just recently found out that the spec error reporting is different in different environments. I have the following functions: (defn search-page [{:keys [off-url off-user off-password]} search] (let [products (off/search-products search) products-with-nutriments (mapv

Poll and opinions about Clojurescript UI / html templates

2018-04-08 Thread 'Sven Richter' via Clojure
Hi, I am the author of closp (https://github.com/sveri/closp), a leiningen template for web development. As always over the years I am changing stuff while working on my private stuff and I wonder what the opinions about the UI is. Currently every template that comes with closp is server

Re: spec - s/gen validation error

2016-05-30 Thread 'Sven Richter' via Clojure
So I tried some more and figured out that its the ::autoinc key that causes this: (s/def ::column (s/keys :req-un [::name ::type] :opt-un [::null ::max-length ::required ::pk ::autoinc

spec - s/gen validation error

2016-05-29 Thread 'Sven Richter' via Clojure
Hi, So I looked at generating specs for tests and I hit an error I just dont understand / neither can fix it. This is my code: (s/def ::column-types #{:int :varchar :boolean :text :time :date :char :binary :smallint :bigint :decimal :float :double

Re: clojure spec fdef

2016-05-26 Thread 'Sven Richter' via Clojure
Do you refer to this section? "When regex ops are combined, they describe a single sequence. If you need to include a nested sequential collection, you must use an explicit call to spec to start a new nested regex context. For example to describe a sequence like [:names ["a" "b"] :nums [1 2

Re: clojure spec fdef

2016-05-26 Thread 'Sven Richter' via Clojure
Ah thanks, that worked, not quite as I expected. Up until this point it was pretty straightforward for me, thats been my fist bummer. Do you have an example for this in the guide? I did not fully read it, but I think I scrolled through everything that used fdefs. Best Regards, Sven Am

clojure spec fdef

2016-05-26 Thread 'Sven Richter' via Clojure
Hi, I already asked this in the spec channel on slack, but got no response yet. I have this simple spec definition: (s/def ::foo string?) ​ (s/def ::column (s/keys :req-un [::foo])) ​ (s/def ::columns (s/cat :col (s/* (s/spec ::column ;(s/def ::columns (s/cat :col (s/* ::column))) ​

Re: leiningen dependency management

2016-04-09 Thread 'Sven Richter' via Clojure
Hi, Thanks for your responses. I will go and try the :provided profile and see how it works out. Thanks, Sven Am Samstag, 9. April 2016 02:51:15 UTC+2 schrieb Daniel Ziltener: > > Hi Sven, > > When you're sure the project depending your library does also has a > dependency on a third library,

leiningen dependency management

2016-04-08 Thread 'Sven Richter' via Clojure
Hi, I have a library A that I use in project B. Now, library A makes use of plumatics schema, as well as project B. I wonder what the best practice is here. Include schema in library A's dependencies? Or only declare a dev-dependency on schema in library A? If I declare a dev-dependency I

Re: Jolin / ragtime seeding a postgres database

2016-03-14 Thread 'Sven Richter' via Clojure
Thanks to the help of a friendly slack user I figured out what the problem is. The SERIAL type does not support providing data on inserts, so: INSERT INTO tags ("name", "id") VALUES ('Java', '1') should be: INSERT INTO tags ("name") VALUES ('Java') Then everything works as expected. Coming

Re: Jolin / ragtime seeding a postgres database

2016-03-14 Thread 'Sven Richter' via Clojure
f like > > CREATE TABLE ghost_channel (id UUID PRIMARY KEY DEFAULT > uuid_generate_v4(), name text > Which seems to generate keys for me. > > Maybe you could do something like that with your sequence as well? > > Erik. > > On 14. mar. 2016, at 10.53

Jolin / ragtime seeding a postgres database

2016-03-14 Thread 'Sven Richter' via Clojure
Hi, I am using joplin (which depends on ragtime) migrate and seed my postgresql database. One of my migration files looks like this: CREATE TABLE tags ( id SERIAL PRIMARY KEY, name VARCHAR(150)) --;; INSERT INTO tags ("name", "id") VALUES ('Java', '1') Running a migration creates the table and

Re: [ANN] Graclj 0.1.0 -- New Gradle Plugin for Clojure

2016-02-16 Thread 'Sven Richter' via Clojure
I wanted to thank you for stepping up on this. As gradle is getting more and more used in a lot of environments a working clojure plugin for gradle would be awesome. Best Regards, Sven Am Montag, 15. Februar 2016 03:11:00 UTC+1 schrieb Andrew Oberstar: > > I just released the first version of