Code Monkey home page Code Monkey logo

Comments (2)

sogaiu avatar sogaiu commented on June 2, 2024 1

Have started to investigate this in the context of getting something to work for developing VSCode extensions in Clojurescript.

I got as far as obtaining a Chromium / dirac pair, but encountered difficulty in running the dirac-sample during its lein repl step. Below is a summary:

  1. Try to identify relevant version of Electron. I looked at:

https://code.visualstudio.com/updates/v1_36

and noted:

Electron 4.0 update and Electron 6.0 exploration

In this milestone, we finished the exploration of bundling Electron 4 into VS Code, making it the first time this Electron version ships with stable.

So it seemed that Electron 4.0 might be relevant.

  1. Try to identify relevant version of Chromium. I looked at:

https://github.com/Kilian/electron-to-chromium/blob/master/versions.js

and noted:

module.exports = {
	"6.0": "76",
	"5.0": "72",
	"4.2": "69",
	"4.1": "69",
	"4.0": "69",

So it seemed like some Chromium 69 might be relevant.

  1. Try to identify which dirac version to try. I looked at:

https://github.com/binaryage/dirac/releases/tag/v1.2.36

and noted:

Should work best with Chrome ~69.0.3485.1.

Also picked up a zip file of the dirac extension for later manual installation.

  1. Try to obtain specific Chromium. I looked at the section titled "Downloading old builds of Chrome / Chromium" at:

https://www.chromium.org/getting-involved/download-chromium

and adapted its instructions to first look at:

https://omahaproxy.appspot.com/

entering "69.0.3485.1" in the Version field within the "Version Information" box. This yielded:

Branch Base Position 573176

Then visiting:

https://commondatastorage.googleapis.com/chromium-browser-snapshots/index.html

I navigated to "Mac", and entered 573176 in the Filter field and (after some wait) received the URL:

https://commondatastorage.googleapis.com/chromium-browser-snapshots/index.html?prefix=Mac/573176/

Visiting it, was able to find a link to chrome-mac.zip, which I downloaded.

  1. Try to run dirac-sample demo. I cloned the dirac-sample, checked its git log to identify the commit that corresponds to 1.2.36. This looked to be:

22b01be8f8de14054f057fe0ea341ef378f3828f

After a git checkout of this commit, attempted to follow the steps for running the demo. Started the obtained Chromium using the remote debugger port and specifying a custom profile. I manually installed the matching dirac Chrome extension (obtained in step 3 and unzipped) via chrome://extensions/ (enabling dev mode first, etc.) I ran lein demo from a terminal and waited for it to execute the dev-server.sh (web server) step. Then I ran lein repl from another terminal and got:

[WARNING] No nREPL middleware descriptor in metadata of #'dirac.nrepl/middleware, see nrepl.middleware/set-descriptor!
nREPL server started on port 8230 on host 127.0.0.1 - nrepl://127.0.0.1:8230
ERROR: Unhandled REPL handler exception processing message {:id 9b94bd2f-743d-425e-b308-446962134c3a, :op describe}
java.lang.NullPointerException
        at clojure.core$swap_BANG_.invokeStatic(core.clj:2346)
        at clojure.core$swap_BANG_.invoke(core.clj:2337)
        at dirac.nrepl.state$register_last_seen_nrepl_message_BANG_.invokeStatic(state.clj:52)
        at dirac.nrepl.state$register_last_seen_nrepl_message_BANG_.invoke(state.clj:49)
        at dirac.nrepl.state$register_last_seen_nrepl_message_BANG_.invokeStatic(state.clj:50)
        at dirac.nrepl.state$register_last_seen_nrepl_message_BANG_.invoke(state.clj:49)
        at dirac.nrepl.piggieback$handler_job_BANG_.invokeStatic(piggieback.clj:93)
        at dirac.nrepl.piggieback$handler_job_BANG_.invoke(piggieback.clj:92)
        at dirac.nrepl.piggieback$dirac_nrepl_middleware_handler.invokeStatic(piggieback.clj:104)
        at dirac.nrepl.piggieback$dirac_nrepl_middleware_handler.invoke(piggieback.clj:100)
        at clojure.core$partial$fn__5561.invoke(core.clj:2616)
        at clojure.tools.nrepl.middleware$wrap_conj_descriptor$fn__2135.invoke(middleware.clj:22)
        at nrepl.server$handle_STAR_.invokeStatic(server.clj:18)
        at nrepl.server$handle_STAR_.invoke(server.clj:15)
        at nrepl.server$handle$fn__1101.invoke(server.clj:27)
        at clojure.core$binding_conveyor_fn$fn__5476.invoke(core.clj:2022)
        at clojure.lang.AFn.call(AFn.java:18)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:748)

Any hints as to things I might have done wrong or suggestions?

I can also try under Windows (though I think I need to create an appropriate dev-server.bat there at least) and some Linux distribution, but IIUC the primary development platform for dirac is macos.

from dirac.

darwin avatar darwin commented on June 2, 2024

Hi, I very much doubt it could work this way. According to my past experience the browser engine shipped with Electron is usually several months older than current Chrome Canary. This is definitely a deal breaker: https://github.com/binaryage/dirac/blob/master/docs/faq.md#why-should-i-use-recent-chrome-canary-with-dirac-devtools.

In theory you could be able to find past Dirac version which would match browser engine in your particular Electron version. But still I think there could be other issues.

I'm personally not going to add Electron support to Dirac. If someone would add it and commit to supporting it, I would consider merging a PR.

from dirac.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.