build: make langgraph-cli[inmem] an optional dependency - #354
Conversation
| "mcp>=1.2.0", | ||
| ] | ||
| langgraph-dev = [ | ||
| "langgraph-cli[inmem]>=0.4.14", |
There was a problem hiding this comment.
Blocking: this dependency-graph change does not update uv.lock. On the exact head, uv lock --check resolves successfully and then reports that the lockfile needs to be updated. The release workflow uses uv sync --locked --extra dev, so the committed state cannot pass that install step. Regenerate and commit uv.lock, then verify a plain install omits langgraph-cli while the dev extra retains it.
rng1995
left a comment
There was a problem hiding this comment.
[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.
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 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 (grpcio, opentelemetry-*, uvicorn, starlette, sse-starlette, structlog, cloudpickle, croniter, watchfiles, ...). Move it to a new `langgraph-dev` optional extra so a plain `pip install skillspector` stays lightweight. The `dev` extra pulls it in transitively via `skillspector[langgraph-dev]` so `make install-dev` is unaffected. The `langgraph-dev` Makefile target now prints a helpful install hint if the `langgraph` command is missing. Fixes NVIDIA#343
fb1fcfd to
5315b84
Compare
Summary
Fixes #343.
langgraph-cli[inmem]was declared as a hard runtime dependency in[project.dependencies], but nothing undersrc/skillspector/imports it. Its only consumers in the repo are themake langgraph-devtarget andlanggraph.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-inmemgrpcio,grpcio-tools,grpcio-health-checkingopentelemetry-api,opentelemetry-sdk,opentelemetry-exporter-otlp-proto-http,opentelemetry-exporter-prometheusuvicorn,starlette,sse-starlette,structlog,cloudpickle,croniter,watchfilesChanges
langgraph-cli[inmem]>=0.4.14from[project.dependencies]to a new[project.optional-dependencies] langgraph-devextra.skillspector[langgraph-dev]to the existingdevextra somake install-dev(uv sync --all-extras/pip install -e ".[dev]") is unaffected.langgraph-devtarget now checks for thelanggraphcommand 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.pyimportsfrom langgraph.graph import END, START, StateGraph.src/skillspector/code importslanggraph_cliorlanggraph.cli.pyproject.tomlparses correctly (validated withtomllib).langgraph-clidirectly.make install-devstill installs langgraph-cli via thedev→langgraph-devextra chain.期待多多合作,互相帮助。