tools: --version on every Emb tool, from src/driver/version.h

Ouverte
#192 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub

Les mainteneurs répondent en général sous 1 jour

Personne n'a encore pris cette issue.

Évaluation

Difficulté
4/5
Temps estimé
3-5 jours
Accessibilité débutants
55/100
Type d'issue
Fonctionnalité
Clarté
Clairement spécifiée
Activité
Active
Stack technique
c
Domaine
tooling

Piste de recherche

Read src/driver/version.h first and follow its comment requiring one shared version string. Then inspect the listed tool option loops and each tool’s Makefile rule; the issue allows implementing a few tools per pull request. Done means the covered tools print their name and EMBCC_VERSION with exit code 0, and a test reads the version from the header and checks every tool.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Description

enhancement good first issue

Context. embcc --version prints EmbCC 0.0.1-beta (...). None of the other tools has --version:

$ ./embld --version
embld: unknown option '--version'
$ ./embsim --version
embsim: embsim: unknown option '--version'

The same holds for embsvd, embmap, embpack, embrt, embread and embflash. embtrace and embar print their usage instead, and embdbg prints an old banner (EmbDBG v0 — EmbLinkOS debug-info reader). A bug report should be able to say which version of each tool was used.

Where.

  • src/driver/version.h: EMBCC_VERSION, the one version string. Read its comment: the string must stay defined in one place only.
  • Each tool's option loop: tools/embld/embld.c, tools/embsim/main.c, tools/embsvd/embsvd.c, tools/embmap/embmap.c, tools/embpack/embpack.c, tools/embrt/embrt.c, tools/embread/embread.c, tools/embflash/embflash.c, tools/embtrace/, tools/embar/, tools/embdbg/.
  • The Makefile rule for each tool. Check that the tool's build can see src/driver/version.h, and add it to the rule's prerequisites so a version bump rebuilds the tool.

Steps.

  1. Give each tool --version, printing NAME (EmbCC 0.0.1-beta) from EMBCC_VERSION, and exiting 0.
  2. Add one test, for example tests/golden/tool-versions.sh. It runs every tool with --version and checks that each prints EMBCC_VERSION, read from version.h so the test does not restate it.
  3. It is fine to do a few tools per pull request; say which ones in the PR.

Done when every tool in the README's tools table answers --version with the same version as embcc, the test checks them all, and make check passes.

Before you start: the contributor's guide has the rules. A new test counts only after it has failed against the code before your change, and a commit subject reads area: summary. Questions are welcome in the comments or in Discussions.

Langage dominant
C
Étoiles
1
Forks
2
Merge moyen
20 h 55 min
PR mergées (30 j)
73

Préparer son environnement

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de EmbLinkOs/EmbCC

Toutes les issues de EmbLinkOs/EmbCC

Issues similaires

Plus d'issues C

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.