-
Notifications
You must be signed in to change notification settings - Fork 691
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
cabal init doesn't autodetect author name and maintainer email #8255
Comments
It should? Previously it used git, darcs and some weird env flags to try to guess the name/email, now it only uses git. cabal/cabal-install/src/Distribution/Client/Init/NonInteractive/Heuristics.hs Lines 171 to 186 in 0a2e68c
|
Calling those functions in the repl correctly shows my info. Weird! Maybe that information doesn't actually get used as default?
|
|
Also it'd be nice to display |
…askell#8255) Name and email are fetched from git config in the non-interactive init already, and we plug that utility into the interactive one in this commit. Testing becomes clunkier: the list of inputs have to hold an additional string that will be used as the return value of `Interactive.readProcessWithExitCode`, and here is why. Recall that this method is used to call `git config` to perform autodetection. In the real scenario (the `IO` instance of `Interactive`), it actually calls out to `git`. In the testing scenario (the `PurePrompt` instance of `Interactive`), the method simply returns the next element of the list of pre-defined inputs. So, the list of inputs to every relevant test has to be adjusted.
…askell#8255) Name and email are fetched from git config in the non-interactive init already, and we plug that utility into the interactive one in this commit. Testing becomes clunkier: the list of inputs have to hold an additional string that will be used as the return value of `Interactive.readProcessWithExitCode`, and here is why. Recall that this method is used to call `git config` to perform autodetection. In the real scenario (the `IO` instance of `Interactive`), it actually calls out to `git`. In the testing scenario (the `PurePrompt` instance of `Interactive`), the method simply returns the next element of the list of pre-defined inputs. So, the list of inputs to every relevant test has to be adjusted.
* cabal init -i should autodetect author name and maintainer email (fix #8255) Name and email are fetched from git config in the non-interactive init already, and we plug that utility into the interactive one in this commit. Testing becomes clunkier: the list of inputs have to hold an additional string that will be used as the return value of `Interactive.readProcessWithExitCode`, and here is why. Recall that this method is used to call `git config` to perform autodetection. In the real scenario (the `IO` instance of `Interactive`), it actually calls out to `git`. In the testing scenario (the `PurePrompt` instance of `Interactive`), the method simply returns the next element of the list of pre-defined inputs. So, the list of inputs to every relevant test has to be adjusted. * Add test checking that username/email can be autodetected
* cabal init -i should autodetect author name and maintainer email (fix #8255) Name and email are fetched from git config in the non-interactive init already, and we plug that utility into the interactive one in this commit. Testing becomes clunkier: the list of inputs have to hold an additional string that will be used as the return value of `Interactive.readProcessWithExitCode`, and here is why. Recall that this method is used to call `git config` to perform autodetection. In the real scenario (the `IO` instance of `Interactive`), it actually calls out to `git`. In the testing scenario (the `PurePrompt` instance of `Interactive`), the method simply returns the next element of the list of pre-defined inputs. So, the list of inputs to every relevant test has to be adjusted. * Add test checking that username/email can be autodetected (cherry picked from commit 1b8bf8c)
* cabal init -i should autodetect author name and maintainer email (fix #8255) Name and email are fetched from git config in the non-interactive init already, and we plug that utility into the interactive one in this commit. Testing becomes clunkier: the list of inputs have to hold an additional string that will be used as the return value of `Interactive.readProcessWithExitCode`, and here is why. Recall that this method is used to call `git config` to perform autodetection. In the real scenario (the `IO` instance of `Interactive`), it actually calls out to `git`. In the testing scenario (the `PurePrompt` instance of `Interactive`), the method simply returns the next element of the list of pre-defined inputs. So, the list of inputs to every relevant test has to be adjusted. * Add test checking that username/email can be autodetected (cherry picked from commit 1b8bf8c)
Describe the bug
cabal init doesn't autodetect author name and maintainer email. the old init implementation did, and i found it pretty useful
To Reproduce
Steps to reproduce the behavior:
Expected behavior
A clear and concise description of what you expected to happen.
(detected from git iirc)
System information
Additional context
Add any other context about the problem here.
cc @ptkato @emilypi
The text was updated successfully, but these errors were encountered: