Skip to content
This repository has been archived by the owner on Dec 8, 2024. It is now read-only.

Fresh copy fails with "Commit not found for com.hyperfiddle/electric" #4

Open
pcasaretto opened this issue Jul 31, 2024 · 8 comments
Open

Comments

@pcasaretto
Copy link

Downloading a fresh copy 59fb923 and issuing clj -A:dev fails with:

Error building classpath. Commit not found for com.hyperfiddle/electric in repo https://github.com/hyperfiddle/electric-fiddle at 87abb5e58f75c26b0041db8ccbedb5295856b49a

Which is weird because the commit exists hyperfiddle/electric@87abb5e.

Clojure CLI version 1.11.3.1463
Clojure 1.12.0-alpha5
openjdk 21.0.2 2024-01-16 LTS
OpenJDK Runtime Environment Zulu21.32+17-CA (build 21.0.2+13-LTS)
OpenJDK 64-Bit Server VM Zulu21.32+17-CA (build 21.0.2+13-LTS, mixed mode, sharing)

@dustingetz
Copy link
Member

works for me, try ssh clone url not https

➜ git clone [email protected]:hyperfiddle/electric-fiddle.git electric-fiddle-v2
Cloning into 'electric-fiddle-v2'...
remote: Enumerating objects: 3492, done.
remote: Counting objects: 100% (912/912), done.
remote: Compressing objects: 100% (287/287), done.
remote: Total 3492 (delta 670), reused 833 (delta 617), pack-reused 2580
Receiving objects: 100% (3492/3492), 937.56 KiB | 25.34 MiB/s, done.
Resolving deltas: 100% (2261/2261), done.
➜  cd electric-fiddle-v2
➜  git:(main) clj -A:dev
INFO  dev: {:host "0.0.0.0", :port 8080, :resources-path "public", :manifest-path "public/js/manifest.edn"}
INFO  dev: Starting Electric compiler and server...
Clojure 1.12.0-alpha5
user=> INFO  io.undertow: starting server: Undertow - 2.3.10.Final
INFO  org.xnio: XNIO version 3.8.8.Final
INFO  org.xnio.nio: XNIO NIO Implementation Version 3.8.8.Final
INFO  org.jboss.threads: JBoss Threads version 3.5.0.Final
shadow-cljs - server version: 2.26.2 running at http://localhost:9630
shadow-cljs - nREPL server started on port 9001
[:dev] Configuring build.
[:dev] Compiling ...
[:dev] Build completed. (248 files, 247 compiled, 0 warnings, 7.29s)
INFO  electric-fiddle.server-jetty: {:host "0.0.0.0", :port 8080, :resources-path "public", :manifest-path "public/js/manifest.edn", :electric-fiddle.ring-middleware/accept-ws-connect-fn #object[dev$_main$fn__13126 0x4df86de2 "dev$_main$fn__13126@4df86de2"]}
INFO  org.eclipse.jetty.server.Server: jetty-11.0.18; built: 2023-10-27T02:14:36.036Z; git: 5a9a771a9fbcb9d36993630850f612581b78c13f; jvm 17.0.3+0
INFO  org.eclipse.jetty.server.handler.ContextHandler: Started o.e.j.s.ServletContextHandler@50289ab9{/,null,AVAILABLE}
INFO  org.eclipse.jetty.server.AbstractConnector: Started ServerConnector@3815a85d{HTTP/1.1, (http/1.1)}{0.0.0.0:8080}
INFO  org.eclipse.jetty.server.Server: Started Server@74835d8{STARTING}[11.0.18,sto=0] @19861ms
INFO  electric-fiddle.server-jetty: 👉 http://0.0.0.0:8080

@pcasaretto
Copy link
Author

Same thing.
Here's my complete log:

❯ git clone [email protected]:hyperfiddle/electric-fiddle.git hyperfiddle/electric-fiddle
Cloning into 'hyperfiddle/electric-fiddle'...
remote: Enumerating objects: 3492, done.
remote: Counting objects: 100% (912/912), done.
remote: Compressing objects: 100% (287/287), done.
remote: Total 3492 (delta 670), reused 833 (delta 617), pack-reused 2580
Receiving objects: 100% (3492/3492), 937.56 KiB | 1.16 MiB/s, done.
Resolving deltas: 100% (2261/2261), done.
❯ cd hyperfiddle/electric-fiddle
❯ nix shell nixpkgs#clojure
❯ clj -A:dev
Error building classpath. Commit not found for com.hyperfiddle/electric in repo https://github.com/hyperfiddle/electric at 87abb5e58f75c26b0041db8ccbedb5295856b49a

Maybe my nix environment has something to do with it?

@dustingetz
Copy link
Member

Try editing deps.edn and changing these urls to git urls

com.hyperfiddle/electric       {:git/url "https://github.com/hyperfiddle/electric" :git/sha "87abb5e58f75c26b0041db8ccbedb5295856b49a"}
         com.hyperfiddle/rcf            {:git/url "https://github.com/hyperfiddle/rcf" :git/sha "7105b43231140de6f2f39ce38611c9f6c9dfc976"}

@pcasaretto
Copy link
Author

Using this:

{:deps  {com.hyperfiddle/electric       {:git/url "git://github.com/hyperfiddle/electric.git" :git/sha "87abb5e58f75c26b0041db8ccbedb5295856b49a"}
         com.hyperfiddle/rcf            {:git/url "git://github.com/hyperfiddle/rcf.git" :git/sha "7105b43231140de6f2f39ce38611c9f6c9dfc976"}

fails with:

❯ clj -A:dev
Cloning: git://github.com/hyperfiddle/electric.git
Error building classpath. Unable to clone /Users/pcasaretto/.gitlibs/_repos/git/github.com/hyperfiddle/electric
fatal: unable to connect to github.com:
github.com[0: 20.201.28.151]: errno=Operation timed out

Using the latest commit (7e3400f005e0f62bf0c434dedc1fdd4c73f213ea ) with the https URLs work.

I was worried that my ssh config had something wrong, but the ssh test works

❯ ssh -T [email protected]

Hi pcasaretto! You've successfully authenticated, but GitHub does not provide shell access.

@bendlas
Copy link

bendlas commented Sep 30, 2024

I'm seeing the same error. I think that's because the commit got rebased out of the history. See the banner at https://github.com/hyperfiddle/electric/tree/87abb5e58f75c26b0041db8ccbedb5295856b49a

I think @dustingetz attempt works because the commit is cached by clj. Try removing ~/.gitlibs in order to reproduce

@dustingetz
Copy link
Member

dustingetz commented Oct 1, 2024 via email

@bendlas
Copy link

bendlas commented Oct 1, 2024

didn’t realize it would impact the other repos

This could arguably be fixed in tools.deps, since the commit is still available from github:

± git fetch origin 87abb5e58f75c26b0041db8ccbedb5295856b49a
remote: Enumerating objects: 80, done.
remote: Counting objects: 100% (67/67), done.
remote: Total 80 (delta 67), reused 67 (delta 67), pack-reused 13 (from 1)
Unpacking objects: 100% (80/80), 10.72 KiB | 288.00 KiB/s, done.
From github.com:hyperfiddle/electric
 * branch              87abb5e58f75c26b0041db8ccbedb5295856b49a -> FETCH_HEAD

FWIW, in NixOS we're moving away from referencing github commit hashes, since allegedly github has been observed GCing unreachable commits ...

You are doing a fresh clone?

No, it's just been a few weeks since I tried to run it.

@bendlas
Copy link

bendlas commented Oct 1, 2024

btw src/scratch 404s on the v3 branch: https://github.com/hyperfiddle/scratch
EDIT also vendor/hyperfiddle

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants