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

Don't change directories when cloning a repo #4862

Merged
merged 2 commits into from Jun 19, 2019

Conversation

Projects
None yet
2 participants
@amalloy
Copy link
Contributor

commented Jun 13, 2019

This was making it impossible to pin to a specific commit when using relative file paths as repo URLs.

Please include the following checklist in your PR:

  • Any changes that could be relevant to users have been recorded in the ChangeLog.md
  • The documentation has been updated, if necessary.

I tested this change by running stack test three times:

  1. Before I made any changes, tests pass
  2. After intentionally implementing my change incorrectly, tests fail
  3. After a correct implementation of my change, tests pass again

@amalloy amalloy force-pushed the amalloy:master branch from 701b1a2 to 867b0c4 Jun 13, 2019

@amalloy

This comment has been minimized.

Copy link
Contributor Author

commented Jun 13, 2019

I've included a Changelog update in what I think was the right place, and I believe no documentation update is necessary (already-documented behavior now works better).

@snoyberg
Copy link
Contributor

left a comment

In addition to the inline comments:

  1. I see that there's a CI failure from the style checker
  2. It may make sense to PR this against the stable branch instead of master
@@ -277,6 +277,8 @@ Bug fixes:
[#4292](https://github.com/commercialhaskell/stack/issues/4292)
* Fix for git packages to update submodules to the correct state. See
[#4314](https://github.com/commercialhaskell/stack/pull/4314)
* Fix to allow dependencies on specific versions of local git repositories. See

This comment has been minimized.

Copy link
@snoyberg

snoyberg Jun 14, 2019

Contributor

This should go in "unreleased changes" instead. It should also likely be mentioned in the pantry changelog.

-- ENABLE_VIRTUAL_TERMINAL_PROCESSING flag for native terminals. The
-- folowing hack re-enables the lost ANSI-capability.
when osIsWindows $ void $ liftIO $ hSupportsANSIWithoutEmulation stdout
runCommand ["clone", T.unpack url, dir]

This comment has been minimized.

Copy link
@snoyberg

snoyberg Jun 14, 2019

Contributor

Please add a comment that this is intentionally not run within the withWorkingDir below in order to allow relative paths to work.

@amalloy amalloy changed the base branch from master to stable Jun 15, 2019

@amalloy amalloy force-pushed the amalloy:master branch 2 times, most recently from b90cf52 to 356c662 Jun 15, 2019

@amalloy

This comment has been minimized.

Copy link
Contributor Author

commented Jun 15, 2019

The hlint failure was on unmodified code in a different file; I'm not inclined to touch that as part of this PR.

I've adjusted the target branch, and made the changes you requested, except: the pantry changelog appears to currently be empty, after a year's worth of commits to it. Do you want this to be the first change documented therein?

@snoyberg

This comment has been minimized.

Copy link
Contributor

commented Jun 16, 2019

the pantry changelog appears to currently be empty, after a year's worth of commits to it

Right, that's intended: pantry has been in development for a year, but only last week had its first release. This is the first actual change versus a released version.

Don't change directories when cloning a repo
This was making it impossible to use relative file paths as repo URLs.
@amalloy

This comment has been minimized.

Copy link
Contributor Author

commented Jun 17, 2019

Done.

@amalloy amalloy force-pushed the amalloy:master branch from 356c662 to 726497a Jun 17, 2019

@snoyberg snoyberg force-pushed the amalloy:master branch from dfdccf8 to 0e3d160 Jun 17, 2019

@snoyberg
Copy link
Contributor

left a comment

LGTM. I've merged in the changes on stable so CI will pass. This is good to merge once CI goes green.

@snoyberg snoyberg merged commit 22fe3b9 into commercialhaskell:stable Jun 19, 2019

6 of 8 checks passed

commercialhaskell.stack Build #20190617.13 failed
Details
commercialhaskell.stack (Windows stack) Windows stack failed
Details
commercialhaskell.stack (Linux nightly) Linux nightly succeeded
Details
commercialhaskell.stack (Linux pedantic) Linux pedantic succeeded
Details
commercialhaskell.stack (Linux stack-def) Linux stack-def succeeded
Details
commercialhaskell.stack (Linux stack-lts-12) Linux stack-lts-12 succeeded
Details
commercialhaskell.stack (Linux style) Linux style succeeded
Details
commercialhaskell.stack (macOS stack-def) macOS stack-def succeeded
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.