Fork me on GitHub
#untangled
<
2016-04-22
>
curtosis14:04:44

hmm.. a clean clone of untangled-todomvc seems broken.

curtosis14:04:00

A sanity hint for incoming uncaught error:
 return or__26549__auto__;
} else {
return dkey;
}
})();
var by_ident_QMARK_ = om.util.ident_QMARK_ <<< ☢ NULL ☢ <<< .call(null,key);
om_plumbing.cljs:27 Uncaught TypeError: Cannot read property 'call' of undefined

curtosis14:04:51

Seems likely related to a sequence of WARNING: Use of undeclared Var om.util/ident? etc. on cljs compile.

darrellesh14:04:05

@curtosis There was a change made to the latest untangled-client "0.4.7-SNAPSHOT" that is causing this error. We are currently working on a fix.

curtosis15:04:03

gotcha. I tried rolling to om alpha32, which fixed the ident? etc warnings, but not the error. Glad it's not just me, though!

darrellesh15:04:50

Right. In the latest alpha32 ident? moved to om.util.

curtosis15:04:38

oops, I'm wrong - alpha32 fixes the error, too, once one remembers Chrome caches aggressively...

tony.kay16:04:31

my bad....didn't realized todomvc was on 31...I'll push a fix t oGH

tony.kay16:04:53

@curtosis: Thanks for the note...fix pushed to github

adambrosio17:04:25

@tony.kay: pretty sure i fixed mark-missing for recursive queries on 0.4.7-SNAPSHOT

tony.kay17:04:33

@currentoor: That auto-reload on todomvc....it reloads, but the reloads are not taking effect for me. Are you using that in dev anywhere where it is working for you?

tony.kay17:04:04

the make-system is closed over in the user namespace, which means you're getting an old version of the system...so changes are not reflected, I think

tony.kay17:04:56

yeah, refresh dirs must include user.clj in dev for it to work, but that breaks refresh...this is what I ran into last time I tried to implement it

iwankaramazow17:04:28

@tony.kay: just read the UI query security recipe, magnificent! Some very solid ideas. Do you internally implement this like for example a json web token which translates to the user in the env of the server parser?

tony.kay17:04:44

right, we have a server component injected into the parser called authorizer, which itself injects the handler and install a pre-hook in the ring pipeline to pull out cookies and turn that into a user. All that gets injected into the parsing environment

tony.kay17:04:00

so, you can pull the authorizer straight from the env, run it on the query/user, and move on

tony.kay17:04:11

sorry, two things injected

tony.kay17:04:18

authorizer and openid

tony.kay17:04:26

the openid component does the user bit

tony.kay17:04:39

the authorizer has the logic that checks the query

tony.kay17:04:12

so you don't use the openid component directly in parsing...just the authorizer. But the user stuff is placed on the request, which is also made visible in the parsing env

tony.kay17:04:01

Now that you've asked that...I want to beef up the README simple_smile

tony.kay17:04:10

and the server code with a mock component or two to show those bits

iwankaramazow17:04:52

Awesome approach, hadn't given it a thought

currentoor17:04:07

@tony.kay: I'll investigate this weekend. Unfortunately I'm using the system library in my project.

tony.kay17:04:36

@currentoor: ok, thanks. I think the solution is to move the dev helper functions themselves into untangled-server, so that the atom for holding the system (and watcher) are in the library. The user namespace will need to refresh, and re-initialize yet another atom that holds the "system constructor" function.

tony.kay17:04:53

tools namespace blows away namespaces...defonce won't fix it

currentoor17:04:14

sounds like a good approach, thanks!

adambrosio17:04:19

@tony.kay: we’re not talking about start-figwheel, just the server helpers start stop etc?

tony.kay18:04:14

talking about the watcher code that was added to trigger auto-hot-reload on server code

adambrosio18:04:39

you mentioned the atom holding the system

adambrosio18:04:50

isnt that used by start & co.

adambrosio18:04:54

okay well anyway, id like to see it reload my code successfully

tony.kay18:04:03

the watcher code needs to not be in hot reload, but system stuff does

tony.kay18:04:41

so, another approach is to just add another source dir that is not in refresh dirs

tony.kay18:04:48

just for the watcher

tony.kay18:04:34

So, that works....I just did it as an alt source folder in todomvc

tony.kay18:04:47

I don't want the watch deps in ut-server, so this is probably the fix

tony.kay18:04:39

might be able to move refresh funcs into server, and ask users to set the constructor function in a reloaded user ns

currentoor18:04:24

cool, so you got it working?

currentoor18:04:34

i'd like to see what you did

tony.kay18:04:44

yeah, it'll be in the todomvc release I'm doing in a bit

tony.kay18:04:19

Untangled spec 0.3.6 pushed to github and clojars

tony.kay18:04:36

now has readme, which makes it at least look like the something that it is on github simple_smile

tony.kay18:04:32

Untangled client 0.4.7 (requires om alpha32) released

curtosis19:04:27

nice! I just narrowed down a nasty parse problem to something wrong in the client SNAPSHOT version.

curtosis19:04:02

frustratingly difficult to track down, but pleased it's not me going crazy.

curtosis19:04:57

(fwiw, I kept seeing No reader function for tag object in my file that :required data-fetch, but with no clues as to where. File null, line null, column null. Nothing to do but comment everything, then gradually uncomment line by line and build.)

curtosis19:04:12

anyway, excellent news on the new releases!

tony.kay20:04:56

@curtosis: Sometimes, esp on project file changes, it pays to clean the project and restart everything...clears up things like that sometimes

tony.kay20:04:25

also can be useful to do a command-line build...e.g. lein cljsbuild once dev

tony.kay20:04:46

or auto....the auto will keep re-trying on file changes...which is much faster than restarting REPL

tony.kay20:04:09

lein cljsbuild auto dev

tony.kay20:04:11

Untangled Tutorial updated to new versions

tony.kay20:04:28

Untangled Server 0.4.7 pushed

tony.kay20:04:32

released to clojars

tony.kay20:04:16

Tempid rewrite looks broken on 0.4.7...not sure if it is a glitch in build, or a regression

tony.kay20:04:36

@ethangracer: are you seeing tempid rewrite working ok with 0.4.7?

ethangracer20:04:00

definitely not aware of that

tony.kay20:04:20

@adambros: did your mark-sweep fix possibly touch rewrite logic?

adambrosio20:04:41

not sure rewrite logic is?

tony.kay20:04:49

tempid rewrites

adambrosio20:04:12

it might be possible

adambrosio20:04:19

should i come over?

tony.kay20:04:05

tempids are comign back from server still, so definitely a problem on client

ethangracer21:04:54

tempids are rewriting on survey… ?

tony.kay21:04:50

Confirmed. 0.4.7 client breaks tempid rewrite

tony.kay21:04:01

0.4.8 pushed with fix

tony.kay21:04:10

on clojars...bumping stuff on other libs

tony.kay21:04:12

ok, Todomvc, tutorial, and cookbook updated

tony.kay21:04:42

So, consider 0.4.7 a bad release. Use 0.4.6 or 8

currentoor22:04:37

thanks for the quick fix!

currentoor23:04:55

untangled.client.mutations/toggle! works well for me in may main app but it fails in the devcards.

currentoor23:04:27

The calling component has an ident [dashboard/by-id 123].

currentoor23:04:41

and when i call (mut/toggle! this :ui/show-edit-menu?)

currentoor23:04:08

it replaces :dashboard/by-id {123 {...}} with :dashboard/by-id {nil {:ui/show-edit-menu? false}}

currentoor23:04:20

any suggestions?

currentoor23:04:09

hmm, i'm inspecting the props being passed in, when i call toggle! the component is re-render (as it should be) but all props except :ui/show-edit-menu? vanish

currentoor23:04:18

but this does not happen outside of a devcard

currentoor23:04:22

toggle! is called inside ui-dashboard