avh4 / elm-upgrade

Upgrade Elm projects

Home Page:https://www.npmjs.com/package/elm-upgrade

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

elm-upgrade hangs and doesn't continue

andys8 opened this issue · comments

commented
  1. git clone https://github.com/jhrcek/graph-editor
  2. cd graph-editor
  3. elm-upgrade or npx elm-upgrade
elm-upgrade
INFO: Found elm at /home/andreas/.nix-profile/bin/elm
INFO: Found elm 0.19.1
INFO: Found elm-format at /home/andreas/.nix-profile/bin/elm-format
INFO: Found elm-format 0.8.3

***
*** ./elm.json already exists.
*** It looks like this project has already been upgraded to Elm 0.19.
*** Would you like me to upgrade your project's dependencies?
***

[Y/n]: Y

INFO: Updating elm-version to 0.19.1
INFO: Installing latest version of elm/browser
Here is my plan:

  Add:
    elm/browser    1.0.2

Would you like me to update your elm.json accordingly? [Y/n]:

Can't press a button or continue. I hope this issue is reproducible.

System

Tested in alacritty and st terminal
Tested with npx and with npm install -g
elm-upgrade 0.19.8

 OS: Manjaro 20.0 Lysia
 Kernel: x86_64 Linux 5.4.35-1-MANJARO
 Shell: fish 3.1.1

+1 experiencing exact same issue on PopOS 20.04/bash:

$ npx elm-upgrade@latest
npx: installed 57 in 1.396s
INFO: Found elm at node_modules/.bin/elm
INFO: Found elm 0.19.1
INFO: Found elm-format at /home/mo/.nvm/versions/node/v14.4.0/bin/elm-format
INFO: Found elm-format 0.8.3

***
*** ./elm.json already exists.
*** It looks like this project has already been upgraded to Elm 0.19.
*** Would you like me to upgrade your project's dependencies?
***

[Y/n]: y

INFO: Installing latest version of icidasset/elm-material-icons
Here is my plan:
  
  Add:
    ianmackenzie/elm-interval          2.0.0
    ianmackenzie/elm-units             2.6.0
    ianmackenzie/elm-units-interval    1.1.0
    icidasset/elm-material-icons       4.0.0

Would you like me to update your elm.json accordingly? [Y/n]: 

(btw. in the first question, Y is capital but it defaults to n)

huh, that prompt "Would you like me to update your elm.json accordingly? [Y/n]: " is coming from elm itself, which elm-upgrade is calling out to. I wonder if somehow the console streams aren't getting connected correctly when it runs elm? Or maybe the call to elm is succeeding, but then it's hanging afterwards for some reason?

commented

Same problem here, on MacOS. Completely locks up my terminal, not even Ctrl+C works

just hit this myself today with a 0.19.1 project on a x86_64 linux environment:

  • interpreter: GNU bash, version 5.1.8(1)-release (x86_64-pc-linux-gnu)
  • terminal: kitty 0.23.1

does anyone have any ideas how I might go about debugging this one?

Possible debugging ideas (no particular order):

  • confirm whether or not it happens in other shells (sh, zsh)
  • confirm whether or not it happens in other terminals (direct console, tmux, iTerm, xterm, alacritty, etc)
  • confirm whether or not it happens in a shell with a clean environment (disable .profile, .bashrc, etc)
  • maybe there's a way to let it hang and then kill it from another terminal and run it in some way that nodejs will print out a stack trace when it's killed?

I guess a workaround for folks hitting this would be to mount your project into a node docker container to run the upgrade, and then throw the container away once you're done?

Still having this issue. :/