better story for local dependencies
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 5/5
- Temps estimé
- Plus d'une semaine
- Accessibilité débutants
- 25/100
- Type d'issue
- Fonctionnalité
- Clarté
- À clarifier
- Activité
- À l'abandon
- Stack technique
- rust, wasm
- Domaine
- build-system, tooling
Piste de recherche
Examinez comment les dépendances .wit locales sont actuellement répercutées dans Cargo.toml et comment Cargo-component.lock intervient. Évaluez le comportement proposé avec un registre par défaut et une surcharge locale, ainsi que la possibilité d’une approche TOML séparée ; le travail est considéré comme terminé lorsqu’une conception raisonnée et pérenne de la résolution des dépendances est convenue.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
this is more of a discussion point than a definite bug or feature request, but I figured it could help to share my anecdotal experience and a pain point, maybe someone will have ideas about how to improve.
When I point to a wit on a registry, everything just works, all dependencies are resolved automatically, I don't need to do anything "extra".
However, when I point to a wit locally, I have to redefine the dependencies in Cargo.toml
This feels a bit weird - if it's already denoted in the .wit, why do I need to redefine these same exact dependencies again?
From a technical perspective - I think I see a problem here, and it does make sense to punt on this until there's a well-reasoned solution: when you define the dependencies locally, you have a choice of loading them from the registry (i.e. semver syntax) or loading locally (i.e. a direct path), and, in fact, one might think that the default should be to load locally in this case - but in practice, this is usually not what you actually want to do (i.e. I might be working on my local custom wit, but it depends on wasi::io, but I have no need to maintain a local copy of that)
My handwavey suggestion would be to not force listing the dependencies locally, make it so that everything "just works" by following the .wit and loading dependencies from the registry, but if the user lists the dependencies in their Cargo.toml (i.e. they are working on that too locally), then it overrides this default.
That said - I understand there's ongoing work to move away from Cargo-component.lock, perhaps make all of this more language-agnostic with a separate toml file, etc... needs careful thought to resolve this issue with future-proofing in mind :)
- Langage dominant
- Rust
- Étoiles
- 593
- Forks
- 68
- Métriques de merge des PR
- Aucune PR mergée en 30 j
Préparer son environnement
Ce projet ne fournit ni conteneur de développement, ni Dockerfile, ni guide de contribution : l'installation est à votre charge. Commencez par son README, et consultez notre guide de la première contribution pour les étapes générales.
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 bytecodealliance/cargo-component
-
Difficulté 2/5 1-3 heures Accessibilité débutants 38/100
-
Difficulté 3/5 1-2 jours Accessibilité débutants 76/100
-
Difficulté 5/5 Plus d'une semaine Accessibilité débutants 35/100
-
Cargo Component WASI InterfacesOuverte
Difficulté 4/5 3-5 jours Accessibilité débutants 35/100
-
Difficulté 3/5 1-2 jours Accessibilité débutants 48/100
bytecodealliance/cargo-component#399 · 2 commentaires ·
Toutes les issues de bytecodealliance/cargo-component
Issues similaires
-
Test connection's password prompt says the password is never saved, also for a keychain profileOuvertebug
Difficulté 2/5 1-3 heures Accessibilité débutants 76/100
Les mainteneurs répondent en général sous 1 jour
-
area: settings bug Haiku review: no-score ui
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
MMFoundation/WallpaperMachine#346 ·
Les mainteneurs répondent en général sous 1 jour
-
Make the HTTP server's keep-alive and headers timeouts configurablePeut-être pris @mattgodbolt l’a pris aujourd’hui. Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 76/100
compiler-explorer/compiler-explorer#9902 ·
Les mainteneurs répondent en général sous 1 jour
-
documentation
Difficulté 2/5 1-3 heures Accessibilité débutants 68/100
jonathanong/no-mistakes#5490 ·
-
follow-up
Difficulté 2/5 1-3 heures Accessibilité débutants 76/100
Les mainteneurs répondent en général sous 1 jour