Skip to content

cross-platform: Standardize AST symbol cache paths using pathlib.Path across Linux/macOS/Windows #2

Description

@Jaswanth1902

🎯 Problem Statement

File system paths on Windows use backslashes (\) and case-insensitive matching, while Linux and macOS use forward slashes (/) and case-sensitive path semantics. Raw string manipulations can cause cache misses, duplicate symbol entries, or invalid URI resolution when Cartograph runs on different operating systems.

🛠️ Scope of Work

  1. Audit cartograph/ for raw string manipulations on file paths (e.g. path.split('\\') or string formatting).
  2. Refactor all path normalization to use Python's standard pathlib.Path.resolve() and pathlib.Path.as_posix().
  3. Add a multi-OS test matrix (ubuntu-latest, windows-latest, macos-latest) in GitHub Actions to verify AST symbol extraction parity.

🧪 Acceptance Criteria

  • All path operations use pathlib.Path standard methods.
  • Pytest suite passes across Windows, Linux, and macOS without path-related assertion failures.

🤝 Mentorship & Support

Beginner or intermediate contributors are warmly welcome! If you want to tackle this, reply below and I'll assign it to you.

Activity

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

Metadata

Metadata

Assignees

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions