Transcrypt not able to translate addict.py correctly : Creates circular dependency
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 25/100
- Tipo di issue
- Bug
- Chiarezza
- Da chiarire
- Stato di attività
- Ferma
- Stack tecnologico
- javascript, python, rollup
- Ambito
- compilers
Direzione di ricerca
Start by reproducing the Transcrypt run on addict.py and inspect the generated addict.js, especially its imports from itself and the missing addict functions. Compare the generated output with the reported Rollup circular-dependency failure. Done means the translated library includes the expected functions without the self-referential import and no longer breaks Rollup.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Transcrypt runs without error and produces output when ran over addict.py (a library on top of Dict, that uses some python dunder function hooks to make dictionary operations via class/object access patterns). I am using this https://github.com/sandeep-gh/addict fork.
Transcrypt compiles addict and reports no error. However, the generated javascript has no code corresponding to addict functions and it seems to have created a recursive definition which breaks rollup bundler (see Circular Dependency) Attached below is the relevant snippet of the generate addict.js.
'use strict';
import {
...
...
...
} from "./org.transcrypt.__runtime__.js";
import {
Dict as Addict
} from "./addict.js";
import {
Dict,
walker
} from "./addict.js";
export {
walker,
Dict,
Addict
};
....
The import line seems to be creating a circular dependency since within addict.js we are saying import Dict from addict.js. Are libraries like addict.py not transcryptable? Any high level idea how to debug/fix would be great.
- Lingua principale
- Python
- Stelle
- 2.9k
- Fork
- 218
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di TranscryptOrg/Transcrypt
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
TranscryptOrg/Transcrypt#913 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
TranscryptOrg/Transcrypt#911 · 2 commenti ·
-
IS: bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
TranscryptOrg/Transcrypt#908 ·
-
SUB: documentation
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 62/100
TranscryptOrg/Transcrypt#656 · 7 commenti ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 76/100
TranscryptOrg/Transcrypt#914 ·
Tutte le issue di TranscryptOrg/Transcrypt
Issue simili
-
link-check link-check:sphinx-theme
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
qgis/QGIS-Documentation#11275 ·
-
bug priority:normal ready-for-dev
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
OpenHands/extensions#626 · 1 commento ·
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 90/100
CSCfi/sd-search-api#39 ·
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 90/100