Skip to content
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

Windows 10 & Windows 11 #3

Closed
krish777 opened this issue Aug 3, 2024 · 19 comments
Closed

Windows 10 & Windows 11 #3

krish777 opened this issue Aug 3, 2024 · 19 comments

Comments

@krish777
Copy link

krish777 commented Aug 3, 2024

When all the below commands are executed in Windows 10 & Windows 11 got the same error.

Command 1. dictim -c '["John" "Manager"] ["Pauli" "Developer"] ["John" "->" "Pauli" "Test"]'

Error: Don't know how to create ISeq from: clojure. lang Symbol

Command 2. dictim -c '(["John" "Manager"] ["Pauli" "Developer"] ["John" "->" "Pauli" "test"])'

Error: Don't know how to create ISeq from: clojure.lang-Symbol

Command 3. dictim -c '(["John" "Manager"] ["Pauli" "Developer"] ["John" "->" "Pauli" "test"])' | d2 - >> out.svg

Error: Don't know how to create ISeq from: clojure.lang-Symbol

D2 file is generated, but when we open this file it contains same error Don't know how to create ISeq from: clojure.lang-Symbol

@judepayne
Copy link
Owner

I think this error is caused by the fact that you're not escaping double quotes in your strings. I will take a look.

In the meantime I suggest putting your content into a file and pulling it in with a <
This way you avoid the vagaries of terminal string handling, quoting and escaping

@judepayne
Copy link
Owner

What environment are you trying this on - Windows? all these work for me on Mac but I haven't tried Windows yet

@judepayne
Copy link
Owner

@eddielao
As you're on Windows, appreciate it you could try to replicate this and confirm it's an issue

@eddielao
Copy link
Contributor

eddielao commented Sep 1, 2024

'["John"

Hi @judepayne , I am getting the same errors. My OS is Windows 10 pro.

@judepayne
Copy link
Owner

Thanks. I need to think about how to debug this

@eddielao
Copy link
Contributor

eddielao commented Sep 2, 2024

Let me know if I can help. Thank you!

@judepayne
Copy link
Owner

Ok looked into how Windows command prompt handles strings and the above will not work. Not a dictim issue, but...
See this overview: https://ss64.com/nt/syntax-args.html
So, @eddielao instead of @krish777 's first example, can you please try:

dictim -c "[\"John\" \"Manager\"] [\"Pauli\" \"Developer\"] [\"John\" \"->\" \"Pauli\" \"Test\"]"

In other words, single quotes are not allowed and double quotes within double-quoted arguments have to be escaped.

The second example becomes

dictim -c "([\"John\" \"Manager\"] [\"Pauli\" \"Developer\"] [\"John\" \"->\" \"Pauli\" \"test\"])"

If those two work, then I suggest we close this issue and instead add a section here on the dictim wiki https://github.com/judepayne/dictim/wiki/Command-Line covering how to convert any of the example commands given to Windows, e.g. new section titled 'Converting commands to Windows Command Prompt'.

PR welcome on that one!

(please note that the dictim wiki is a separate project on GitHub, so will have to be forked etc etc..)

@eddielao
Copy link
Contributor

eddielao commented Sep 2, 2024

Hi @judepayne , now we get 'The system cannot find the path specified.'

C:\Users\...\git>dictim -c "[\"John\" \"Manager\"] [\"Pauli\" \"Developer\"] [\"John\" \"->\" \"Pauli\" \"test\"]"
The system cannot find the path specified.
C:\Users\...\git>dictim -c "([\"John\" \"Manager\"] [\"Pauli\" \"Developer\"] [\"John\" \"->\" \"Pauli\" \"test\"])"
The system cannot find the path specified.

@judepayne
Copy link
Owner

hmm flying a bit blind here without a Windows setup myself.
However I think what is going on is that the now properly formatted argument (to compile) in double quotes is making Windows push that argument into std-in rather than treating it as an argument (the behaviour on Mac + Linux).
I made a tiny tweak to the 'handle-in' fn in the dictim.cmd ns, and put a bit of debug in there for now.
Once the latest dictim executable is finishing building for Windows here https://github.com/judepayne/dictim/releases (normally takes 10 minutes ish) please download it and re-run the command. Let me know what it says. Thanks!

@judepayne
Copy link
Owner

hmm - didn't build. Let's leave this one until I have a Windows dev environment. Windows cmd prompt seems to have some major behaviour differences to Mac/linux terminal which at the moment I cannot test

@eddielao
Copy link
Contributor

eddielao commented Sep 3, 2024

hmm - didn't build. Let's leave this one until I have a Windows dev environment. Windows cmd prompt seems to have some major behaviour differences to Mac/linux terminal which at the moment I cannot test

Hi @judepayne, I went to the release page and saw the latest release was built 6 hours ago but version is still 0.8.7, which is the same version I downloaded on 9/1. Just wanted to double check. Thank you!

@judepayne
Copy link
Owner

Hi @eddielao the way it's set up, every push results in new runs of circleci (see inside the .circleci folder) for Mac and Linux and Appveyor (see appveyor.yml). As long as those scripts succeed, new versions of the Mac, linux and windows native command line tools are pushed to the releases page overwriting the previous versions. Breaking one of the principles of 12 factor apps I know! (but it's easier).
Should have a Windows dev environment within a day and can then get to the bottom of these differences

@eddielao
Copy link
Contributor

eddielao commented Sep 3, 2024

Thank you, @judepayne ! I just wanted to make sure there is/is not a newer version that I should test. Thank you!

@judepayne
Copy link
Owner

@eddielao @krish777
Solved!
In Windows command prompt < and > are special characters and have to be escaped.

so

dictim -c "([\"john\" \"Manager\"] [\"pauli\" \"Developer\"] [\"john\" \"--\" \"pauli\"])"

works

but

dictim -c "([\"john\" \"Manager\"] [\"pauli\" \"Developer\"] [\"john\" \"->\" \"pauli\"])"

does not.

You have to escape using a caret ^ character, like so:

dictim -c "([\"john\" \"Manager\"] [\"pauli\" \"Developer\"] [\"john\" \"-^>\" \"pauli\"])"

I will update instructions on the wiki in the morning.

If the dictim string is in a file e.g. something like

dictim -c < my_dictim.edn

there's no need to escape.

So not a dictim error - a windows terminal knowledge thing as suspected, but worth noting on the wiki as it will catch anyone out.

@judepayne
Copy link
Owner

New 'Windows note' section added to Command line page of wiki + removed any debug added to try to trap the error previously (& pushed).

@krish777 @eddielao

I will close this issue now.

Fixed all the issues you've raised to me at this point. Do you want a new release? If you want to continue to test a bit more, no problem, the Releases page has all the latest, with-fixes, binaries for you to use (but still marked as v0.8.7).

@eddielao
Copy link
Contributor

eddielao commented Sep 4, 2024

Hi @judepayne, yes to a minor release?

@judepayne
Copy link
Owner

I will do that. I will squeeze in a resolution for issue #12 as well

@judepayne
Copy link
Owner

@krish777 the latest build of 0.8.7 has all the bug fixes and also changes how comments are represented

@judepayne
Copy link
Owner

@eddielao also pushed as 0.8.8 release. Code in the binaries is the same!

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

No branches or pull requests

3 participants