Fork me on GitHub
#untangled
<
2016-03-30
>
currentoor06:03:22

@tony.kay: I tried cloning and running the TodoMVC repo but I got the same error as running the server of the tutorial.

user=> (go)

ExceptionInfo please provide a valid file on your file-system  clojure.core/ex-info (core.clj:4593)

currentoor06:03:10

I stubbed out the go function in untangled-todomvc/dev/server/user.clj but I still get the same error.

currentoor06:03:50

Also I verified via slurping that /usr/local/etc/todomvc.edn has the data.

tomjack07:03:01

the atoms for locale are interesting

tomjack07:03:22

this means we don't need components to read the :{app,ui}/locale keys, they can just deref the atom

tomjack07:03:13

a maybe similar problem: authentication

tomjack07:03:33

are the atoms solving just the problem of brevity for tr? i.e. if I'm happy explicitly referring to the auth status in components, can I use read-local without atoms?

vmarcinko13:03:02

your todo example docs states that server is started at 3000 instead of 3449

vmarcinko13:03:33

forget my last line, just got confused with figwheel and server side stuff

tony.kay15:03:46

@tomjack: Yeah, use links. The atom is an implementation detail you should not use directly. There is a built-in mutation for setting it via transact!.

tony.kay15:03:15

If anyone is looking for a contribution to make: automatic server code reload on file change would be nice. I made a stab at it a while ago, but got distracted on other more pressing issues. There are namespace monitoring utils (e.g. see how lein test-refresh works). The trick is not hot-reloading the code that is doing the watching so you don't lose track of things.

doddenino15:03:45

I was wondering if server side rendering is in untangled plans for the future (or the present 😄 )

tony.kay16:03:14

@doddenino: We don't need it here. @anmonteiro did work for that in Om itself, so it should be perfectly compatible.

tony.kay16:03:55

We're just providing predefined helpers to use Om with, and if we need to add hooks for that kind of thing, be glad to take PR

doddenino16:03:07

I see, thanks for the answer!

tony.kay16:03:32

@tomjack: There is a bug in untangled. @ethangracer is addressing it. We need to actually store :ui/locale in the app state, which got missed...links won't work until we do that, but it is the correct thing to do in order to avoid rendering problems.

tony.kay16:03:54

It is a trivial patch

tony.kay16:03:30

Actually, @ethangracer test out a link and see if it does work. The read-local logic might actually work fine for links.

ethangracer16:03:51

@tony.kay @tomjack just confirmed that links do not work with ui/locale. fix coming shortly

currentoor16:03:40

I’m still seeing this error when I try to run the TodoMVC app.

user=> (go)

ExceptionInfo please provide a valid file on your file-system  clojure.core/ex-info (core.clj:4593)
Was anyone able to get it up and running successfully?

tony.kay16:03:13

Instructions: Copy resources/config/defaults.edn to /usr/local/etc/

tony.kay16:03:19

um...forget what you name it

tony.kay16:03:27

It is in the README

currentoor16:03:41

I did that. And verified that the file was there.

tony.kay16:03:49

server won't start without being configured. That error message is better in the newer untangled-server version

currentoor16:03:00

via slurp /usr/local/etc/todomvc.edn has the data

tony.kay16:03:24

perhaps the README name is wrong. Glance at the code. The name of the config file is a parameter

tony.kay16:03:31

in the make untangled server

currentoor16:03:35

I stubbed out the go function in untangled-todomvc/dev/server/user.clj but I still get the same error.

currentoor16:03:10

i’ll double check

tony.kay16:03:44

that is the correct filename. Make sure it is readable. You might make sure it contains legal EDN

tony.kay16:03:40

If you are in intellij, you can set an exception breakpoint and examine the problem at the source level

vmarcinko16:03:01

i just tried the same few hours ago, in Cursive, and everything worked as in README

vmarcinko16:03:31

with master branch

currentoor17:03:09

Hmm, in todomvc.system namespace did (println (slurp "/usr/local/etc/todomvc.edn”)) and got

{
 :datomic {:dbs {:todo {:url          "datomic:"
                        :schema       "todomvc.migrations"
                        :auto-migrate true
                        :auto-drop    true
                        }}}
 :port    3000}

currentoor17:03:33

i figured it out

currentoor17:03:28

I was running the repl in the tutorial repo, thinking it was the todomvc repo. Well that was dumb.

currentoor17:03:54

It works now.

tomjack20:03:13

Thanks, I was just looking at locale as an example. Links worked fine for my authentication problem and I didn't need to change read-local :)

currentoor23:03:23

When I add [untangled.datomic.core :refer [build-database]] to my app’s system namespace I get the following exception on boot.

clojure.lang.ExceptionInfo: No reader function for tag db/id
    data: {:file "datomic_toolbox/migration.clj", :line 22}

currentoor23:03:06

But the weird thing is I haven’t invoked that build-database function, it just happens automatically on boot.