This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-08-24
Channels
- # announcements (1)
- # beginners (113)
- # calva (16)
- # cider (6)
- # cljsrn (1)
- # clojure (104)
- # clojure-argentina (2)
- # clojure-dev (3)
- # clojure-italy (1)
- # clojure-nl (10)
- # clojure-spec (6)
- # clojure-uk (4)
- # clojuredesign-podcast (44)
- # clojurescript (25)
- # core-async (2)
- # datomic (21)
- # emacs (14)
- # events (1)
- # figwheel-main (12)
- # fulcro (7)
- # joker (2)
- # leiningen (1)
- # mount (7)
- # music (1)
- # off-topic (16)
- # pedestal (3)
- # re-frame (8)
- # reagent (8)
- # reitit (11)
- # shadow-cljs (4)
- # spacemacs (16)
- # sql (1)
- # tools-deps (14)
- # vim (1)
Sorry for double posting I just wanted to see if anyone has thoughts on this
Hi! I am trying to model a tree of components (Page, button group, tab, buttons etc) as a hierarchy of maps (each component has a bunch of attributes). It's very similar to the DOM in that if the user deleted a tab group that has buttons as children, the buttons need to be deleted as well. Of course, the user can also move a subtree of components to a different nodes etc. It's a standard GUI editor. I think the best way to model this is to make each node a component so that if any node is deleted its children are deleted as well. Does that make sense? Are there any subtleties I'm missing, and should I manage deletion and the whole hierarchy by hand using plain ref types? Any thoughts much appreciated. A link to an article is also fine (I tried to RTFM but I never saw anyone use components for hierarchies and am wondering why).
This might be a fit, but generally IsComponent is used to reference an entity which doesn’t have an identity at all apart from its parent
Dataomic assumes (but does not enforce) that if there’s an assertion [e iscomponentattr component-e], this is the only datom in the entire db with Component-e in the v slot
At least the d/entity api will also make the reverse-ref of an attr not-a-collection for this reason (even if there is in fact more than one entity pointing to it!)
You should be careful with “reparenting” a node via an IsComponent attr because you can end up violating this constraint by accident
Thank you Favila much appreciated. I couldn't find documentation about the assumption you mention, any chance you have a handy link?
Specifically I'm thinking of this: Components allow you to create substantial trees of data with nested maps, and then treat the entire tree as a single unit for lifecycle management (particularly retraction). All nested items remain visible as first-class targets for query, so the shape of your data at transaction time does not dictate the shape of your queries. This is a key value proposition of Datomic when compared to row, column, or document stores.
"all nested items remain visible..."
It’s not explicitly stated that way anywhere to my knowledge but it’s an inevitable consequence of the special behavior IsComponent attrs get: 1) retractEntity deletes them even if other entities reference them ; reverse-ref in entity and pull doesn’t show all reverse refs only the first one; pull * and d/touch eagerly follow and load the value of those references
Trying to deploy an ion to a new Datomic Cloud instance in a new AWS account. The deploy step is failing and Cloudwatch logs reports
{
"errorMessage": "No Deployment Group found for name: mbsolo-Compute-KLOG23BUPMGI",
"errorType": "DeploymentGroupDoesNotExistException",
"stackTrace": [
"Request.extractError (/var/runtime/node_modules/aws-sdk/lib/protocol/json.js:51:27)",
"Request.callListeners (/var/runtime/node_modules/aws-sdk/lib/sequential_executor.js:106:20)",
"Request.emit (/var/runtime/node_modules/aws-sdk/lib/sequential_executor.js:78:10)",
"Request.emit (/var/runtime/node_modules/aws-sdk/lib/request.js:683:14)",
"Request.transition (/var/runtime/node_modules/aws-sdk/lib/request.js:22:10)",
"AcceptorStateMachine.runTo (/var/runtime/node_modules/aws-sdk/lib/state_machine.js:14:12)",
"/var/runtime/node_modules/aws-sdk/lib/state_machine.js:26:10",
"Request.<anonymous> (/var/runtime/node_modules/aws-sdk/lib/request.js:38:9)",
"Request.<anonymous> (/var/runtime/node_modules/aws-sdk/lib/request.js:685:12)",
"Request.callListeners (/var/runtime/node_modules/aws-sdk/lib/sequential_executor.js:116:18)"
]
}
Weirdly, when I look in the AWS CodeDeploy Console, I see mbsolo-Compute-KLOG23BUPMGI
listed in the deployment group.Any thoughts?
Just noticed that the push
operation reported an empty :deploy-groups
list.
{:rev "5c79aede20d112c7ebbdc8a9a65514451a2a6f19",
:deploy-groups (),
:dependency-conflicts
{:deps
{com.cognitect/transit-java #:mvn{:version "0.8.311"},
org.clojure/clojure #:mvn{:version "1.10.0"},
commons-codec/commons-codec #:mvn{:version "1.10"},
org.clojure/tools.analyzer.jvm #:mvn{:version "0.7.0"},
com.fasterxml.jackson.core/jackson-core #:mvn{:version "2.9.8"},
com.google.guava/guava #:mvn{:version "18.0"},
org.msgpack/msgpack #:mvn{:version "0.6.10"},
com.cognitect/transit-clj #:mvn{:version "0.8.285"},
com.cognitect/s3-creds #:mvn{:version "0.1.23"},
org.clojure/tools.reader #:mvn{:version "1.0.0-beta4"},
org.clojure/test.check #:mvn{:version "0.9.0"},
com.amazonaws/aws-java-sdk-kms #:mvn{:version "1.11.479"},
org.clojure/core.async #:mvn{:version "0.3.442"},
com.amazonaws/aws-java-sdk-s3 #:mvn{:version "1.11.479"}},
:doc
"The :push operation overrode these dependencies to match versions already running in Datomic Cloud. To test locally, add these explicit deps to your deps.edn."},
:deploy-command
"clojure -Adev -m datomic.ion.dev '{:op :deploy, :group <group>, :rev \"5c79aede20d112c7ebbdc8a9a65514451a2a6f19\"}'",
:doc
"To deploy, issue the :deploy-command, replacing <group> with a group from :deploy-groups"}
From the thread, it looks like the solution is to create a new AWS account but it would be helpful to open an AWS support ticket.
@U1QJACBUM Can you confirm this is the same problem? If so, I could use some guidance on what to put in the support ticket
I found the problem (spolier: It's my own fault): I had two ion-config.edn files - one in the proper place and the one that I was editing in the wrong location. The one in the proper place had an app-name
pointing to an old and deleted cloud stack.
No worries 🙂
I noticed there are a lot of resources not cleaned up when a stack is deleted. Do you guys have much control over that?