I’ve grown very weary myself of Inspect’s DB Viewer “Losing it’s mind”. The protocol that it is using to talk between your application and the inspect tool also adds a lot of overhead in development transactions (the inspect communication overhead can easily dominate the tx time in development by 10 to 1). I spent this weekend rewriting how the db sync protocol works. Instead of sending every state on every db change (sent as diffs which somehow lose track of where they are and cause you just to see an empty db tab), I’ve changed the protocol to just send a unique ID. This not only dramatically reduces the overhead in the tooling communication, but guarantees the Inspect tool can ask for the view of a particular version of the database (stored as history in your app) only when you need to see it. There is still a diff protocol, so Inspect can ask for a revision of the database as a diff based on the last version is has (e.g. “Give me revision 399, but just the diff since revision 367"). It still needs some polish, but I’m going to release an Inspect Electron version 3.0.0 tonight that will require Fulcro 3.4.0-SNAPSHOT. This will be a breaking change for the Chrome plugin. I simply don’t have the time to maintain both protocols. If you need to use an older version of Fulcro, then you will need to also use an older version of the Electron app (or build the chrome plugin yourself from source and install it locally). I won’t be updating the Chrome store for a while. I want to use the electron version myself for some time and make sure everything works well. I would encourage anyone that can to try out the new Electron version with Fulcro 3.4.0-SNAPSHOT (websocket-preload). The following features are currently not working right/finished: • The history slider in db viewer • DB Snapshots might be working, but I have not tested them heavily The behavior will appear a little different as you work. Inspect will auto-fetch the most recent database from your app anytime things go “idle”. This means that if you’re typing rapidly in your application Inspect will only know that db revisions are happening (it will get the revision numbers). Once things go idle (200ms right now, I think), then it will issue a fetch back to your app to get the latest revision itself (as a diff based on the most recent it already had). https://github.com/fulcrologic/fulcro-inspect/releases/tag/electron-3.0.0-RC1 Fulcro 3.4.0-SNAPSHOT that works with it is on clojars.
Cool I think I might have encountered this problem when showing friends the inspect tooling where it wasn't showing what was in the db as shown elsewhere
I have a question about RAD's file upload. I have, like in demo, made a temporary-blob-store, and added all that is needed to parser.clj, but I guess I maybe am calling the uploader function wrong. Right now I have this:
(fn [evt]
(let [file (first (blob/evt->js-files evt))]
(log/info "File:" file)
(log/info "Upload:"
(blob/upload-file!
this
{::attr/qualified-key :account/photo}
file
:account/photo))))
But all I get is a _rad.blob:-179 - Received file nil
on the console when triggering it. What is that last keyword exactly for, even, is that a property of the current component it has to set? (Would be my assumption)file upload requires multiple attributes, and uses keyword “extension” to store the things related to the file. See the demo, and source.