Fork me on GitHub
#fulcro
<
2018-04-12
>
Daniel Hines00:04:04

Ah, ok, thanks.

Daniel Hines00:04:11

@tony.kay, forgive me, I don't actually think I'm following. Where do I put that? For proof of concept, I tried this:

(easy/make-fulcro-server
      :config-path config-path
      :env.edn/PORT 8000

Daniel Hines00:04:52

But that doesn't seem to do anything. Is it a JVM option? Like -D:env.edn/PORT 8000?

tony.kay01:04:01

in the config file itself šŸ˜‰

tony.kay01:04:28

{:port :env.edn/PORT}
tells the config system to read the value of the port key from the env variable PORT

tony.kay01:04:18

so, Iā€™d add a production.edn file into your resources, perhaps in the config folder, and that is the config path Iā€™d give via server main.

tony.kay01:04:35

The config reads defaults, then merges the named config on top of it.

tony.kay01:04:13

:env/PORT reads it as a stringā€¦`:env.edn/PORT` runs it through read-string

bbss01:04:16

> I mean, you already did an optimistic update, so the UI should already be correct. What is there to refresh? Well, if I call the pristine->entity* the UI reverts to the unchanged fields/undoes the changes.

tony.kay01:04:56

did you commit them via entity->prisine* earlier? @bbss

tony.kay01:04:07

those functions just manage local state

tony.kay01:04:19

when you ā€œcommit to serverā€, you need to update your local pristine copy

tony.kay01:04:32

pristine->entity* is UNDO

bbss01:04:57

oh my, now I feel dumb..

tony.kay01:04:03

entity is always your entity, and youā€™re always editing your entity. The pristine is the backup copy šŸ™‚

bbss01:04:42

Yeah I somehow missed the entity->pristine* is flipped. Sorry for the noise.

tony.kay01:04:47

no problem šŸ™‚

tony.kay01:04:59

if you see something in the docs that could be clearer, feel free to send a PR

bbss01:04:51

yeah, I don't think it was the docs, it's obvious now.

bbss01:04:21

I'll try to contribute to the docs if I find something.

Daniel Hines01:04:41

That did the trick. Thanks @tony.kay

tony.kay16:04:09

go with 2.4.3 on fulcro

tony.kay16:04:18

drop untangled-spec

tony.kay16:04:23

use fulcro-spec 2.0.1-1

tony.kay16:04:51

drop bidi, update core-async to latest

tony.kay16:04:11

use fulcro-inspect in dev context, and use latest version (which I think is 2.0.1)

tony.kay16:04:33

clj 1.9.0 is out šŸ™‚

tony.kay16:04:48

update clojurescript to 1.10.2?? whatever it is

exit216:04:57

haha yeah there are some other things that need help here for sure

tony.kay16:04:06

if you use bidi and pushy, just update their versions to latest

tony.kay16:04:14

same with component

tony.kay16:04:44

then do a lein deps :tree and make sure you donā€™t have any untangled stuff or Om Next coming in

tony.kay16:04:53

and also good idea to resolve any warnings that gives

exit216:04:06

so fulcro-inspect isnā€™t 100% needed at first right?

exit216:04:08

since its a dev tool?

tony.kay16:04:08

be esp. careful about versions of guava that you get warnings aboutā€¦that can break the build if it chooses an old one

tony.kay16:04:14

@njj if you use figwheel or devcards, update those too

exit220:04:00

has anyone seen this error?

exit220:04:02

Could not Analyze resources/public/generated/js/dev/fulcro/util.cljc
No such namespace: clojure.spec.alpha, could not locate clojure/spec/alpha.cljs, clojure/spec/alpha.cljc, or Closure namespace "clojure.spec.alpha"
Please see resources/public/generated/js/dev/fulcro/util.cljc

exit220:04:50

running fulcro 2.4.4

tony.kay20:04:04

not so bad, eh?

tony.kay20:04:20

now port everything to defsc? šŸ˜„

tony.kay20:04:28

I guess you got that error to go awway by upgrading Clojure?

exit211:04:05

Yep! Upgrading and a clean worked.

tony.kay20:04:37

or cleaning