Fork me on GitHub
#arachne
<
2018-02-04
>
jcf19:02:22

Anyone had success mixing Webjars and Arachne SASS (via jsass)?

jcf19:02:44

I can see Arachne Figwheel notifying the browser about CSS in the webjar, but I can't import SASS.

jcf19:02:54

I've tried a few different :load-paths.

luke19:02:58

@jcf I did at one point.

luke19:02:12

let me see if I can find any public examples

luke19:02:19

(can’t send client code unfortunately)

jcf19:02:16

@luke if it helps I've pushed my WIP here: https://github.com/jcf/usr/pull/1

luke19:02:36

btw did you come to any resolution on the fileset and open files limit stuff?

jcf19:02:36

The errors from the compilation process aren't very helpful.

jcf19:02:23

RE: the file limit - not really.

jcf19:02:42

I've not worked on this side project much, and have been focussed on the SASS side of things for the last half hour or so.

luke19:02:57

that error is indeed a bad one

jcf19:02:01

If I can get SASS working I want to see about cache busting (I've used Optimus in the past).

luke19:02:03

but it indicates an error thrown by SASS itself

jcf19:02:13

Yep, and I've seen where it comes from in the source.

jcf19:02:19

Something about a JSON version of the error.

luke19:02:20

(the fact that it doesn’t relay the actual error message is a bug)

luke19:02:26

I’ll repro

jcf19:02:24

I'm not familiar with the exception class, but I'd hope we can get more data out of it.

jcf19:02:38

I hope this little project of mine is proving useful! 😉

luke19:02:08

hah, definitely. There are clearly some rough edges to knock off here

jcf19:02:30

I'm hoping to get some time to dig into the fileset file exhaustion stuff this week, but I'm pretty busy with client work and stuff.

luke19:02:54

Tell me about it. I confess I’m finding it difficult to do maintenance/support and also maintain forward progress on the framework itself.

luke19:02:02

but we shall press on

jcf19:02:15

I'd think getting a few more people using the thing for hobbies/client work would be a solid start.

jcf19:02:41

I found myself trying to convince someone that Arachne was worth another look. There were some interesting misconceptions about what Arachne really is I think.

luke19:02:28

yeah. And in my experience talking about it doesn’t seem to make too much of a dent. So my goal has been to finish up enough pieces that it clicks for people when they check it out

luke19:02:50

since the value you can derive from it is multiplicative with the number of existing modules you’re able to use

jcf19:02:28

Having a critical mass of shared modules will light the fire I think.

jcf19:02:52

All it would take (in my opinion) is showing a dev and production build of a minimal SPA.

luke19:02:22

The data store stuff is important so you can show some CRUD, and I’d like to demo some deployment stuff as well

jcf19:02:46

Unfortunately, that's a significant undertaking because I think you need to demonstrate: - Server-side rendering - cljs compilation - Shared routing logic - Testing of both client and server - …

jcf19:02:01

I think you can get away with no DB layer for now if I'm honest.

jcf19:02:29

It's easy enough for someone to do the CRUD piece the way they already do in Ped. interceptors/handlers.

jcf19:02:45

That's just my two cents.

jcf19:02:38

And the really hard part (for me at least) is the list above and a good dev experience. Not so much error messages as solid code reloading (tools namespace does not mix with cljs and Boot right now for example).

jcf19:02:15

Anyway… enough about my problems. 😉

luke19:02:32

heh, I agree with them all

luke19:02:35

there’s a lot to do

luke19:02:49

striking a balance between polishing what I’ve got already and realizing the full vision

jcf19:02:03

80% of the core value prop. 🙂

luke19:02:26

for example I’ve got some really cool data model stuff in the works. I hear what you’re saying about persistence, but this other stuff will be very attractive when I can get it going, and in line with the core vision.

jcf19:02:30

The 20% can be done by people who get it and join in. The other modules come I guess on demand.

jcf19:02:19

Defining Datomic schema from a unified representation, and then a sync. layer between client and server? Something not dissimilar to Replakativ?

jcf19:02:01

There's a lot of boilerplate synchronising state. om.next has an interesting pattern that allows you to generate subscriptions from a view…

jcf19:02:38

Am I missing something obvious with the :load-path and Webjars stuff?

luke19:02:06

it looks right, but it’s been long enough since I messed with this that I’m trying to replicate before I get comfortable

jcf19:02:57

I'm not wedded to any particular SASS framework, but want to show the asset pipeline working with third-party deps without needing NPM etc.

luke19:02:58

having trouble running your app though; loaded a repl with bin/repl, when I try to load your dev/user.clj I get CompilerException java.lang.RuntimeException: Unable to resolve symbol: face in this context, compiling:(NO_SOURCE_PATH:4:68)

jcf19:02:15

I don't use bin/repl at the mo. Just lein repl.

jcf19:02:58

Sorry! Rough edges here too apparently. I think that script uses deps.edn directly via clj but I needed Leiningen to get Arachne up and running.

luke19:02:24

yeah I’m working on fixing that this week, I’d like Arachne to be usable fully from clojure deps

jcf19:02:30

I need to take better notes! I got reasonably far but couldn’t get a decent REPL running from Emacs. Maybe UNREPL with help.

jcf19:02:37

Not sure how that’s capitalised.

luke19:02:53

I just use inferior lisp directly with like one or two helper functions

luke19:02:26

@jcf so what you are trying to do here should definitely work

luke19:02:37

I will work on this today and get back to you

luke19:02:51

either figure out what subtle thing you’re doing wrong or if there’s a bug in Arachne.

jcf19:02:15

Ha. Cool, thanks. I may be in bed by the time you fix things, but will check in here tomorrow AM if I don’t hear back.

jcf19:02:23

Thanks again, @luke!

luke19:02:53

@jcf btw I’m having some weird artifact errors, you aren’t using a forked version of Arachne itself by any chance are you?

jcf19:02:05

No forks.

luke19:02:13

I’ll figure it out then

jcf19:02:42

I slurp the deps.edn into project.clj, which may cause some oddness, and I have installed versions of various Arachne libs into my local Maven repo…

jcf19:02:05

BTW, I think it's Leiningen that complains about no HTTPS on the Arachne Frog-repo thing you're using.

jcf19:02:16

Can't remember the name of the project you use for your private Maven repo.

luke19:02:29

oh, right, the one hosted at maven.arachne-framework.orgb

jcf19:02:34

That's the one.

jcf19:02:57

It needs a valid HTTPS cert ideally. I probably wouldn't install from there at work. 🙂

luke20:02:01

yeah, that repo is kind of a quick and dirty solution since I didn’t want to shove a ton of alpha stuff into Clojars. I didn’t realize lein started enforcing that

luke20:02:14

I’ll probably move to git deps instead soon, since that does the same thing with fewer moving parts

jcf20:02:12

Clojure shipped a tonne of alpha stuff into public repos. 😉

luke20:02:31

true but their release process doesn’t trigger a release on every commit like mine does

jcf20:02:32

Don't see why you can't (I guess with .alpha on the end of all your nses).

jcf20:02:50

> trigger a release on every commit like mine does Yeah, that's somewhat unusual. 🙂

luke20:02:52

didn’t want to abuse their hard drive space

luke20:02:07

basically I wanted to emulate the benfeits of git deps before those existed by continuously releasing every commit

jcf20:02:09

Tell that to Arachne filesets! 😛

luke20:02:22

hey now! Those should in theory work fine.

luke20:02:39

still need to replicate that issue, but hopefully that’ll be easy once I have your project up and running

jcf20:02:56

I'll tidy the project up a little and document how to run things now.

jcf20:02:35

Just force pushed to my sass branch because I'm cavalier like that.

jcf20:02:42

reset --hard if you want/need. 🙂

luke20:02:01

it’s good, thanks

jcf20:02:16

I think I might have fixed it…

luke20:02:30

oh yeah? (sorry, I’m multitasking here so going a bit slow)

luke20:02:32

what was it?

jcf20:02:08

I didn't have ::webjars connected to ::sass-build in my arachne.assets.dsl/pipeline.

jcf20:02:42

Just need to verify that I can get the Zurb bits. I've got a CSS file being served by ped assets now.

jcf20:02:51

Yep. That did it!

jcf20:02:00

@luke I think something like this will fix the problem, although maybe improving error messages will help as well. https://github.com/arachne-framework/enterprise-spa/pull/5

luke20:02:08

neglecting to wire up the pipeline will definitely do it.

luke20:02:29

one thing on my near-term roadmap is to build a “project browser” that will make that kind of thing more evident

luke20:02:17

if the open files issue causes you trouble again, please open an issue on https://github.com/arachne-framework/arachne-fileset with steps to reproduce (including SHA of a sample project if you have one). I really want to get that that one nailed down.

jcf21:02:13

@luke I can't reproduce the fd leak at the mo. I've just watched my open file count go from 7000 down to 1000.

jcf21:02:20

Something's cleaned up somewhere.

jcf21:02:45

Not sure if that's because I'm running a REPL via lein repl rather than by jacking in with Cider.

jcf21:02:04

I'd guess there isn't a relevant difference between the two, but can't say for sure.

jcf22:02:09

I've made jcf/usr private, but added you as a collaborator, @luke.