cursive icon indicating copy to clipboard operation
cursive copied to clipboard

Unable to start REPL when using previously downloaded git sha deps and offline

Open HughPowell opened this issue 2 years ago • 0 comments

I'm unable to start my REPL when I have git sha dependencies, that have previously been downloaded, and I am now offline (e.g. I'm working on a aeroplane).

Reproduction Given a project with nothing but a deps.edn file like

{:deps {polylith-kaocha/kaocha-wrapper 
        {:git/url "https://github.com/imrekoszo/polylith-kaocha"
         :git/tag "v0.8.2"
         :git/sha "d1fcd40"
         :deps/root "projects/kaocha-wrapper"}}}
  1. Create a Deps REPL (Run → Edit Configurations … → + → Clojure REPL → Local → Select "Run with Deps" → OK)
  2. Start the REPL by pressing the green arrow on the top right of the IDE
  3. Wait for the REPL to start and exit
  4. Disconnect my laptop from the internet
  5. Restart the REPL

I get the following error (I've replaced the hard coded root path with a relative one):

Unable to fetch ~/.gitlibs/_repos/https/github.com/imrekoszo/polylith-kaocha fatal: unable to access 'https://github.com/imrekoszo/polylith-kaocha/': Could not resolve host: github.com error: Could not fetch origin

Checking the dependency was downloaded and exists where it is expected to

$ ls ~/.gitlibs/_repos/https/github.com/imrekoszo/polylith-kaocha
branches  config  description  FETCH_HEAD  HEAD  hooks  info  objects  packed-refs  refs  worktrees

Working with the Clojure CLI Having the same project structure and doing the following

$ clojurj --version
Clojure CLI version 1.11.1.1208
$ clj
Clojure 1.11.1
user=> 
  • <Ctrl-c> to exit the REPL
  • Disconnect my laptop from the internet
$ clj
Clojure 1.11.1
user=> 

Versions

Intellij Idea version image

Cursive version image

OS versions (Pop_os on Linux) image

HughPowell avatar Apr 18 '23 00:04 HughPowell