microsoft / microsoft/pxt-microbit
converting nested namespaces from Python to typescript loses code
Open
Nobody has claimed this yet.
P2
python
pyToTs
tsToPy
- Dominant language
- TypeScript
- Stars
- 804
- Forks
- 721
- Avg merge
- 2d 9h
- Merged PRs (30d)
- 2
Description
This python:
@namespace
class foo:
baz = 42
@namespace
class bar:
baz2 = 86
converts to this typescript:
namespace foo {
export const baz = 42
}
which lost "bar" and "baz2" completely.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the issue with the nested namespace Python example and inspect the Python-to-TypeScript conversion path. Confirm that the generated TypeScript retains both the nested bar namespace and baz2 value; done means no nested code is lost during conversion.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, typescript
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100