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

Build fails on Windows #372

Closed
CharlesOkwuagwu opened this issue Sep 17, 2023 · 4 comments
Closed

Build fails on Windows #372

CharlesOkwuagwu opened this issue Sep 17, 2023 · 4 comments

Comments

@CharlesOkwuagwu
Copy link

CharlesOkwuagwu commented Sep 17, 2023

The build fails on Windows.

This seems to fix path normalization for priv (on Windows)

#373

C:\Projects\lexical (main -> origin)
λ mix package --path c:/tools/lexical
Assembling build in c:/tools/lexical
Rewriting 10 app files
Rewriting .beam files
 Found 0 protocols
 Found 1203 app beam files
 Applying namespace: 100% complete
 done
Rewriting 0 scripts
Rebuilding 0 boot files
** (File.CopyError) could not copy recursively from "c:/Projects/lexical/_build/dev/lib/remote_control/Projects/lexical/apps/remote_control/priv" to "c:/tools/lexical/priv". c:/Projects/lexical/_build/dev/lib/remote_control/Projects/lexical/apps/remote_control/priv: no such file or directory
    (elixir 1.15.5) lib/file.ex:949: File.cp_r!/3
    (elixir 1.15.5) lib/enum.ex:984: Enum."-each/2-lists^foreach/1-0-"/2
    (server 0.3.0) lib/mix/tasks/package.ex:97: Mix.Tasks.Package.run/1
    (mix 1.15.5) lib/mix/task.ex:447: anonymous fn/3 in Mix.Task.run_task/5
    (mix 1.15.5) lib/mix/cli.ex:92: Mix.CLI.run_task/2
    c:/Program Files/Elixir/bin/mix:2: (file)

C:\Projects\lexical (main -> origin)
@scohen
Copy link
Collaborator

scohen commented Sep 17, 2023

I don't think lexical will work on windows (without WSL) even if mix package works. We rely on several bash scripts to start the server and project node.
We will need to port these scripts to whatever scripting language windows uses now to make it work.

https://github.com/lexical-lsp/lexical/blob/main/bin/start_lexical.sh
https://github.com/lexical-lsp/lexical/blob/main/apps/remote_control/priv/port_wrapper.sh

@CharlesOkwuagwu
Copy link
Author

We will need to port these scripts to whatever scripting language Windows uses now to make it work.

I'm not too good with bash scripts, but Windows .bat files can achieve the same or equivalent.

once we have an outline of what the code is trying to achieve.

@scohen
Copy link
Collaborator

scohen commented Sep 18, 2023

start_lexical.sh merely looks for installed version managers like asdf and rtx (I believe windows has chocolatey) and finds out what the path to the elixir executable is. Then it runs that program with the given arguments. It's pretty simple.

port_wrapper.sh is a little more complex and ensures that a process opened up via a port exits when the process that started it exits.

@scohen
Copy link
Collaborator

scohen commented Oct 2, 2023

I'm closing this issue, #340 is the tracking issue for windows support.

@scohen scohen closed this as completed Oct 2, 2023
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

2 participants