Fork me on GitHub
#datomic
<
2020-04-29
>
robert-stuttaford07:04:33

@marshall @jaret hey guys 👋 we want to switch from Java 8 to Java 11, but when i start a pro-0.9.6024 transactor, I get this warning:

WARNING: Illegal reflective access by org.codehaus.groovy.reflection.CachedClass$3$1 (file:/Users/robert/Datomic/datomic-pro-0.9.6024/lib/groovy-all-1.8.9.jar) to method java.lang.Object.finalize()
i did try to find supported java versions on the datomic doc site but couldn't find anything. got any advice for me, please? thanks!

favila11:04:18

I’ve been told by Cognitect (never seen in docs though) that java 11 should work.

favila11:04:50

this error re groovy: it’s actually an unused dep and was removed in the next version 0.9.6045

favila11:04:56

(you can see that in the changelog)

favila12:04:07

you can probably delete that jar file from libs if you don’t want to upgrade

robert-stuttaford13:04:37

oh ok beeauuutiful! thanks @U09R86PA4 and thanks for confirming @marshall!

kenny15:04:16

Is there any documentation on what passing :repl-cmd to datomic.ion.dev/push does exactly? I would've thought it would allow me to run the push with additional aliases but it doesn't appear to have any effect.

kenny15:04:42

More to that point, how does push know which paths to include on the final classpath that will be uploaded to S3? Does it simply not include any aliases? If so, is there a way to have it include some aliases?

kenny17:04:39

I am getting an alert with Datomic Cloud after deploying my Ion:

":datomic.cloud.cluster-node/-main failed: 'datomic/ion-config.edn' is not on the classpath"
No errors reported when pushing and deploying from the REPL. I can also slurp my ion-config.edn from the REPL:
clj -A:dev:ion-deploy
Clojure 1.10.1
user=> (require '[ :as io])
nil
user=> (slurp (io/resource "datomic/ion-config.edn"))
"{:allow [],\n :lambdas\n {:query-pricing-api\n  {:fn cs.ions.pricing-api/lambda-handler,\n   :description \"Query the pricing-api.\"}},\n :app-name \"datomic-import-test\"}\n"
I'm missing something between what is on the classpath locally and what it ends up deploying.

kenny17:04:31

Does ion push somehow take into account .gitignore?

kenny17:04:32

Ah, I think Ion push simply ignores all aliases.

kenny19:04:13

We're using a monorepo style project where lots of dependencies are all :local/root. Datomic Ions appear to require no :local/root deps even if the git repo is clean and all :local/root deps are within the same git repo. Is this a necessary constraint?

alexmiller19:04:30

Local root deps are not in git repos from dep’s perspective

alexmiller19:04:41

They are local unmanaged resources

alexmiller19:04:35

It seems unlikely that Datomic team would infer this semantic over the top. I think the real place to work this problem is in tools.deps but it really requires a top down intent to address this monorepo use case and I don’t think that’s something likely to happen soon

alexmiller19:04:32

As far as workarounds, I’m not sure all of the options available for ions

Joe Lane20:04:50

@kenny Create a "runner" project which depends on specific git revision but then allows the deps to be overridden when you have a :local alias. Example of this "runner" approach with ions is https://github.com/Datomic/ion-event-example-app which just composes https://github.com/Datomic/ion-event-example. You deploy the former. If you expanded on this style with many smaller ion modules/projects you can compose different ion libraries in any way you want. I'm working on a reference application that demonstrates this by having various "services" (different apps like a health-tracker, a recipe app, a todo application, etc.) all deployed by the same "runner" which references each of these projects at a specific git sha and development is very smooth because in cursive I can create a multi-module project which allows me to edit my :local/root siblings at the same time but keep them in different git repos.

kenny21:04:13

Yeah, I suppose I could to that. Would involve creating a deps.edn that contains all of my sub-projects. Easy to do programmatically.

Joe Lane21:04:06

I'll try to get around to sharing my example this weekend.

kenny23:04:17

Any idea what I need to do to get cast/event to work locally?

(cast/event {:msg "Foo"})
Execution error (IllegalArgumentException) at datomic.ion.cast.impl/fn$G (impl.clj:14).
No implementation of method: :-event of protocol: #'datomic.ion.cast.impl/Cast found for class: nil