Synchronizing auto-generated files with bindings

Aperta
#887 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
25/100
Tipo di issue
Funzionalità
Chiarezza
Da chiarire
Stato di attività
Ferma
Stack tecnologico
cpp, java, python

Direzione di ricerca

Inizia confrontando lib/vkFormat2glInternalFormat.inl con interface/java_binding/src/main/java/org/khronos/ktx/KtxInternalformat.java e interface/python_binding/pyktx/gl_internalformat.py. Esamina come interface/java_binding genera VkFormat.java, quindi determina quali file vengono generati e come mantenere sincronizzati tutti i binding. Il lavoro è completato quando l’approccio di generazione o manutenzione è documentato e le costanti interessate dispongono di un percorso di aggiornamento ripetibile.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

(This came up as part of https://github.com/KhronosGroup/KTX-Software/issues/880, but applies to all bindings, and may therefore warrant its own issue)

There are some files that seem to be largely auto-generated. One of them is vkFormat2glInternalFormat.inl.

These files usually have corresponding files in the bindings. For example

As part of a general cleanup of the JNI part, I wanted to check whether these constants definitions are up to date. But

  1. without knowing which files are auto-generated, it's hard to decide what has to be done manually
  2. doing this manually for all bindings sounds like a maintenance nightmare

I already did it manually for things like KtxErrorCode.java, which contains few values, is not auto-generated in the source, and expected to change rarely. But for most of these constants, any manual approach seems infeasible. Just looking at the number of constants, there seem to be 195 cases in vkFormat2glInternalFormat.inl, but only 84 cases in KtxInternalFormat.java, and there doesn't seem to be a reasonable way to "sync" them manually.

Are there any ideas or preferred ways for updating these files?

(I've seen that, for example, the VkFormat.java already is auto-generated, but I'm not sure how well this would scale to the other files)

In doubt, I'll do an update of the files in the JNI bindings, based on the latest state, with some TextPad macros and helper scripts. But I'm wondering about a more future-proof solution.

Lingua principale
C++
Stelle
1.4k
Fork
328
Merge medio
20h 40m
PR unite (30g)
18

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di KhronosGroup/KTX-Software

Tutte le issue di KhronosGroup/KTX-Software

Issue simili

Altre issue su C++

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.