Skip to content

fix: correct Python module naming for tree_sitter_vb_dotnet#6

Open
mishkaechoes wants to merge 1 commit intoCodeAnt-AI:mainfrom
mishkaechoes:fix/python-module-naming
Open

fix: correct Python module naming for tree_sitter_vb_dotnet#6
mishkaechoes wants to merge 1 commit intoCodeAnt-AI:mainfrom
mishkaechoes:fix/python-module-naming

Conversation

@mishkaechoes
Copy link

Summary

The Python bindings were incorrectly named with a doubled prefix, causing an ImportError when trying to use the package.

Problem

When installing and importing the package:

import tree_sitter_vb_dotnet
# ImportError: dlopen(...): symbol not found '_tree_sitter_tree_sitter_vb_dotnet'

The C binding exported tree_sitter_vb_dotnet (matching the grammar name in grammar.js), but the Python package directory and references used tree_sitter_tree_sitter_vb_dotnet.

Changes

  • Renamed bindings/python/tree_sitter_tree_sitter_vb_dotnet/bindings/python/tree_sitter_vb_dotnet/
  • Updated binding.c to use the correct symbol name
  • Updated setup.py package references
  • Fixed pyproject.toml homepage URL

Testing

After the fix:

import tree_sitter_vb_dotnet
lang = tree_sitter_vb_dotnet.language()
# Works correctly!

This enables Python users to properly parse VB.NET code with tree-sitter.

The Python bindings were incorrectly named with a doubled prefix:
- `tree_sitter_tree_sitter_vb_dotnet` -> `tree_sitter_vb_dotnet`

This caused an ImportError when trying to use the package because
the C binding exported `tree_sitter_vb_dotnet` but Python looked
for `tree_sitter_tree_sitter_vb_dotnet`.

Changes:
- Renamed bindings/python/tree_sitter_tree_sitter_vb_dotnet/ to
  bindings/python/tree_sitter_vb_dotnet/
- Updated binding.c to use correct symbol name
- Updated setup.py package references
- Fixed pyproject.toml homepage URL
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