Fork me on GitHub
#fulcro
<
2018-03-22
>
tony.kay03:03:20

I saw it, but that’s really an issue on Garden…

levitanong03:03:51

ok, will try to repro without fulcro then

levitanong05:03:17

@tony.kay The problem is definitely not in garden. The problem is either in the specter call in localize-css, or within specter itself.

levitanong05:03:47

updated the issue

tony.kay06:03:50

thanks

👌 4
tony.kay18:03:34

@levitanong I think it was specter. I’ve change the code to use clojure walk instead, and that seems to work. I’ve released a snapshot of 2.4.3-SNAPSHOT to clojars. Do you have a larger project you can check that against to see that it looks ok?

levitanong18:03:38

@tony.kay i do! will give it a spin.

levitanong18:03:25

funny thing, i’m having trouble getting the error to show in my major project

tony.kay18:03:04

I was able to repro it in Fulcro itself

tony.kay18:03:13

make sure you’re getting the latest cljs

levitanong18:03:35

it appears that depending on [com.google.javascript/closure-compiler-unshaded "v20180101"] was preventing shadow-cljs from compiling properly

thheller18:03:02

it shouldn't? but yeah they made some pretty significant changes in the release after that so I can't rule it out

levitanong18:03:59

@thheller The compilation was stalling and old js was being served. in the clj-repl in my terminal, this was showing:

[1:0]~shadow.user=> Mar 23, 2018 2:51:13 AM com.google.javascript.jscomp.PhaseOptimizer$NamedPass process
WARNING: Skipping pass rewriteScriptsToEs6Modules
Mar 23, 2018 2:51:13 AM com.google.javascript.jscomp.PhaseOptimizer$NamedPass process
INFO: pass supports: [block function, ES3 keywords as identifiers, string continuation, setters, reserved words as properties, trailing comma, getters, class, default parameter, computed property, RegExp flag 'u', binary literal, const declaration, destructuring, array pattern rest, let declaration, extended object literal, octal literal, super, spread expression, rest parameter, arrow function, generator, member declaration, template literal, new.target, RegExp flag 'y', modules, for-of loop, exponent operator (**), trailing comma in param list, async function]
current AST contains: [block function, ES3 keywords as identifiers, string continuation, setters, reserved words as properties, trailing comma, getters, class, default parameter, computed property, RegExp flag 'u', binary literal, const declaration, destructuring, array pattern rest, let declaration, extended object literal, octal literal, super, spread expression, rest parameter, arrow function, generator, member declaration, template literal, new.target, RegExp flag 'y', modules, for-of loop, exponent operator (**), trailing comma in param list, async function, object pattern rest, object literals with spread]

thheller18:03:52

yeah those warnings were fixed after that release

thheller18:03:41

you can probably go back one more release

thheller18:03:02

v20171203 which was more reliable IIRC

levitanong19:03:08

odd, it stalled again.

levitanong19:03:17

restarting my computer

levitanong19:03:14

@tony.kay I’m a little too sleepy now to function. I’ll just have to get back to you on the thing. I can’t even get my project to properly compile anymore @_@

levitanong19:03:56

@thheller I’ll keep this thing running overnight to see if maybe my project is so huge that it’s really just taking a long time compiling

thheller19:03:44

even a huge project should not take hours to compile

thheller19:03:01

everything above maybe 5min is unacceptable and probably a bug

levitanong19:03:18

yeah this thing is running past 5 mins

levitanong19:03:44

actually let me try downgrading to 2.2.15

tony.kay19:03:49

@levitanong showing us your deps tree would help, I think

levitanong19:03:00

Welp, i’m off to bed. have a great day guys! I’ll devote some time to this tomorrow and let you know if something changes.

tony.kay19:03:06

I’d try pinning the conflicts at the newer versions and see if that hewlps

tony.kay19:03:09

like explicitly depending on [com.google.javascript/closure-compiler-unshaded “v20180204”] and guava 22, etc.

levitanong19:03:41

oh also, fwiw, i managed to compile earlier, when i didn’t require the old goog closure library. it complained about the class and function, etc… which is a problem specific to the latest goog closure library. Previously, it was complaining about the :px thing, so I think it’s safe to say your fix worked 😄

tony.kay19:03:10

it works for me in the cards I tested

tony.kay19:03:43

and fails with the specter, so I’m sure that problem is fixed. I just hope the walk vs. specter code isn’t observably different

levitanong19:03:57

will keep an eye out

thheller19:03:24

@tony.kay speaking about deps .. fulcro has too many for me to use it in shadow-cljs

thheller19:03:44

which deps are actually required is I just want to absolute minimum query parsing on the server?

thheller19:03:03

ie. not easy-server

thheller19:03:55

I'd rather not revert to mranderson-ish hacks to isolate

mitchelkuijpers19:03:58

@thheller we actually use pathom for the server, you could also look at that for a lighter server parser

thheller19:03:46

problem is that I want to reduce the number of runtime deps of shadow-cljs

thheller19:03:06

to avoid conflicts with user projects

thheller19:03:51

ideally there would be none but I need a webserver and stuff

thheller19:03:18

fulcro now has bidi, specter and a few others. thats too much but I think I don't need those anyways

mitchelkuijpers19:03:04

We don't use those either server side we only use pathom and pedestal

mitchelkuijpers19:03:55

But I agree Fulcro has quite a lot of deps, but it is slowly getting slimmer simple_smile

mitchelkuijpers19:03:23

But do you need a very big parser serverside?

thheller19:03:49

don't know yet. did some work a while ago but I want to do some more UI work this weekend

mitchelkuijpers19:03:19

For the UI it matters less right?

tony.kay19:03:25

@thheller it can probably be tightened up a bit. just removed specter, for example

thheller19:03:03

the client I don't care yes

tony.kay19:03:04

but I assume you mean the CLJ stuff for servers

thheller19:03:07

just the server part

tony.kay19:03:39

so, let me think on that. I originally had client/server in separate libs, but it was a lot of extra work to maintain

thheller20:03:11

I'm fine with adding a bunch of exclusions

tony.kay20:03:25

I’ve been considering moving a lot of the server stuff out to a separate library, since what you really need is rather small.

tony.kay20:03:50

component (even this is technically optional, I think)

tony.kay20:03:59

My current thinking is that the “custom server building” option should just be the default, and the other bits should be in a library of their own. That would limit it to transit, I think.

mitchelkuijpers20:03:43

That would be pretty awesome

thheller20:03:28

yeah I'm fine if I have to manually wire up some things on the server if that means I can skip some deps

tony.kay20:03:05

My take to date was that: you’re probably using Ring, component isn’t that big, etc. I’m not too happy about sente being in there, though…pulls in a lot

tony.kay20:03:04

I have some time this afternoon…I’ll look into it. Maintaining a book with running demos, a live tutorial, two templates, etc. It is much easier to keep things working well in one repo. BUT, since the server stuff rarely changes, I’m kind of at a point where it shouldn’t be that much overhead to shift back to a separate library.

thheller20:03:10

I think I don't need much from the server. its just transit in and out

thheller20:03:23

so I might just write that myself and skip fulcro.server entirely

tony.kay20:03:39

sure..there’s just a small bit of glue that shapes things for the client

thheller20:03:00

don't know where I'm going yet. didn't do much on this front for a while, need to get back into it first

tony.kay20:03:18

fulcro.server/handle-api-request is the wrapper code

tony.kay20:03:36

you can see the entire parser post-processing there

tony.kay20:03:44

yeah, and that is really just things like dealing with exceptions, augmented responses, etc. It’s all data shaping

thheller20:03:02

but the fulcro.server doesn't require any of other deps right?

thheller20:03:07

component and transit are fine

tony.kay20:03:38

unfortunately, it does: ring, component, transit

thheller20:03:04

transit and ring I'm using anyways

tony.kay20:03:27

ok, so you might luck out and just be able to exclude. Things like sente are only used by websockets

tony.kay20:03:48

easy-server is bidi and httpkit

thheller20:03:58

yeah don't need that

tony.kay20:03:58

ok, I’ll think about it some more. Perhaps I can pare it down via “provided” scope and dynamic requires/resolves…and then document “if you use such-and-such, remember to add dependency Y”

thheller20:03:35

don't optimize for my usecase. I'm absolutely fine with :exlusions and missing out on some things

thheller20:03:04

I might go with something like mranderson and just rescope things. then it wouldn't matter at all.

tony.kay20:03:08

it’s been on the TODO list for a while

tony.kay20:03:29

I think maybe 2.5 deserves to be a refactoring that slims things back down.