Skip to content

Inline cicada-scip into main package#236

Merged
wende merged 4 commits intomainfrom
inline-cicada-scip
Feb 7, 2026
Merged

Inline cicada-scip into main package#236
wende merged 4 commits intomainfrom
inline-cicada-scip

Conversation

@wende
Copy link
Owner

@wende wende commented Feb 7, 2026

Summary

  • Inlines cicada-scip and cicada-mcp-core workspace packages directly into cicada/languages/scip/, eliminating the monorepo split that caused PyPI installation failures
  • SCIP language support (Python, TypeScript, Go, Rust, Java, Scala, C, C++, Ruby, C#, VB, Dart) now works out of the box — no --with cicada-scip needed
  • Simplifies CI publish workflow from three packages to one, adds protobuf>=4.0.0 to main deps, bumps to v0.6.3

What changed

Area Before After
SCIP code Re-export wrappers in cicada/languages/scip/ delegating to packages/cicada-scip/ Actual source code lives in cicada/languages/scip/
Indexer Two classes (raw RawSCIPIndexer + wrapper GenericSCIPIndexer) with delegation Single merged GenericSCIPIndexer class
Installation uv tool install cicada-mcp --with cicada-scip uv tool install cicada-mcp
SCIP availability Conditional (if SCIP_AVAILABLE: guard) Always available
Packages 3 packages (cicada-mcp, cicada-mcp-core, cicada-scip) 1 package (cicada-mcp)
Tests Split across packages/cicada-scip/tests/ and tests/ All in tests/ (SCIP tests moved to tests/languages/scip/)

Files overview

  • cicada/languages/scip/{reader,converter,formatter,language_adapters}.py — replaced re-export wrappers with actual source
  • cicada/languages/scip/indexer.py — merged raw + wrapper into single class
  • cicada/languages/scip/__init__.py — direct imports, no try/except
  • cicada/languages/__init__.py — unconditional SCIP language registration
  • pyproject.toml — removed workspace config, added protobuf dep, bumped to 0.6.3
  • .github/workflows/publish-pypi.yml — removed cicada-mcp-core build/publish steps
  • .github/workflows/test-scip-languages.yml — updated paths
  • Makefile, .gitignore — updated paths
  • packages/ — deleted entirely
  • tests/languages/scip/ — 16 test files moved here from packages

Test plan

  • All 3655 tests pass (make test)
  • All SCIP imports work (from cicada.languages.scip import ...)
  • uv build produces clean package
  • uv lock resolves without workspace packages
  • Pre-commit checks pass (black, ruff, pyrefly, vulture)
  • CI passes on this branch
  • Verify pip install from built wheel works

Note

Medium Risk
Moderate risk due to a large packaging/CI refactor plus substantial new inlined SCIP indexing/conversion code paths that can affect publishing and multi-language indexing behavior.

Overview
SCIP support is now bundled directly into cicada-mcp by replacing cicada/languages/scip/* re-export shims with the full in-repo implementation (converter, reader, formatter, indexer, adapters) and generating/using checked-in scip_pb2 stubs.

CI and developer workflows are updated accordingly: GitHub Actions now generates protobufs from cicada/languages/scip/scip.proto, installs via uv sync --dev, and publishes only cicada-mcp (removing cicada-mcp-core publish/wait steps); language tests watch the new path. The language registry now registers SCIP languages unconditionally and removes the “install cicada-scip” guidance, while the packages/cicada-mcp-core workspace package is deleted and Makefile/.gitignore paths are updated to match the new layout.

Written by Cursor Bugbot for commit dbc223d. Configure here.

The cicada-scip and cicada-mcp-core workspace packages were never
published to PyPI, causing installation failures for users. This
inlines all SCIP code directly into cicada/languages/scip/, making
SCIP language support (Python, TypeScript, Go, Rust, Java, etc.)
work out of the box without extra install steps.

- Replace re-export wrappers with actual source (reader, converter,
  formatter, language_adapters)
- Merge raw + wrapper indexers into single GenericSCIPIndexer class
- Remove SCIP_AVAILABLE conditional guard (always available now)
- Move tests from packages/cicada-scip/tests/ to tests/languages/scip/
- Delete packages/ directory (cicada-scip, cicada-mcp-core, cicada-core)
- Add protobuf>=4.0.0 to main dependencies
- Update CI workflows, Makefile, .gitignore for new paths
- Simplify publish workflow (single package instead of three)
- Bump version to 0.6.3
Copy link
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Sorry @wende, your pull request is larger than the review limit of 150000 diff characters

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @wende, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request significantly refactors the project's architecture by consolidating previously separate workspace packages, 'cicada-scip' and 'cicada-mcp-core', directly into the main 'cicada-mcp' package. This change aims to resolve installation complexities, ensure out-of-the-box availability of SCIP language support, and streamline the overall development and deployment process by simplifying the package structure and CI workflows.

Highlights

  • Monorepo Consolidation: The 'cicada-scip' and 'cicada-mcp-core' workspace packages have been inlined directly into the main 'cicada-mcp' package, eliminating the previous monorepo structure and resolving PyPI installation failures.
  • Simplified SCIP Language Support: SCIP language indexing for Python, TypeScript, Go, Rust, Java, Scala, C, C++, Ruby, C#, VB, and Dart is now built-in and always available, removing the need for the '--with cicada-scip' flag during installation and conditional availability checks.
  • Streamlined CI/CD and Dependencies: The CI publish workflow has been simplified from managing three separate packages to a single 'cicada-mcp' package. Additionally, 'protobuf>=4.0.0' has been added as a direct dependency to the main package.
  • Indexer Refactor and Test Relocation: The SCIP indexer logic has been merged into a single 'GenericSCIPIndexer' class, replacing the previous raw/wrapper delegation. All SCIP-related tests have been moved from 'packages/cicada-scip/tests/' to 'tests/languages/scip/' within the main project.
Changelog
  • .gitignore
    • Updated patterns to reflect the new location of auto-generated SCIP protobuf files.
  • CHANGELOG.md
    • Added a new version entry (0.6.3) detailing the inlining of 'cicada-scip' and 'cicada-mcp-core'.
    • Noted improved installation, out-of-the-box SCIP language support, 'protobuf' dependency addition, and simplified CI.
    • Documented the removal of the 'packages/' directory and relocation of SCIP tests.
  • Makefile
    • Modified 'dev' and 'install' targets to remove '--with cicada-scip' flag.
    • Updated 'generate-scip-proto' and 'clean' targets to point to the new SCIP protobuf file locations.
  • cicada/languages/init.py
    • Removed conditional imports and registration logic for SCIP-based languages, making them unconditionally available.
    • Removed the '_get_not_supported_message' method's SCIP-specific error handling.
  • cicada/languages/scip/init.py
    • Rewritten to directly import SCIP components from within the 'cicada.languages.scip' module, removing the previous re-export mechanism and 'ImportError' handling.
  • cicada/languages/scip/converter.py
    • Completely rewritten to integrate the full SCIP conversion logic directly, replacing the previous re-export of 'cicada_scip.converter'.
    • Includes detailed implementations for symbol data, call sites, import data, and the conversion process.
  • cicada/languages/scip/formatter.py
    • Completely rewritten to include the full implementation of 'SCIPFormatter' and its language-specific subclasses, replacing the previous re-export from 'cicada_scip.formatter'.
  • cicada/languages/scip/indexer.py
    • Completely rewritten to directly implement the 'GenericSCIPIndexer' logic, including running SCIP tools, file change detection, and index conversion, removing the dependency on 'cicada_scip.indexer'.
    • Removed the '_get_raw_indexer' method.
  • cicada/languages/scip/language_adapters.py
    • Completely rewritten to directly implement language-specific adapters for SCIP conversion, replacing the previous re-export from 'cicada_scip.language_adapters'.
  • cicada/languages/scip/reader.py
    • Completely rewritten to directly implement the 'SCIPReader' functionality, replacing the previous re-export from 'cicada_scip.reader'.
  • cicada/languages/scip/scip_pb2.py
    • Rewritten to contain the generated protobuf Python code directly, replacing the previous re-export.
  • cicada/languages/scip/scip_pb2.pyi
    • Rewritten to contain the generated protobuf Python type stubs directly, replacing the previous re-export.
  • packages/cicada-mcp-core/README.md
    • Removed as part of the monorepo consolidation.
  • packages/cicada-mcp-core/pyproject.toml
    • Removed as part of the monorepo consolidation.
  • packages/cicada-mcp-core/src/cicada_mcp_core/init.py
    • Removed as part of the monorepo consolidation.
  • packages/cicada-mcp-core/src/cicada_mcp_core/base_indexer.py
    • Removed as part of the monorepo consolidation.
  • packages/cicada-mcp-core/src/cicada_mcp_core/formatter_interface.py
    • Removed as part of the monorepo consolidation.
  • packages/cicada-mcp-core/src/cicada_mcp_core/utils/init.py
    • Removed as part of the monorepo consolidation.
  • packages/cicada-mcp-core/src/cicada_mcp_core/utils/hash_utils.py
    • Removed as part of the monorepo consolidation.
  • packages/cicada-mcp-core/src/cicada_mcp_core/utils/storage.py
    • Removed as part of the monorepo consolidation.
  • packages/cicada-mcp-core/tests/conftest.py
    • Removed as part of the monorepo consolidation.
  • packages/cicada-mcp-core/tests/test_base_indexer.py
    • Removed as part of the monorepo consolidation.
  • packages/cicada-mcp-core/tests/utils/test_hash_utils.py
    • Removed as part of the monorepo consolidation.
  • packages/cicada-mcp-core/tests/utils/test_storage.py
    • Removed as part of the monorepo consolidation.
  • packages/cicada-scip/README.md
    • Removed as part of the monorepo consolidation.
  • packages/cicada-scip/pyproject.toml
    • Removed as part of the monorepo consolidation.
  • packages/cicada-scip/src/cicada_scip/init.py
    • Removed as part of the monorepo consolidation.
  • packages/cicada-scip/src/cicada_scip/converter.py
    • Removed as part of the monorepo consolidation.
  • packages/cicada-scip/src/cicada_scip/formatter.py
    • Removed as part of the monorepo consolidation.
  • packages/cicada-scip/src/cicada_scip/indexer.py
    • Removed as part of the monorepo consolidation.
  • packages/cicada-scip/src/cicada_scip/language_adapters.py
    • Removed as part of the monorepo consolidation.
  • packages/cicada-scip/src/cicada_scip/reader.py
    • Removed as part of the monorepo consolidation.
  • packages/cicada-scip/src/cicada_scip/scip.proto
    • Removed as part of the monorepo consolidation.
  • packages/cicada-scip/src/cicada_scip/scip_pb2.py
    • Removed as part of the monorepo consolidation.
  • packages/cicada-scip/src/cicada_scip/scip_pb2.pyi
    • Removed as part of the monorepo consolidation.
  • packages/cicada-scip/tests/init.py
    • Renamed to 'tests/languages/scip/init.py'.
  • packages/cicada-scip/tests/conftest.py
    • Renamed to 'tests/languages/scip/conftest.py' and updated internal paths.
  • packages/cicada-scip/tests/scip_languages.py
    • Renamed to 'tests/languages/scip/scip_languages.py'.
  • packages/cicada-scip/tests/test_function_range_fallback.py
    • Renamed to 'tests/languages/scip/test_function_range_fallback.py' and updated internal imports.
  • packages/cicada-scip/tests/test_language_adapters.py
    • Renamed to 'tests/languages/scip/test_language_adapters.py' and updated internal imports.
  • packages/cicada-scip/tests/test_scip_all_languages.py
    • Renamed to 'tests/languages/scip/test_scip_all_languages.py' and updated internal imports.
  • packages/cicada-scip/tests/test_scip_converter.py
    • Renamed to 'tests/languages/scip/test_scip_converter.py' and updated internal imports.
  • packages/cicada-scip/tests/test_scip_formatting.py
    • Renamed to 'tests/languages/scip/test_scip_formatting.py' and updated internal imports.
  • packages/cicada-scip/tests/test_scip_indexer.py
    • Renamed to 'tests/languages/scip/test_scip_indexer.py' and updated internal imports.
  • packages/cicada-scip/tests/test_scip_integration.py
    • Renamed to 'tests/languages/scip/test_scip_integration.py' and updated internal imports.
  • packages/cicada-scip/tests/test_scip_language_agnostic.py
    • Renamed to 'tests/languages/scip/test_scip_language_agnostic.py' and updated internal imports.
  • packages/cicada-scip/tests/test_scip_lookup.py
    • Renamed to 'tests/languages/scip/test_scip_lookup.py' and updated internal imports.
  • packages/cicada-scip/tests/test_scip_reader.py
    • Renamed to 'tests/languages/scip/test_scip_reader.py' and updated internal imports.
  • packages/cicada-scip/tests/test_scip_references.py
    • Renamed to 'tests/languages/scip/test_scip_references.py' and updated internal imports.
  • packages/cicada-scip/tests/test_typescript_formatter.py
    • Renamed to 'tests/languages/scip/test_typescript_formatter.py' and updated internal imports.
  • packages/cicada-scip/tests/test_typescript_module_kinds.py
    • Renamed to 'tests/languages/scip/test_typescript_module_kinds.py' and updated internal imports.
  • pyproject.toml
    • Removed workspace configuration for 'cicada-mcp-core' and 'cicada-scip'.
    • Updated project version to '0.6.3'.
    • Added 'protobuf>=4.0.0' to main 'dependencies'.
    • Removed 'scip' optional dependency group and 'cicada-scip' from 'all' and 'dev' optional dependencies.
    • Removed 'ignore = ["packages"]' from 'tool.pytest.ini_options'.
    • Updated 'ruff.lint.per-file-ignores' for SCIP modules.
    • Removed 'cicada-scip' from 'dependency-groups.dev'.
    • Removed '[[package]]' entries for 'cicada-mcp-core' and 'cicada-scip' from 'uv.lock'.
  • tests/fixtures/.cicada/hashes.json
    • Updated 'last_updated' timestamp.
  • tests/languages/python/test_python_indexer.py
    • Corrected import path for 'subprocess.run' patch to reflect the new location of 'indexer.py'.
  • uv.lock
    • Removed 'manifest' section related to workspace members.
    • Updated 'cicada-mcp' version to '0.6.3'.
    • Added 'protobuf' to 'cicada-mcp' dependencies.
    • Removed 'cicada-scip' and 'cicada-mcp-core' package entries and their related optional/dev dependencies.
Ignored Files
  • Ignored by pattern: .github/workflows/** (2)
    • .github/workflows/publish-pypi.yml
    • .github/workflows/test-scip-languages.yml
Activity
  • The pull request was created by wende. No other human activity has been recorded yet.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@codecov
Copy link

codecov bot commented Feb 7, 2026

Codecov Report

❌ Patch coverage is 78.22319% with 201 lines in your changes missing coverage. Please review.
✅ Project coverage is 82.06%. Comparing base (ac62a70) to head (943a192).
⚠️ Report is 4 commits behind head on main.

Files with missing lines Patch % Lines
cicada/languages/scip/converter.py 84.19% 41 Missing and 57 partials ⚠️
cicada/languages/scip/scip_pb2.py 13.11% 52 Missing and 1 partial ⚠️
cicada/languages/scip/indexer.py 71.09% 26 Missing and 11 partials ⚠️
cicada/languages/scip/language_adapters.py 74.50% 9 Missing and 4 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #236      +/-   ##
==========================================
+ Coverage   81.25%   82.06%   +0.81%     
==========================================
  Files         154      154              
  Lines       14358    15100     +742     
  Branches     2850     3046     +196     
==========================================
+ Hits        11666    12392     +726     
+ Misses       2011     1965      -46     
- Partials      681      743      +62     
Files with missing lines Coverage Δ
cicada/languages/__init__.py 97.59% <100.00%> (+5.28%) ⬆️
cicada/languages/scip/__init__.py 100.00% <100.00%> (+18.18%) ⬆️
cicada/languages/scip/formatter.py 100.00% <100.00%> (+33.33%) ⬆️
cicada/languages/scip/reader.py 100.00% <100.00%> (+33.33%) ⬆️
cicada/languages/scip/language_adapters.py 74.50% <74.50%> (+74.50%) ⬆️
cicada/languages/scip/indexer.py 74.28% <71.09%> (-0.89%) ⬇️
cicada/languages/scip/scip_pb2.py 12.69% <13.11%> (+12.69%) ⬆️
cicada/languages/scip/converter.py 84.19% <84.19%> (+17.52%) ⬆️

... and 17 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@wende
Copy link
Owner Author

wende commented Feb 7, 2026

@codex use your debug powers

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This is a large-scale refactoring that inlines the cicada-scip and cicada-mcp-core packages. This is a significant improvement that simplifies the project structure, dependency management, and installation process. The changes are extensive but appear to be handled consistently across the codebase, including updates to build files, CI configuration, and test paths. The core logic from the separate packages has been successfully integrated into the main cicada package. My review found one minor opportunity for improvement in the robustness of the lazy-loading mechanism for symbol type parsers. Overall, this is a great change that will improve the maintainability and user experience of the project.

Comment on lines 22 to 45
def _get_python_symbols():
"""Lazy import for Python symbol types module."""
global _python_symbols
if _python_symbols is None:
try:
import cicada.languages.python.symbol_types as ps

_python_symbols = ps
except ImportError:
_python_symbols = None
return _python_symbols


def _get_typescript_symbols():
"""Lazy import for TypeScript symbol types module."""
global _typescript_symbols
if _typescript_symbols is None:
try:
import cicada.languages.typescript.symbol_types as ts

_typescript_symbols = ts
except ImportError:
_typescript_symbols = None
return _typescript_symbols
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

The lazy-loading functions _get_python_symbols and _get_typescript_symbols currently suppress ImportError and return None. This can lead to a less clear AttributeError later when get_symbol_type is called on the None value. Since cicada-scip is now inlined, these imports should always succeed. It would be more robust to remove the try...except blocks and let an ImportError propagate if it occurs, as this would indicate a fundamental issue with the package structure.

def _get_python_symbols():
    """Lazy import for Python symbol types module."""
    global _python_symbols
    if _python_symbols is None:
        import cicada.languages.python.symbol_types as ps

        _python_symbols = ps
    return _python_symbols


def _get_typescript_symbols():
    """Lazy import for TypeScript symbol types module."""
    global _typescript_symbols
    if _typescript_symbols is None:
        import cicada.languages.typescript.symbol_types as ts

        _typescript_symbols = ts
    return _typescript_symbols

@chatgpt-codex-connector
Copy link

Summary

  • Excluded the generated SCIP protobuf module from coverage collection to avoid penalizing patch coverage for autogenerated code. pyproject.tomlL109-L126

Testing

  • Not run (not requested).

View task →

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 2 potential issues.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

This is the final PR Bugbot will review for you during this billing cycle

Your free Bugbot reviews will reset on March 1

Details

You are on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle.

To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.

0,
'',
'scip.proto'
)
Copy link

Choose a reason for hiding this comment

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

Protobuf dependency version too loose for generated code

High Severity

The generated scip_pb2.py imports from google.protobuf import runtime_version, which was introduced in protobuf 5.26.0. However, pyproject.toml specifies protobuf>=4.0.0. Users who install with protobuf 4.x or 5.0–5.25 will get an ImportError when importing any SCIP module, completely breaking all SCIP-based language indexers (Python, TypeScript, Go, Rust, Java, Scala, C, C++, Ruby, C#, VB, Dart).

Fix in Cursor Fix in Web

if func_keywords:
func_entry["keywords"] = func_keywords

modules[file_module_name] = file_module
Copy link

Choose a reason for hiding this comment

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

Missing null check for file module name causes invalid key

Low Severity

_get_file_module_name() can return None when the document's relative_path is empty or processes to an empty string (e.g., "__init__.py"). The return value is used directly as a dict key at line 802 (modules[file_module_name]) and as the module's "name" field at line 770. When None, this creates a module keyed by None in the dict, which serializes to "null" in JSON output—producing an invalid module entry.

Additional Locations (1)

Fix in Cursor Fix in Web

wende added 3 commits February 7, 2026 20:15
…xcept, guard against None module name

- Bump protobuf dependency from >=4.0.0 to >=5.26.0 (runtime_version requires it)
- Remove try/except around lazy imports since SCIP is now inlined
- Add None check for _get_file_module_name to prevent invalid dict key
The inlining commit accidentally removed existing entries for SCIP error
messages, README comparison table, and internal workflow improvements.
@wende wende merged commit 943a192 into main Feb 7, 2026
18 checks passed
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.

1 participant