Need to handle mods with code compilations errors on build and load
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Accessibilité débutants
- 48/100
- Type d'issue
- Bug
- Clarté
- Plutôt claire
- Activité
- Active
- Stack technique
- typescript
- Domaine
- build-system, cli
Piste de recherche
Reproduisez l’échec avec l’expression régulière malformée signalée à la ligne 115 de .commandcode/mods/erd.ts, puis retracez la manière dont le mod builder et cmd mods list gèrent le chargement échoué. La tâche est terminée lorsque les erreurs de compilation ou de chargement sont clairement affichées et que le statut indisponible ou désactivé du mod est visible au lieu de le lister comme utilisable.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
Summary
I built a mod, but while the cmd mods list showed it as available in the project, the command it had did not appear.
Turns out there was a compilation issue, but I had no way of knowing:
in the @.commandcode/mods/erd.ts there should be comands but i have reloaded but i dont see them available. but i see it is available cmd mods list
Built-in mods (4)
provider-anthropic · builtin
provider-copilot · builtin
provider-openai · builtin
update-notice · builtin
Mods (1)
erd · project
✻ Thought for 1 second [ctrl+o to expand]
⠶ Let me look at your mod file and check the Command Code mod docs to figure out why the commands aren't appearing.
READ [.commandcode/mods/erd.ts] 1011 lines
✻ Thought for 6 seconds [ctrl+o to expand]
⠶ Let me check if there's a TypeScript compilation issue or missing dependency.
SHELL [ls ~/projects/dthyresson/erd-mod/node_modules/@commandcode/harness 2>&1 | head -5]
│ ls: /Users/dthyresson/projects/dthyresson/erd-mod/node_modules/@commandcode/harness: No such file...
└ ... [ctrl+o to expand]
SHELL [ls ~/projects/dthyresson/erd-mod/schema/ 2>&1]
└ schema.sql
SHELL [node -e "try { require('~/projects/dthyresson/erd-mod/.commandcode/mods/erd.ts'); } catch(e) { co...]
│ Invalid regular expression: /^\s*\S+\s+([A-Za-z_]+(?:\s*\([^)]*(?:\([^)]*\)[^)]*)*\))?(?:\s|$)/i:...
└ ... [ctrl+o to expand]
✻ Thought for 29 seconds [ctrl+o to expand]
⠶ Found the issue. The regex on line 115 has an unmatched parenthesis — the capture group ( is never closed, making the regex invalid. This causes the mod to fail
to load entirely, which is why /cmd mods list shows it but none of its commands appear.
Expected Behavior
- the mod builder should run some type or compile checks
- on load of the mod, warn that a mod failed to load so can correct (or status of disable due to error)
- something to know while mod isn't working/available
Actual Behavior
- mod listed but commands it implements not present
Steps to reproduce the issue
- use mod builder but introduce some type or build compilation error in it
Command Code Version
1.5.0
Operating System
macOS
Terminal/IDE
ghostty
Shell
zsh
Additional context
No response
- Langage dominant
- Aucune donnée de langage
- Étoiles
- 4k
- Forks
- 350
- Métriques de merge des PR
- Aucune PR mergée en 30 j
Guide de contribution
Aucun guide de contribution indexé pour ce dépôt
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de CommandCodeAI/command-code
-
Difficulté 2/5 1-3 heures Accessibilité débutants 68/100
CommandCodeAI/command-code#855 ·
-
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
CommandCodeAI/command-code#841 · 1 commentaire ·
-
Difficulté 2/5 1-3 heures Accessibilité débutants 68/100
CommandCodeAI/command-code#655 · 1 commentaire ·
-
Difficulté 2/5 1-3 heures Accessibilité débutants 68/100
CommandCodeAI/command-code#608 ·
-
Difficulté 3/5 1-2 jours Accessibilité débutants 70/100
CommandCodeAI/command-code#893 ·
Toutes les issues de CommandCodeAI/command-code
Issues similaires
-
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100
libsdl-org/SDL#16360 ·
-
[BUG] Ouvertebug
Difficulté 2/5 1-3 heures Accessibilité débutants 85/100
eunomia-bpf/llvmbpf#51 · 1 commentaire ·
-
stack resolver is outdated Ouverte
Difficulté 1/5 Moins d'une heure Accessibilité débutants 85/100
koalaman/shellcheck#3539 ·
-
Build Failure: agora_rtc_engine compiled against android-31 while dependencies require android-34+ Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100
-
package-request
Difficulté 2/5 1-3 heures Accessibilité débutants 68/100
msys2/MINGW-packages#31806 ·