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

0.8.6 failing to run on Windows #801

Closed
bdukes opened this issue Mar 2, 2023 · 18 comments · Fixed by #799
Closed

0.8.6 failing to run on Windows #801

bdukes opened this issue Mar 2, 2023 · 18 comments · Fixed by #799

Comments

@bdukes
Copy link

bdukes commented Mar 2, 2023


Note from maintainer:

Note, this only affects folks using the npm installer on Windows. If your team doesn't use Windows, or if you use Windows but install via elm-tooling or by manually downloading binaries, then you can use 0.8.6 as normal.

If you are installing via npm and using Windows, then you'll need one of the following workarounds until the next (0.8.7) release is published:

  • continue using elm-format 0.8.5
  • set your elm-format version to 0.8.6-windows (this version still works on any platform, but will use the fixed binaries on when Windows)

Original issue follows:


We upgraded to 0.8.6 via elm-tooling (but have also used the release asset directly), and we're getting error codes without any output whenever we try to run elm-format (or elm-format --version or elm-format --help). We're using a Windows environment.

Happy to do any troubleshooting if there's something I can do. Thanks!

@lydell
Copy link
Contributor

lydell commented Mar 2, 2023

Steps to reproduce and system information always helps!

@bdukes
Copy link
Author

bdukes commented Mar 2, 2023

Specs

Edition: Windows 11 Enterprise
Version: 22H2
OS build: 22621.1265
Experience: Windows Feature Experience Pack 1000.22638.1000.0

Processor: 12th Gen Intel(R) Core(TM) i7-1260P 2.10 GHz
Installed RAM: 32.0 GB (31.6 GB usable)
System type: 64-bit operating system, x64-based processor

Steps to Reproduce

  1. Download https://github.com/avh4/elm-format/releases/download/0.8.6/elm-format-0.8.6-win-x64.zip
  2. Unzip elm-format.exe
  3. Run elm.format.exe --help from Powershell

Results

Stdout: none
Stderr: none
Exit Code: -1073741515

@CreggHancock
Copy link

I am also experiencing this issue on Windows 10

@lydell
Copy link
Contributor

lydell commented Mar 2, 2023

Booted my Windows machine, and it happens to me as well.

Here are the commands I used in case it helps @avh4:

curl.exe -fLo elm-format.zip https://github.com/avh4/elm-format/releases/download/0.8.6/elm-format-0.8.6-win-x64.zip
tar xf elm-format.zip
.\elm-format.exe
$lastExitCode

Observations:

  • The elm-tooling tests (which run elm-format --help) passed in GitHub Actions, but not when I run the elm-tooling tests locally on my Windows machine. (The binary fails just like above then too.)

  • elm-format.exe 0.8.6 is ~4 times bigger than 0.8.5:

❯ file elm-format-0.8.5/elm-format.exe elm-format-0.8.6/elm-format.exe
elm-format-0.8.5/elm-format.exe: PE32+ executable (console) x86-64 (stripped to external PDB), for MS Windows
elm-format-0.8.6/elm-format.exe: PE32+ executable (console) x86-64 (stripped to external PDB), for MS Windows

❯ ls -lah elm-format-0.8.5/elm-format.exe elm-format-0.8.6/elm-format.exe
-rw-r--r--@ 1 simon  staff   7.0M Feb  9  2021 elm-format-0.8.5/elm-format.exe
-rw-r--r--@ 1 simon  staff    31M Mar  1 20:51 elm-format-0.8.6/elm-format.exe

@avh4
Copy link
Owner

avh4 commented Mar 2, 2023

Hmm, "Exit code: -1073741515" apparently means an issue with .DLL linking https://stackoverflow.com/questions/38246420/what-does-exitcode-1073741502-mean

I've just been relying on ghc (the Haskell compiler) for Windows to do the right thing, and I don't know much about Windows dynamic linking myself.

Does anyone know the right Windows commands to check what dynamic libraries the binary thinks it needs, and compare the output for the 0.8.5 binary vs the 0.8.6 binary?

@avh4
Copy link
Owner

avh4 commented Mar 2, 2023

I tried to turn on more static binary stuff. Can someone with the issue try this binary and see if it's any better? https://github.com/avh4/elm-format/suites/11319096083/artifacts/581295507

@bdukes
Copy link
Author

bdukes commented Mar 2, 2023

That does resolve the issue for me 👍🏻

@lydell
Copy link
Contributor

lydell commented Mar 2, 2023

That one executes on my Windows machine as well!

@avh4 avh4 self-assigned this Mar 2, 2023
@avh4 avh4 added this to the 0.8.6 milestone Mar 2, 2023
@avh4 avh4 pinned this issue Mar 2, 2023
@lydell
Copy link
Contributor

lydell commented Mar 3, 2023

@avh4 I recommend marking 0.8.6 as deprecated and re-releasing as 0.8.7.

@avh4 avh4 mentioned this issue Mar 8, 2023
15 tasks
@avh4
Copy link
Owner

avh4 commented Mar 8, 2023

Thanks, I'm a bit hesitant to make this fix a full release, since that will make extra work for the nixpkgs and homebrew folks who will have to do a useless release.

I've published elm-format@0.8.6-windows to npm, and put the new binaries here https://github.com/avh4/elm-format/releases/tag/0.8.6 (and will make a new elm-tooling PR to have "0.8.6" use the new binaries for Windows).

@lydell
Copy link
Contributor

lydell commented Mar 8, 2023

Ok, I see what you mean, but it feels like Windows npm users are going to suffer from this for a long time. npm install elm-format is going to be broken on Windows, right?

@avh4
Copy link
Owner

avh4 commented Mar 8, 2023

I was debating about setting the npm latest tag to 0.8.6-windows. If I do, then npm install elm-format would work fine. The downside is that it might confuse other people if they get a release version that says "windows", even though it will still work for all platforms.

Also, I'm planning on 0.8.7 (or maybe called 0.10.0) next month anyway.

@lydell
Copy link
Contributor

lydell commented Mar 8, 2023

  • You could also release 0.8.6-1 like the elm package. A downside is that semver wise, 0.8.6 comes after 0.8.6-1 so that’s going to be a bit confusing too, just like it is for node-test-runner.
  • If you’re gonna go with the 0.8.6-windows solution, I recommend adding something about it in the readme at least.
  • Nice to hear that a new release is planned anyway! Then this might only be a problem for half a year or so.
  • Curious: Any reason for skipping 0.9.0?

@avh4 avh4 closed this as completed in #799 Mar 10, 2023
@avh4 avh4 reopened this Mar 10, 2023
@avh4
Copy link
Owner

avh4 commented Mar 10, 2023

Reopening. (not sure why github auto closed it)

@avh4
Copy link
Owner

avh4 commented Mar 10, 2023

I think my plan for the moment is to see if I can get the planned 0.8.7 ready in the next week, and then just mark 0.8.6 deprecated once that's released. 🤔

Curious: Any reason for skipping 0.9.0?

I've been saving odd-numbered versions like that for "experimental" releases, meaning they have features or formatting decisions that may or may not be reverted in the next stable release. I guess it's been a while (2017) since I've had any experimental features, but there are a few coming up soon.

@avh4
Copy link
Owner

avh4 commented Apr 13, 2023

elm-format 0.8.7 is now released, which should fix the problem. I've also just deprecated the 0.8.6 npm package with a message recommended to upgrade to 0.8.7. Version 0.8.6-windows can still be used if you really need 0.8.6 for some reason. It's also safe to use 0.8.6 despite the deprecation if your dev environment doesn't need to support Windows.

Please open a new issue if there are problems with 0.8.7.

Thanks!

@avh4 avh4 closed this as completed Apr 13, 2023
@lydell
Copy link
Contributor

lydell commented Apr 13, 2023

elm-format 0.8.7 is not released

is now released ;)

@bdukes
Copy link
Author

bdukes commented Apr 13, 2023

We're using 0.8.7 on Windows without issue, thanks all!

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

Successfully merging a pull request may close this issue.

4 participants