duct

Danny Almeida 2020-02-24T02:31:01.002500Z

Thank you. I did try that, but it gave an error for some reason.

Danny Almeida 2020-02-24T02:32:26.002700Z

It work fine in development using sqlite db, but when I tried it in production i had issues. I had forgotten to set my table column as primary and when I changed it in the migration section of config and ran :duct/migrate , I got an error. I had to drop the table and run migration again

Danny Almeida 2020-02-24T02:33:08.002900Z

Also, the docs don't say how to rollback a migration.. is it possible ?

Danny Almeida 2020-02-24T02:35:59.003100Z

Ah..i found this in the blog "Advancing Duct" - In the development environment, the old migration is rolled back and the new one applied. In a production environment an error would be raised instead; in production, we only migrate, we don't rollback.

Danny Almeida 2020-02-24T21:34:48.006300Z

When trying to migrate from duct/core "0.7.0" to "0.8.0", I get an error when launching repl in cider - "Syntax error (FileNotFoundException) compiling at (repl.clj:1:1). Could not locate hawk/core__init.class, hawk/core.clj or hawk/core.cljc on classpath."

Danny Almeida 2020-02-24T21:43:30.007100Z

If i manually include hawk dependency in project.clj, then it works.

kelveden 2020-02-25T09:18:45.009400Z

Looks like this is the reason: https://github.com/duct-framework/core/pull/24

1
kelveden 2020-02-25T09:20:16.009700Z

i.e. hawk is considered a dev dependency and, so to avoid cluttering up your production builds with hawk, it's defined as a "provided" dependency - i.e. one that you must include yourself (presumably as a dev dependency).

1
Danny Almeida 2020-02-25T20:28:11.010100Z

Ah! I see. was not mentioned anywhere, so I was not sure if there was something in my setup causing the error. Thanks for pointing it out. Cheers

kwrooijen 2020-02-25T23:05:49.011600Z

This needs to be added in the new lein template. As well as the new core version. That will prevent this issue for new users at least

1
kwrooijen 2020-02-26T09:35:04.011800Z

Apparently this has already been added. But there hasn't been a release for the new template. https://github.com/duct-framework/duct/blob/16b739e2e1ce92ac1060ccd907a35b4c2bb1ef56/lein-template/resources/leiningen/new/duct/base/project.clj#L24

1
kwrooijen 2020-02-26T09:35:58.012100Z

Maybe @weavejester could consider making a new release so other people won't bump into this issue?

1
2020-02-24T21:48:19.009200Z

I've noticed some strange behavior occasionally, and I'm wondering if anyone else has hit something like this. For note, I'm on duct.core 0.6.2 ; but I've noticed that somehow an init-key, that returns a reify'd protocol, ends up being nil, and then subsequent calls to those protocol methods end up failing with No implementation of method: -foo ... found for class: nil. Does any of this (or some impl detail of reify) ring a bell to anyone?

2020-02-25T17:55:07.009900Z

I haven’t noticed anything like that.