-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issues running installed script on Windows 10 #57
Comments
Adding more information, I tried several other example and it seems that everything works fine, I tried
and all of these works fine, so far only |
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 {:paths ["src"]
:bbin/bin {hello {:main-opts ["-m" "hello"]}}}
|
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 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 [email protected]/java.io.FileInputStream.open0(FileInputStream.java)
at [email protected]/java.io.FileInputStream.open(FileInputStream.java:219)
at [email protected]/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 ( but the installed local |
This means that your project doesn't have a I'll have a look at the neil issue on Windows. |
Btw please specify your |
bb --version and I tried setting up deps.edn, it works now! thank you very much |
Just to be sure, can you try |
I just tried v1.2.174 and I got the same |
@keychera I can't reproduce the error with neil: I re-installed bbin on a Windows machine. Can you provide a detailed step by step report of what you are doing, so I can reproduce it? 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:
|
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 <subcommand> <options>
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
<#57 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AFRA2M63YJSCV643DQK4QX3W2TUEPANCNFSM6AAAAAAVPTS5OM>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
@borkdude What I did was to duplicate the Exception in thread "main" java.lang.IllegalArgumentException: 'other' has different root
at [email protected]/sun.nio.fs.WindowsPath.relativize(WindowsPath.java:420)
at [email protected]/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. - 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 thembbin install https://gist.githubusercontent.com/rads/da8ecbce63fe305f3520637810ff9506/raw/25e47ce2fb5f9a7f9d12a20423e801b64c20e787/portal.clj
and it ran just fineso I am not so sure what is going on here
also regarding the first error, I did some investigation,
Unsupported escape character: \k
apparently is from the firstletter of the folder name in the path name provided, and I did move around the
hello
project to several places and the error is the same but the character will show the first letter of the path folder. I also tried installing the project with different slash and using relative folder as well but the error stays the same. I also tried this in both cmd and Powershell and there are no differencesThe text was updated successfully, but these errors were encountered: