Closed keychera closed 1 year ago
Adding more information, I tried several other example and it seems that everything works fine, I tried
bbin install io.github.rads/watch --latest-sha
bbin install org.babashka/http-server --mvn/version 0.1.11
bbin install io.github.borkdude/quickblog --tool --ns-default quickblog.api
bbin install foo.clj
bbin install https://gist.githubusercontent.com/keychera/6a35d8f30328cdcff2e6c7cca8f7b536/raw/8852f3585c0b1fa4805aa68dc0d35624873dafd8/panas.file-server.clj
and all of these works fine, so far only neil
and installing a project via path that has issue
Luckily neil can be installed via scoop, but I'll take a look soon! Help debugging or a PR is appreciated
Can you give the code of the installed script here? I suspect there is something with the paths not right.
I mean the code of the script as installed, not of the script before installation.
if you mean the script in the bbin/bin folder here it is
#!/usr/bin/env bb
; :bbin/start
;
; {:coords {:bbin/url "file://D:\\keychera\\projects\\hello"}}
;
; :bbin/end
(require '[babashka.process :as process]
'[babashka.fs :as fs]
'[clojure.string :as str])
(def script-root "D:\\keychera\\projects\\hello")
(def script-main-opts-first "-m")
(def script-main-opts-second "hello")
(def tmp-edn
(doto (fs/file (fs/temp-dir) (str (gensym "bbin")))
(spit (str "{:deps {local/deps {:local/root \"" script-root "\"}}}"))
(fs/delete-on-exit)))
(def base-command
["bb" "--deps-root" script-root "--config" (str tmp-edn)
script-main-opts-first script-main-opts-second
"--"])
(process/exec (into base-command *command-line-args*))
just in case, these two files are in the hello folder that I am trying to install
bb.edn
{:paths ["src"]
:bbin/bin {hello {:main-opts ["-m" "hello"]}}}
src/hello/clj
(ns hello)
(println "hello bbin!")
OK, I see the issue and will provide a PR
@keychera A new bbin version was just released. Can you verify if things are working for you now?
@borkdude hmm actually, using bbin 0.1.10 it now produces different error
Error building classpath. Manifest file not found for local/deps in coordinate #:local{:root "D:\\keychera\\projects\\hello"}
Exception in thread "main" java.io.FileNotFoundException: C:\Users\kyoga\.clojure\.cpcache\0E6F116D4EDDF77A5F4F2DAE2F5A3A44.cp (The system cannot find the file specified)
at java.base@11.0.17/java.io.FileInputStream.open0(FileInputStream.java)
at java.base@11.0.17/java.io.FileInputStream.open(FileInputStream.java:219)
at java.base@11.0.17/java.io.FileInputStream.<init>(FileInputStream.java:157)
at clojure.java.io$fn__11617.invokeStatic(io.clj:229)
...omitted
I tried several times and I think the missing file name stays the same. I do check that folder and it's true that file is not found, deleting the .cpcache does not seem to help as well, should this be a different issue?
also I encounter another weird issue. I tried running other installed script I did above, and three of them (http-server
, watch
, adn quickblog
) nows produces the same error as neil on CMD
Exception in thread "main" java.lang.IllegalArgumentException: 'other' has different root
but then I tried running them on Powershell, it works fine. what is weird is that when I tried those three again back on CMD, they don't produce the error again. I tried this with neil and now neil works on both terminal
but the installed local hello
still have that .cpcache file not found
error on CMD and 'other' has different root
on Powershell
Manifest file not found for local/deps in coordinate #:local{:root "D:\keychera\projects\hello"}
This means that your project doesn't have a deps.edn
file. Projects need to have deps.edn
file to be able to use them as a library.
I'll have a look at the neil issue on Windows.
Btw please specify your bb --version
bb --version
babashka v1.1.173
and I tried setting up deps.edn, it works now! thank you very much personally for now, I only need to install as a local library but I'll leave this ticket open regarding the neil problem
Just to be sure, can you try v1.2.174
?
I just tried v1.2.174 and I got the same 'other' has different root
error
@keychera I can't reproduce the error with neil:
I re-installed bbin on a Windows machine.
Then I ran: bbin install io.github.babashka/neil
After restarting my cmd.exe terminal, I was able to execute neil.
Can you provide a detailed step by step report of what you are doing, so I can reproduce it? Let's start with only one problem and not several, as it's hard to keep track of all the details.
In fact, let's close this issue and please create a new issue for each problem.
Ah wait, I think the issue may be that you are on a different hard drive than where neil is installed. I'll try that.
I still can't reproduce:
U:\tmp>bbin uninstall neil
Removing C:\Users\borkdude\.babashka\bbin\bin\neil
U:\tmp>where neil
INFO: Could not find files for the given pattern(s).
U:\tmp>bbin install io.github.babashka/neil
{:coords
#:git{:url "https://github.com/babashka/neil.git",
:tag "v0.1.57",
:sha "350c7ce94060bb0a6e57b32d35c37d9b17d88970"},
:lib io.github.babashka/neil}
U:\tmp>neil
Usage: neil <subcommand> <options>
Most subcommands support the options:
--alias Override alias name.
--deps-file Override deps.edn file name.
Ok, I will get back to this when I got the chance, I will make a new issue
if I can reproduce it again. Earlier, I also encounter that other
error
to some of my locally installed script after upgrading babashka that I had
to reset back to the previous one I used, I will be reporting all the
related findings
2023年3月6日(月) 2:43 Michiel Borkent @.***>:
I still can't reproduce:
U:\tmp>bbin uninstall neil Removing C:\Users\borkdude.babashka\bbin\bin\neil
U:\tmp>where neil INFO: Could not find files for the given pattern(s).
U:\tmp>bbin install io.github.babashka/neil {:coords
:git{:url "https://github.com/babashka/neil.git",
:tag "v0.1.57", :sha "350c7ce94060bb0a6e57b32d35c37d9b17d88970"},
:lib io.github.babashka/neil}
U:\tmp>neil Usage: neil
Most subcommands support the options: --alias Override alias name. --deps-file Override deps.edn file name.
— Reply to this email directly, view it on GitHub https://github.com/babashka/bbin/issues/57#issuecomment-1455184664, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFRA2M63YJSCV643DQK4QX3W2TUEPANCNFSM6AAAAAAVPTS5OM . You are receiving this because you were mentioned.Message ID: @.***>
@borkdude I did a number of attempts and I can't seem to reproduce it consistently. The best I can describe it is that the error occassionally show up.
What I did was to duplicate the hello
lib project above, rename bbin bin
folder, and do all sort of bbin install
to those hello projects in two terminal on different path: C:\Users\kyoga
and D:\keychera\projects
. I did this because I suspected the error is path related after reading the source code of sun.nio.fs.WindowsPath.relativize
since this is the one that throws the error
Exception in thread "main" java.lang.IllegalArgumentException: 'other' has different root
at java.base@19.0.2/sun.nio.fs.WindowsPath.relativize(WindowsPath.java:420)
at java.base@19.0.2/sun.nio.fs.WindowsPath.relativize(WindowsPath.java:42)
at borkdude.deps$relativize.invokeStatic(deps.clj:583)
at borkdude.deps$_main.invokeStatic(deps.clj:795)
...omitted
and the error did show up, but only on some attempts out of all attempts that I did. One attempts flow like this
- in terminal `C:\Users\kyoga`
- bbin install `D:/keychera/projects/hello`
- hello => this works
- bbin install `D:/keychera/projects/hello2`
- hello2 => this works
- bbin install `D:/keychera/projects/hello3`
- hello3 => this throws "other" error
- in terminal `D:\keychera\projects`
- hello3 => now this works, why?
- back to terminal `C:\Users\kyoga`
- hello3 => this works now, why???
and this is not consistent and not always in that order, and the latest attempts that I did, the error did not even show up at all. So I don't know, I think I'll not make another issue for now since, well, the error stopped showing up which should be a good thing but somehow I feel defeated 😅 anyway thank you very much for helping me solving the original issue and everything else! 🙏
If it happens again, please make another issue :)
I encountered several issues running several installed project on Windows 10 Home Single Language
bb.edn
with :bbin/bin andsrc/hello.clj
that only print hello). I install them withbbin install D:/keychera/projects/hello
and the installation was successful but when I ran the project, I got this errorbbin install io.github.babashka/neil
, I got an error as well when running them----- Context ------------------------------------------------------------------ 4: ;; DO NOT EDIT DIRECTLY. GENERATED FROM scr/babashka/neil.clj 5: 6: (require '[babashka.deps :as deps]) 7: 8: (deps/add-deps '{:deps {borkdude/rewrite-edn {:mvn/version "0.4.6"} ^--- 'other' has different root ...omitted