Repository: pypa/pipenv

Issue:
Pipenv 2018.10.9 doesn't lock editable git package dependencies
### Issue description

When locking a Pipfile containing editable VCS dependencies, the sub dependencies are no longer resolved in the Pipfile.lock, as in previous versions and noted in the documentation, breaking reproducible builds.

### Expected result

VCS dependencies to be resolved as in previous versions.

### Actual result

```
[I] (yay)~/s/g/J/d/yay (master|…) $ cat Pipfile
[packages]
apache-airflow = {editable = true, git = "https://github.com/apache/incubator-airflow.git"}

[requires]
python_version = "3.7"
[I] (yay)~/s/g/J/d/yay (master|…) $ pipenv lock --verbose
Locking [dev-packages] dependencies…
Locking [packages] dependencies…
using sources: [{'url': 'https://pypi.org/simple', 'verify_ssl': True, 'name': 'pypi'}]
Using pip: -i https://pypi.org/simple

                          ROUND 1
Current constraints:
  apache-airflow from git+https://github.com/apache/incubator-airflow.git#egg=apache-airflow (from -r /var/folders/f3/djwzhf951sb9wnrclbw4jtnw0000gn/T/pipenv-o3_7ys6f-requirements/pipenv-afmnav6g-constraints.txt (line 2))

Finding the best candidates:
  found candidate -e git+https://github.com/apache/incubator-airflow.git#egg=apache-airflow (constraint was <any>)

Finding secondary dependencies:
------------------------------------------------------------
Result of round 1: stable, done

using sources: [{'url': 'https://pypi.org/simple', 'verify_ssl': True, 'name': 'pypi'}]
Using pip: -i https://pypi.org/simple

                          ROUND 1
Current constraints:
  apache-airflow from git+https://github.com/apache/incubator-airflow.git#egg=apache-airflow (from -r /var/folders/f3/djwzhf951sb9wnrclbw4jtnw0000gn/T/pipenv-f5zj5jqj-requirements/pipenv-ntxm2pio-constraints.txt (line 2))

Finding the best candidates:
  found candidate -e git+https://github.com/apache/incubator-airflow.git#egg=apache-airflow (constraint was <any>)

Finding secondary dependencies:
------------------------------------------------------------
Result of round 1: stable, done

Updated Pipfile.lock (38e37b)!
[I] (yay)~/s/g/J/d/yay (master|…) $ cat Pipfile.lock
{
    "_meta": {
        "hash": {
            "sha256": "4fe62ca4ea8f5d57635a26fba05110d9a5301d8aa69f2aebc8d1c7be6738e37b"
        },
        "pipfile-spec": 6,
        "requires": {
            "python_version": "3.7"
        },
        "sources": [
            {
                "name": "pypi",
                "url": "https://pypi.org/simple",
                "verify_ssl": true
            }
        ]
    },
    "default": {
        "apache-airflow": {
            "editable": true,
            "git": "https://github.com/apache/incubator-airflow.git",
            "ref": "cdbdcae7c0645ac2987360fced43407202716b99"
        }
    },
    "develop": {}
}
```

-------------------------------------------------------------------------------

<details><summary>$ pipenv --support</summary>

Pipenv version: `'2018.10.9'`

Pipenv location: `'/usr/local/lib/python3.7/site-packages/pipenv'`

Python location: `'/usr/local/opt/python/bin/python3.7'`

Python installations found:

  - `3.7.0`: `/Users/jacobhayes/.local/share/virtualenvs/yay-vfCSW5aP/bin/python3.7`
  - `3.7.0`: `/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/bin/python3.7`
  - `3.7.0`: `/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/bin/python3.7m`
  - `2.7.15`: `/usr/local/Cellar/python@2/2.7.15_1/Frameworks/Python.framework/Versions/2.7/bin/python2.7`
  - `2.7.10`: `/usr/bin/python`
  - `2.7.10`: `/usr/bin/pythonw`
  - `2.7.10`: `/System/Library/Frameworks/Python.framework/Versions/2.7/bin/python2.7`

PEP 508 Information:

```
{'implementation_name': 'cpython',
 'implementation_version': '3.7.0',
 'os_name': 'posix',
 'platform_machine': 'x86_64',
 'platform_python_implementation': 'CPython',
 'platform_release': '18.0.0',
 'platform_system': 'Darwin',
 'platform_version': 'Darwin Kernel Version 18.0.0: Wed Aug 22 20:13:40 PDT '
                     '2018; root:xnu-4903.201.2~1/RELEASE_X86_64',
 'python_full_version': '3.7.0',
 'python_version': '3.7',
 'sys_platform': 'darwin'}
```

System environment variables:

  - `Apple_PubSub_Socket_Render`
  - `COLORFGBG`
  - `COLORTERM`
  - `COMMAND_MODE`
  - `COPYFILE_DISABLE`
  - `EDITOR`
  - `GO111MODULE`
  - `GOPATH`
  - `HOME`
  - `HOMEBREW_GITHUB_API_TOKEN`
  - `ITERM_PROFILE`
  - `ITERM_SESSION_ID`
  - `LANG`
  - `LC_ALL`
  - `LOGNAME`
  - `PAGER`
  - `PATH`
  - `PIPENV_ACTIVE`
  - `PIP_PYTHON_PATH`
  - `PIP_SHIMS_BASE_MODULE`
  - `PWD`
  - `PYTHONDONTWRITEBYTECODE`
  - `SECURITYSESSIONID`
  - `SHELL`
  - `SHLVL`
  - `SSH_AUTH_SOCK`
  - `TERM`
  - `TERM_PROGRAM`
  - `TERM_PROGRAM_VERSION`
  - `TERM_SESSION_ID`
  - `TMPDIR`
  - `TMUX`
  - `TMUX_PANE`
  - `TMUX_PLUGIN_MANAGER_PATH`
  - `USER`
  - `VIRTUAL_ENV`
  - `XPC_FLAGS`
  - `XPC_SERVICE_NAME`
  - `_OLD_FISH_PROMPT_OVERRIDE`
  - `_OLD_VIRTUAL_PATH`
  - `__CF_USER_TEXT_ENCODING`
  - `__pipenv_fish_initial_pwd`

Pipenv–specific environment variables:

 - `PIPENV_ACTIVE`: `1`

Debug–specific environment variables:

  - `PATH`: `/Users/jacobhayes/.local/share/virtualenvs/yay-vfCSW5aP/bin:/Users/jacobhayes/bin:/Users/jacobhayes/bin:/Users/jacobhayes/bin:/usr/local/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/bin:/Users/jacobhayes/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin`
  - `SHELL`: `/usr/local/bin/fish`
  - `EDITOR`: `nvim`
  - `LANG`: `en_US.UTF-8`
  - `PWD`: `/Users/jacobhayes/src/github.com/JacobHayes/dockerfiles/yay`
  - `VIRTUAL_ENV`: `/Users/jacobhayes/.local/share/virtualenvs/yay-vfCSW5aP`


---------------------------

Contents of `Pipfile` ('/Users/jacobhayes/src/github.com/JacobHayes/dockerfiles/yay/Pipfile'):

```toml
[packages]
apache-airflow = {editable = true, git = "https://github.com/apache/incubator-airflow.git"}

[requires]
python_version = "3.7"

```


Contents of `Pipfile.lock` ('/Users/jacobhayes/src/github.com/JacobHayes/dockerfiles/yay/Pipfile.lock'):

```json
{
    "_meta": {
        "hash": {
            "sha256": "4fe62ca4ea8f5d57635a26fba05110d9a5301d8aa69f2aebc8d1c7be6738e37b"
        },
        "pipfile-spec": 6,
        "requires": {
            "python_version": "3.7"
        },
        "sources": [
            {
                "name": "pypi",
                "url": "https://pypi.org/simple",
                "verify_ssl": true
            }
        ]
    },
    "default": {
        "apache-airflow": {
            "editable": true,
            "git": "https://github.com/apache/incubator-airflow.git",
            "ref": "cdbdcae7c0645ac2987360fced43407202716b99"
        }
    },
    "develop": {}
}

```
</details>



Discussion:
specifically in airflow's case there is actually an error when resolving, I have some error handling around this but I think it is just concealing the issue now

Resolving patch:
diff --git a/pipenv/patched/piptools/repositories/pypi.py b/pipenv/patched/piptools/repositories/pypi.py
--- a/pipenv/patched/piptools/repositories/pypi.py
+++ b/pipenv/patched/piptools/repositories/pypi.py
@@ -241,6 +241,8 @@ def resolve_reqs(self, download_dir, ireq, wheel_cache, setup_requires={}, dist=
         results = None
         setup_requires = {}
         dist = None
+        ireq.isolated = False
+        ireq._wheel_cache = wheel_cache
         try:
             from pipenv.patched.notpip._internal.operations.prepare import RequirementPreparer
         except ImportError:
@@ -292,10 +294,7 @@ def resolve_reqs(self, download_dir, ireq, wheel_cache, setup_requires={}, dist=
                 # reqset.add_requirement(ireq)
                 resolver = PipResolver(**resolver_kwargs)
                 resolver.require_hashes = False
-                try:
-                    results = resolver._resolve_one(reqset, ireq)
-                except InstallationError:
-                    pass
+                results = resolver._resolve_one(reqset, ireq)
                 reqset.cleanup_files()
 
         if ireq.editable and (ireq.source_dir and os.path.exists(ireq.source_dir)):


Test patch: