Repository: pypa/hatch

Issue:
'hatch env show' does not list dependencies from extra-dependencies
I've got this in pyproject.toml:

```toml
[tool.hatch.envs.lint]
detached = true
dependencies = [
    "black",
    "flake8",
]

[tool.hatch.envs.lint.scripts]
lint = [
     "flake8 --ignore=E501,E402,E231",
     "black --check .",
     "bash -c 'shellcheck workflow-support/*.sh'",
]

[tool.hatch.envs.lint-action]
template = "lint"
extra-dependencies = [
    "lintly23",
    "markupsafe==2.0.1",
]

[tool.hatch.envs.lint-action.scripts]
lint = [
    "bash -c 'flake8 --ignore=E501,E402,E231 | lintly --format=flake8 --no-request-changes'",
    "bash -c 'black --check . 2>&1 >/dev/null | lintly --format=black --no-request-changes'",
    "bash -c 'shellcheck workflow-support/*.sh'",
]
```

But `hatch env show` reports this:

```
                    Standalone                    
┏━━━━━━━━━━━━━┳━━━━━━━━━┳━━━━━━━━━━━━━━┳━━━━━━━━━┓
┃ Name        ┃ Type    ┃ Dependencies ┃ Scripts ┃
┡━━━━━━━━━━━━━╇━━━━━━━━━╇━━━━━━━━━━━━━━╇━━━━━━━━━┩
│ default     │ virtual │              │         │
├─────────────┼─────────┼──────────────┼─────────┤
│ lint        │ virtual │ black        │ lint    │
│             │         │ flake8       │         │
├─────────────┼─────────┼──────────────┼─────────┤
│ lint-action │ virtual │ black        │ lint    │
│             │         │ flake8       │         │
└─────────────┴─────────┴──────────────┴─────────┘
```

The inherited dependencies from `lint` to `lint-action` are correctly displayed, but the additional dependencies in `lint-action` are not. They *are* correctly installed into the lint-action enviroment.

Comments:

Patch:
diff --git a/docs/history.md b/docs/history.md
index b429887a..8c6874b5 100644
--- a/docs/history.md
+++ b/docs/history.md
@@ -16,6 +16,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
 - Add `name` override for environments to allow for regular expression matching
 - Add support for Almquist (`ash`) shells
 
+***Fixed:***
+
+- Acknowledge `extra-dependencies` for the `env show` command
+
 ### [1.3.1](https://github.com/pypa/hatch/releases/tag/hatch-v1.3.1) - 2022-07-11 ### {: #hatch-v1.3.1 }
 
 ***Fixed:***
diff --git a/src/hatch/cli/env/show.py b/src/hatch/cli/env/show.py
index 546e13e9..4c146b5a 100644
--- a/src/hatch/cli/env/show.py
+++ b/src/hatch/cli/env/show.py
@@ -23,8 +23,13 @@ def show(app, envs, force_ascii, as_json):
         if config.get('features'):
             columns['Features'][i] = '\n'.join(sorted({normalize_project_name(f) for f in config['features']}))
 
+        dependencies = []
         if config.get('dependencies'):
-            columns['Dependencies'][i] = '\n'.join(get_normalized_dependencies(config['dependencies']))
+            dependencies.extend(config['dependencies'])
+        if config.get('extra-dependencies'):
+            dependencies.extend(config['extra-dependencies'])
+        if dependencies:
+            columns['Dependencies'][i] = '\n'.join(get_normalized_dependencies(dependencies))
 
         if config.get('env-vars'):
             columns['Environment variables'][i] = '\n'.join(


Test patch:
diff --git a/tests/cli/env/test_show.py b/tests/cli/env/test_show.py
index 3d13e066..82172615 100644
--- a/tests/cli/env/test_show.py
+++ b/tests/cli/env/test_show.py
@@ -318,7 +318,8 @@ def test_optional_columns(hatch, helpers, temp_dir, config_file):
     data_path = temp_dir / 'data'
     data_path.mkdir()
 
-    dependencies = ['python___dateutil', 'bAr.Baz[TLS]   >=1.2RC5', 'Foo;python_version<"3.8"']
+    dependencies = ['python___dateutil', 'bAr.Baz[TLS]   >=1.2RC5']
+    extra_dependencies = ['Foo;python_version<"3.8"']
     env_vars = {'FOO': '1', 'BAR': '2'}
     description = """
 Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna \
@@ -334,13 +335,21 @@ occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim
             'matrix': [{'version': ['9000', '3.14'], 'py': ['39', '310']}],
             'description': description,
             'dependencies': dependencies,
+            'extra-dependencies': extra_dependencies,
             'env-vars': env_vars,
             'features': ['Foo...Bar', 'Baz', 'baZ'],
             'scripts': {'test': 'pytest', 'build': 'python -m build', '_foo': 'test'},
         },
     )
     helpers.update_project_environment(
-        project, 'foo', {'description': description, 'dependencies': dependencies, 'env-vars': env_vars}
+        project,
+        'foo',
+        {
+            'description': description,
+            'dependencies': dependencies,
+            'extra-dependencies': extra_dependencies,
+            'env-vars': env_vars,
+        },
     )
 
     with project_path.as_cwd():