Skip to content

build: make langgraph-cli[inmem] an optional dependency - #354

Open
weed33834 wants to merge 2 commits into
NVIDIA:mainfrom
weed33834:fix/langgraph-cli-optional-343
Open

build: make langgraph-cli[inmem] an optional dependency#354
weed33834 wants to merge 2 commits into
NVIDIA:mainfrom
weed33834:fix/langgraph-cli-optional-343

Conversation

@weed33834

Copy link
Copy Markdown

Summary

Fixes #343.

langgraph-cli[inmem] was declared as a hard runtime dependency in [project.dependencies], but nothing under src/skillspector/ imports it. Its only consumers in the repo are the make langgraph-dev target and langgraph.json — both developer tooling for LangGraph Studio.

Because it is a runtime dependency, every install of the skillspector CLI — including ones that never run the dev server — pulls in the full LangGraph API server stack:

  • langgraph-api + langgraph-runtime-inmem
  • grpcio, grpcio-tools, grpcio-health-checking
  • opentelemetry-api, opentelemetry-sdk, opentelemetry-exporter-otlp-proto-http, opentelemetry-exporter-prometheus
  • uvicorn, starlette, sse-starlette, structlog, cloudpickle, croniter, watchfiles

Changes

  1. pyproject.toml: Move langgraph-cli[inmem]>=0.4.14 from [project.dependencies] to a new [project.optional-dependencies] langgraph-dev extra.
  2. pyproject.toml: Add skillspector[langgraph-dev] to the existing dev extra so make install-dev (uv sync --all-extras / pip install -e ".[dev]") is unaffected.
  3. Makefile: The langgraph-dev target now checks for the langgraph command and prints a helpful install hint (pip install 'skillspector[langgraph-dev]') if it is missing.

Verification

  • langgraph (the graph library) remains a hard dependency — src/skillspector/graph.py imports from langgraph.graph import END, START, StateGraph.
  • Confirmed no src/skillspector/ code imports langgraph_cli or langgraph.cli.
  • pyproject.toml parses correctly (validated with tomllib).
  • CI workflows and Dockerfile do not reference langgraph-cli directly.
  • make install-dev still installs langgraph-cli via the devlanggraph-dev extra chain.

期待多多合作,互相帮助。

Comment thread pyproject.toml

@rng1995 rng1995 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Automated SkillSpector Review]

Requesting changes. Moving the dependency to an extra is sound, and the Make target remains valid, but the committed lockfile was not regenerated. Exact-head uv lock --check reports that uv.lock needs an update; the release workflow uses uv sync --locked --extra dev, so the current patch breaks that installation path. Commit the updated lock and verify plain versus dev installs.

@weed33834
weed33834 force-pushed the fix/langgraph-cli-optional-343 branch from fb1fcfd to 5315b84 Compare August 11, 2026 11:42

@rng1995 rng1995 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Automated SkillSpector Re-review]

Requesting changes on the fix commit, not the original dependency split. The original stale-lock blocker is addressed and its thread is resolved: uv lock --check, runtime-only uv sync --locked --no-dev, and dev uv sync --locked --extra dev all pass as intended. However, the submitted lock regeneration upgrades 60 existing packages and adds 4 unrelated transitive packages. Reproducing a normal uv lock from adf9cb yields an 18-line update (11 additions, 7 deletions) with zero package-version changes. Please replace the full refresh with the minimal lock update, then rerun the locked-install checks.

Comment thread uv.lock Outdated
@@ -10,25 +10,25 @@ resolution-markers = [

[[package]]
name = "annotated-doc"
version = "0.0.4"
version = "0.0.5"

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Blocking: The lockfile was regenerated as a full upgrade rather than the scoped metadata update this PR needs. Compared with the existing lock, this changes 2,044 lines, upgrades 60 packages (including openai, LangChain, boto3/botocore, cryptography, and dev tooling), and adds 4 transitive packages. Starting from parent adf9cb and running plain uv lock produced only 18 changed lines and no package-version changes. Please regenerate from the committed lock without --upgrade (and without deleting it) so this PR does not silently bundle a broad dependency update.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rng1995 This has been fixed in 8af8bd7. The uv.lock now contains only a scoped 9-line change (4 insertions, 5 deletions) adding the langgraph-dev optional group metadata, not a full upgrade. pyproject.toml moves langgraph-cli into the optional langgraph-dev group, and the dev extra references it. No other packages are upgraded.

langgraph-cli[inmem] was declared as a hard runtime dependency, but
nothing under src/skillspector/ imports it. Its only consumers are the
`make langgraph-dev` target (which invokes the `langgraph` CLI) and
developers who need the LangGraph Studio server.

Move it to a new `langgraph-dev` optional dependency group and include
it in the `dev` extra so the existing `make langgraph-dev` workflow
continues to work unchanged. Runtime-only installs (`uv sync --locked
--no-dev`) no longer pull in langgraph-cli or its transitive deps.

The uv.lock is updated with a scoped metadata change (no package
upgrades) so `uv lock --check` passes on the exact head.

Signed-off-by: badhope <weed33834@users.noreply.github.com>
@weed33834
weed33834 force-pushed the fix/langgraph-cli-optional-343 branch from 5315b84 to 8af8bd7 Compare August 12, 2026 18:50
weed33834 added a commit to weed33834/SkillSpector that referenced this pull request Aug 13, 2026
@weed33834
weed33834 force-pushed the fix/langgraph-cli-optional-343 branch from d00e703 to 2b4ac3e Compare August 13, 2026 08:23
@weed33834

Copy link
Copy Markdown
Author

Hi @rng1995 and maintainers — the DCO issue is now fixed. The branch was rewritten so all commits in this PR carry a proper Signed-off-by line (the unsigned touch commit was dropped, and the merge commit with upstream main 2.9.4 is signed too). The PR head is in sync with main (2.9.4) with no conflicts.

The only remaining blocker is that CI runs on this fork PR require maintainer approval (currently action_required). Could you approve the workflow run so DCO + lint + tests can execute?

@rng1995 if possible, could you re-review the latest head (2b4ac3e)? The previous CHANGES_REQUESTED was against an older commit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Can langgraph-cli[inmem] be an optional dependency?

2 participants