This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
- # announcements (2)
- # beginners (42)
- # calva (2)
- # cider (13)
- # clara (2)
- # cljdoc (1)
- # cljs-dev (8)
- # clojure (118)
- # clojure-australia (1)
- # clojure-europe (3)
- # clojure-finland (2)
- # clojure-italy (42)
- # clojure-japan (1)
- # clojure-nl (2)
- # clojure-spec (26)
- # clojure-uk (58)
- # clojurescript (83)
- # cursive (6)
- # data-science (2)
- # datomic (13)
- # devcards (2)
- # duct (9)
- # figwheel-main (4)
- # fulcro (11)
- # graphql (51)
- # jobs (1)
- # juxt (14)
- # kaocha (1)
- # off-topic (24)
- # re-frame (65)
- # reagent (4)
- # reitit (19)
- # remote-jobs (8)
- # shadow-cljs (50)
- # specter (3)
- # speculative (1)
- # vim (5)
- # yada (50)
Is this a good place to talk about edge? If so, I've watched the demo in the video and looked at the docs. I feel that edge is aimed towards a single repo for all your services. Am I right?
Hi everyone! I'm experiencing a weird behaviour trying to set the
content-security-policy header in a response. It appears that yada appends the default value
default-src https: data: 'unsafe-inline' 'unsafe-eval' onto whatever I try to set it to.
I think there's a key on the resource you should set it with, not manually in the headers. But if you explicitly set it, yada should avoid overriding, please file a bug. That would enable dynamic CSP, I've never needed such a thing though.
@urbanslug Edge is being aimed at a modular multi-project design. You can keep all projects in the same repo or in different repos. The deps.edn dependency mechanism will work in either case.
@dominicm Thanks for your response. You are right about not setting it manually. It should be set using top level key
:content-security-policy. I confirmed that it works as expected in the latest version
1.2.15. The project that I'm working on has an earlier version though:
1.1.45. Using top level key in the older version does not work and upon trying setting it manually I encountered this behaviour.
so, since spec isn’t suited for coercion, it seems Schema isn’t going anywhere in the near future and still has a central place in the Clojure community, especially for http API boundaries?
contrary to the opinion “spec replaces schema, so migrate to spec” that you hear here and there
Is there anyone who's just getting into yada and edge? What resource did you use? The docs and code examples seem to be behind the code at this moment.
Okay, so say I want to define a route to handle graphql queries. From the docs seems there's a way to define them in yada but there's a way to do so using integrant config in the later versions of edge. I wonder whether one should go with the integrant way or with yada
@urbanslug for outdated Edge documentation, please open github issues, or contact me directly if you're unsure.
First thing when one is starting out: the dev guide is for development I assume.
Following that process
"-A:dev:build:dev/build" this alias doesn't apply. I can't quite figure out why.
The method in the demo using
bin/app project works but limits one to a project inside of edge.
This is quite confusing to me so I may not be as clear as I should be.
This is something I've struggled to convey, I think this needs extra documentation, or perhaps a message in a generated readme.
Depending on how you generate your project, your dev aliases will be a different list. This is because of sass/figwheel.
Also, what if I prefer to use say shadow-cljs instead of figwheel, it doesn't look like changing would be easy.
kick in theory supports shadow-cljs, but it was commented out by @U050CTFRT. I think he didn't have time to figure out the fixes required for tools.namespace (which are now done for figwheel-main & figwheel-sidecar). https://github.com/juxt/kick.alpha/blob/master/src/juxt/kick/alpha/providers/shadow_cljs.clj.txt
I would accept PRs to get shadow support working again. I think most of the leg-work is done.
I'll look into it. I first have a graphql API to set up, which is what I set out to do in the beginning.
Speaking of, in the demo the routes were defined by integrant but then in the yada docs it seems to be through yada. Which is the way you recommend to do it?
Does one need kick at all with shadow? Shadow does handle building and reloading when files change.
the original idea was that kick would take care of other things too, but we've not had to add anything else for the projects we're currently doing 🙂
> Speaking of, in the demo the routes were defined by integrant but then in the yada docs it seems to be through yada. More current thinking is to define in the config.edn. But how granular to go in config.edn is still under consideration. I recommend doing whatever you find works for you 🙂
> kick would take care of rebuilding sass for you
Ah this would be nice. My hack is to run a
node-sass process in the background.
> More current thinking is to define in the config.edn. But how granular to go in config.edn is still under consideration. Awesome I think this answers my question
Got another one: Trying to upgrade the yada in a project from
1.1.45 to latest -`1.2.16` and I can't start a repl due to
java.lang.RuntimeException: No such var: s/constrained refering to
yada/schema.clj:22. ,If anybody can provide a hint I would be grateful. I checked the changelog and there's no use of multi-arity responce functions in the project (or any other breaking change)
@chris.klaou probably worth checking with lein deps :tree for conflicting schema versions,
I tried that and found out that theres another lib, namely
circleci/rollcage that depends on
[prismatic-schema "0.4.3"] and under yada there's no dependency on schema
Tried to exclude
prismatic/schema from both
rollcage and include top level dependency on
[prismatic-schema "1.1.7"] and the problem remains.
https://github.com/juxt/yada/blob/master/project.clj#L25 yada definitely depends on schema 🙂
I meaned that the output of
lein deps :tree command had no schema dependency underneath yada
because aparrently it was overriden by the earlier version on which rollcage is dependent