This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-06-17
Channels
- # ai (1)
- # announcements (2)
- # babashka (29)
- # beginners (43)
- # calva (1)
- # cider (3)
- # clerk (6)
- # clj-kondo (3)
- # cljdoc (2)
- # cljs-dev (1)
- # clojure (16)
- # community-development (8)
- # data-science (1)
- # emacs (6)
- # events (4)
- # hyperfiddle (14)
- # lsp (24)
- # practicalli (1)
- # reagent (5)
- # releases (1)
- # rewrite-clj (2)
- # vim (6)
I am getting No matching ctor found for class java.util.Date
when using Date with millis like (Date. millis)
. I don't understand what's wrong here. I am sure it is a long that I am passing.
EDIT: This is a pod so more of a graalvm-question. But inside the pod when compiled I can not call Date with milliseconds. 😕
This is a reflection issue:
user=> (set! *warn-on-reflection* true)
true
user=> (def x 1)
#'user/x
user=> (java.util.Date. x)
Reflection warning, NO_SOURCE_PATH:1:1 - call to java.util.Date ctor can't be resolved.
#inst "1970-01-01T00:00:00.001-00:00"
serialization: if you use transit as the pod payload format, then it'll work out of the box
hey, getting some duplicate notifications with fs watcher, not sure what I'm missing here. EDIT: with :recursive true
[fsousa@work fs-watch-issue]$ ls
bb.edn
[fsousa@work fs-watch-issue]$ cat bb.edn
{:paths ["src"]
:pods {org.babashka/fswatcher {:version "0.0.3"}}
:tasks
{ watch {:requires ([pod.babashka.fswatcher :as fw]
[babashka.fs :as fs])
:task (do (fw/watch "." prn {:recursive true :delay-ms 500})
(deref (promise)))}}}
[fsousa@work fs-watch-issue]$ bb watch #Then I just added a new line to bb.end and saved once
{:type :write, :path "./bb.edn"}
{:type :write, :path "bb.edn"}
{:type :write, :path "./bb.edn"}
{:type :write, :path "bb.edn"}
fswatcher is just a thin wrapper around the golang library, so whatever behavior you get from that library, you get with the pod
it wraps this lib: https://github.com/fsnotify/fsnotify
I could avoid this by adding multiple watchers, it's just that it would be cleaner to have a single one
ok right away there's mentioning of dups
[fsousa@work fsnotify]$ go run ./cmd/fsnotify
# ...
fsnotify is a Go library to provide c
watch [paths] Watch the paths for changes and print the events.
file [file] Watch a single file for changes.
dedup [paths] Watch the paths for changes, suppressing duplicate events.