Future-proofing the example code
- Langage dominant
- Assembly
- Étoiles
- 179
- Forks
- 64
- Merge moyen
- 7 j 22 h
- PR mergées (30 j)
- 1
Description
Parts II and III will have the reader (and thus, the writer as well) working iteratively on a codebase. Where it gets iffy is that any change made to earlier lessons must be consistently reflected in later lessons. (This could happen for example because an earlier lesson is amended to make "room for" a later one, to update the syntax for a newer RGBDS version etc.)
Propagating these changes throughout the tutorial, where they would be presented "inline", would be a massive pain. Instead, I suggest the codebase should be checked out into Git, and inline code examples pulled from that repo.
This does get somewhat involved in several ways (e.g. ensuring that all referenced commits are reachable from the `master` branch, keeping referenced line numbers consistent when rebasing, etc.), but I think is essential if we want to avoid the tutorial irremediably bit-rotting in the longer term.
The concrete solution, I'd say, is to build a mdBook preprocessor (either stand-alone, or as part of the [bundled one](https://github.com/ISSOtm/gb-asm-tutorial/tree/master/preproc)), that is able to include portions of files (like [the default `links` preproc is able to](https://rust-lang.github.io/mdBook/format/mdbook.html#including-files)), but picking a version of that file in a specific commit. `libgit` integration is desirable so as to avoid a ton of slow `git checkout`s, but not necessary—the priority is to it make work.
Guide de contribution
Ouvrir le guide de contribution
Piste de recherche
Commencez dans le répertoire preproc du dépôt et comparez le préprocesseur inclus avec le préprocesseur links par défaut de mdBook. Étudiez comment les commits référencés peuvent rester accessibles depuis master et comment les portions de fichiers à inclure doivent être sélectionnées. C'est terminé lorsque le tutoriel peut extraire une portion de code inline depuis un commit spécifié sans dépendre de mises à jour manuelles répétées.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- git
- Domaine
- documentation, tooling
- Type d'issue
- Fonctionnalité
- Difficulté
- 5/5
- Temps estimé
- Plus d'une semaine
- Activité
- À l'abandon
- Clarté
- Plutôt claire
- Accessibilité débutants
- 30/100