ezyang / ghstack

Submit stacked diffs to GitHub on the command line
MIT License
651 stars 54 forks source link

Make locally-built ghstack easier to use #45

Open samestep opened 3 years ago

samestep commented 3 years ago

After the migration to Poetry (#32), it's a bit more difficult to use ghstack (e.g. for experimentation, to check or validate behaviors) while locally developing it. The solution given in the README is to use poetry shell, but that is a bit unergonomic because it requires one to cd into their clone of ghstack, run poetry shell, then cd out again.

One alternative could be to put a shell script like this on your PATH (assuming your clone of ghstack is in ~/github/ezyang/ghstack):

#!/usr/bin/env bash
$(cd ~/github/ezyang/ghstack && poetry run which ghstack) "$@"

The downside of this is of course that it has a hardcoded path. Maybe it would be worth it to add a Makefile to this repo such that make install automatically puts such a file on the PATH, using the actual path to the repo clone for the cd subshell command.

ezyang commented 3 years ago

I think this poetry upstream bug is relevant https://github.com/python-poetry/poetry/issues/34