Skip to content

Conversation

@doorgan
Copy link
Collaborator

@doorgan doorgan commented Nov 18, 2025

Adds support for Windows
Closes #89
Fixes #60

Also adds a just start-tcp task to start a plain release in TCP mode for development because expert builds burrito releases SO SLOW on my windows machine that it spent more time waiting for the build than actually working on the relevant changes

One note here is that this implementation uses the user's globally installed elixir on Windows. I don't know if there's any version manager like mise/asdf/nix on windows, if there is we'll need to get the PATH for the project folder like we do for Unix

Another note is that for reasons I don't yet understand windows is way slower than unix even on my beefy machine, so I had to increase the timeouts for a few tests. I was also seeing a few timing issues due to this that I hope were reliably mitigated.

@doorgan

This comment was marked as outdated.

@doorgan

This comment was marked as resolved.

@doorgan doorgan force-pushed the doorgan/windows-support branch 5 times, most recently from 43c27ad to c938c4a Compare November 20, 2025 10:46
@doorgan
Copy link
Collaborator Author

doorgan commented Nov 21, 2025

There's a few tests failing on windows that I need to fix but this puppy can run
image

@doorgan doorgan marked this pull request as ready for review November 21, 2025 21:34
Comment on lines -168 to -210
defp app_globs do
app_globs = Enum.map(@allowed_apps, fn app_name -> "/**/#{app_name}*/ebin" end)
["/**/priv" | app_globs]
end

def glob_paths(_) do
entries =
for entry <- :code.get_path(),
entry_string = List.to_string(entry),
entry_string != ".",
Enum.any?(app_globs(), &PathGlob.match?(entry_string, &1, match_dot: true)) do
entry
end
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Windows was not finding the files on windows with the old code

@doorgan doorgan force-pushed the doorgan/windows-support branch 4 times, most recently from 0f11f1a to 9269f26 Compare November 26, 2025 05:08
@mhanberg
Copy link
Member

Is this ready for review?

@doorgan
Copy link
Collaborator Author

doorgan commented Nov 26, 2025

@mhanberg almost, there's a few failing tests on windows I'm fixing. I'll tag you when it is.

@doorgan doorgan force-pushed the doorgan/windows-support branch 2 times, most recently from 86651c4 to 1e93243 Compare November 27, 2025 02:49
@doorgan
Copy link
Collaborator Author

doorgan commented Nov 27, 2025

@mhanberg it's ready for review now!

@doorgan doorgan requested a review from mhanberg November 27, 2025 03:23
@lakako
Copy link

lakako commented Dec 4, 2025

mise support windows. https://mise.jdx.dev/installing-mise.html#windows-winget

@mhanberg
Copy link
Member

mhanberg commented Dec 4, 2025

@mhanberg it's ready for review now!

Sorry, got lost in the holiday jumble. The recent comment made me remember this. I'll try and review and get it running.

@mhanberg
Copy link
Member

mhanberg commented Dec 9, 2025

Sorry, still haven't gotten a chance, i have to climb under my desk and plug my desktop into the monitor 😭.

Will try and get to it soon. If someone else who runs windows wants to test this out, it would be a great boon!

@rad96
Copy link

rad96 commented Dec 11, 2025

Hi
I compiled it on my windows machine with just release-local
There was no compilation errors outside of initial changes to justfile to use my pwsh as shell and variable passing. And xz installation
How do I check if it works?

I tried to invoke it in terminal - got error (I checked, file exists)

> .\expert_windows_amd64.exe
Failed to open arguments file "C:\Users\╨Р╤А╤В╨╡╨╝\AppData\Local\.burrito\expert_erts-16.2_0.1.0\releases\0.1.0\vm.args" at "C:\Users\└ЁЄхь\zig_projects\expert\apps\expert\burrito_out": No such file or directory
Usage: erl [-version] [-sname NAME | -name NAME] [-noshell] [-noinput] [-env VAR VALUE] [-compile file ...] [-start_erl [datafile]] [-make] [-man [manopts] MANPAGE] [-x] [-emu_args] [-start_epmd BOOLEAN] [-emu_type TYPE] [-emu_flavor FLAVOR] [-args_file FILENAME] [+A THREADS] [+a SIZE] [+B[c|d|i]] [+c [BOOLEAN]] [+C MODE] [+dcg DECENTRALIZED_COUNTER_GROUPS_LIMIT] [+h HEAP_SIZE_OPTION] [+J[Pperf|Msingle] JIT_OPTION] [+M<SUBSWITCH> <ARGUMENT>] [+P MAX_PROCS] [+Q MAX_PORTS] [+r] [+rg READER_GROUPS_LIMIT] [+s<SUBSWITCH> SCHEDULER_OPTION] [+S NO_SCHEDULERS:NO_SCHEDULERS_ONLINE] [+SP PERCENTAGE_SCHEDULERS:PERCENTAGE_SCHEDULERS_ONLINE] [+T LEVEL] [+V] [+v] [+W<i|w|e>] [+z MISC_OPTION] [args ...]

I tried to pass it to zed by next construction, it was failing.

"lsp": {
    "expert": {
      "binary": {
        "path": "C:/Users/Артем/zig_projects/expert/apps/expert/burrito_out/expert_windows_amd64.exe"
      }
    }
  }
Language server expert:

initializing server expert, id 19: Server reset the connection
-- stderr --
Usage: erl [-version] [-sname NAME | -name NAME] [-noshell] [-noinput] [-env VAR VALUE] [-compile file ...] [-start_erl [datafile]] [-make] [-man [manopts] MANPAGE] [-x] [-emu_args] [-start_epmd BOOLEAN] [-emu_type TYPE] [-emu_flavor FLAVOR] [-args_file FILENAME] [+A THREADS] [+a SIZE] [+B[c|d|i]] [+c [BOOLEAN]] [+C MODE] [+dcg DECENTRALIZED_COUNTER_GROUPS_LIMIT] [+h HEAP_SIZE_OPTION] [+J[Pperf|Msingle] JIT_OPTION] [+M<SUBSWITCH> <ARGUMENT>] [+P MAX_PROCS] [+Q MAX_PORTS] [+r] [+rg READER_GROUPS_LIMIT] [+s<SUBSWITCH> SCHEDULER_OPTION] [+S NO_SCHEDULERS:NO_SCHEDULERS_ONLINE] [+SP PERCENTAGE_SCHEDULERS:PERCENTAGE_SCHEDULERS_ONLINE] [+T LEVEL] [+V] [+v] [+W<i|w|e>] [+z MISC_OPTION] [args ...]

I did not tried lexical, because, as I understand, it does not support windows - lexical-lsp/lexical#762

@mhanberg
Copy link
Member

Is your username obfuscated there are did it actually print out the weird Unicode characters?

@rad96
Copy link

rad96 commented Dec 11, 2025

@mhanberg It's Артем, Cyrillic

@doorgan doorgan force-pushed the doorgan/windows-support branch from a6d85ff to 62d353c Compare December 14, 2025 17:34
@mhanberg
Copy link
Member

Apparently windows 11 is a pita to get on a vm, still working on that.

Might have to try windows 10

@doorgan doorgan force-pushed the doorgan/windows-support branch from 367c1f8 to 12d80bb Compare December 15, 2025 16:23
@mhanberg
Copy link
Member

image we're cooking

@mhanberg
Copy link
Member

Attempting to boot with neovim, i get the following error

[ERROR][2025-12-15 10:40:54] ...lsp/handlers.lua:562 '[Project ] Failed to initialize: {:function_clause, [{IO, :chardata_to_string, [nil], [file: ~c"lib/io.ex", line: 738]}, {Path, :basename, 1, [file: ~c"lib/path.ex", line: 513]}, {XPForge.Project, :name, 1, [file: ~c"lib/forge/project.ex", line: 59]}, {XPExpert.Project.Supervisor, :name, 1, [file: ~c"lib/expert/project/supervisor.ex", line: 53]}, {XPExpert.Project.Supervisor, :start_link, 1, [file: ~c"lib/expert/project/supervisor.ex", line: 23]}, {DynamicSupervisor, :start_child, 3, [file: ~c"lib/dynamic_supervisor.ex", line: 765]}, {DynamicSupervisor, :handle_start_child, 2, [file: ~c"lib/dynamic_supervisor.ex", line: 751]}, {:gen_server, :try_handle_call, 4, [file: ~c"gen_server.erl", line: 2470]}]}'

haven't investigated more yet.

@doorgan
Copy link
Collaborator Author

doorgan commented Dec 15, 2025

From a quick glance at that error, it seems like a Project was created without a root_uri?

@mhanberg
Copy link
Member

From a quick glance at that error, it seems like a Project was created without a root_uri?

Potentially, will need to dig in more later, was just able to get my VM up and running during my lunch hour.

@doorgan doorgan force-pushed the doorgan/windows-support branch from 29bca63 to 68f178e Compare December 15, 2025 18:58
@mhanberg
Copy link
Member

Okay, scratch my previous error. I had just not noticed a typo in my neovim config cuz the default colorscheme is unreadable, lol.

Seems to be able to boot up and show me some hover docs. Completions work, but noticing some weird diagnostics
image

and i noticed that when i do go to definition for the GenLSP module, it gives me two locations, one of which is in the burrito packaged engine source code.

@mhanberg
Copy link
Member

image

Forgot the other screenshot with the definition locations

horrible "fix" but I can't reproduce this issue locally and I don't know if it's CI slowness or something else going on
@doorgan
Copy link
Collaborator Author

doorgan commented Dec 15, 2025

@mhanberg are you seeing that only in this branch or does it happen in main too?

@mhanberg
Copy link
Member

I didn't try on main cuz I assumed it wouldn't work at all.

@doorgan
Copy link
Collaborator Author

doorgan commented Dec 15, 2025

Ah no, I mean if it happens with main on a non-windows machine. I do not see the issues you mention on my machine, so I was wondering if it was something introduced here(possible, given I'm changing path manipulation in a few places), or if it's pre-existing
image
image

@mhanberg
Copy link
Member

Ah gotcha, no I haven't seen it before on main on Mac or Linux.

Copy link
Member

@mhanberg mhanberg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since everything compiles and runs, I say we merge this and then fix any issues that come up.

We'll have to further investigate the issue brought up here, can create an ticket for that.

@doorgan doorgan merged commit d0927ce into main Dec 17, 2025
37 checks passed
@doorgan doorgan deleted the doorgan/windows-support branch December 17, 2025 16:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

windows support status just release-local does not find mix.exs

4 participants