-
-
Notifications
You must be signed in to change notification settings - Fork 131
Description
What is your idea? Provide a use case.
Aiken provides commands for adding dependencies to a project (i.e. automatically edit aiken.toml). However, commands are a bit "clunky" at the moment and could be improved in the following ways:
-
The
--versionoption onaiken addcould be made optional; when not provided, the dependency will be added considering only the default branch on the target repository. This means using the GitHub API for querying the default branch. For example,aiken add aiken-lang/stdlibshould add the standard library usingmainas a version. -
aiken addshould verify that a given repository / project exists when adding it. Ideally, it should also check that a commit or branch given as--versionalso exists. In both cases, display a human-readable error and a hint to troubleshoot the problem. For well-known organizations likeaiken-lang, we could even make suggestion using a levenshtein distance as it is quite common to go foraiken/stdlibinstead ofaiken-lang/stdlib. -
Add a
aiken removecommand to easily remove a dependency. -
Add
aiken package listto pretty-print installed dependencies and their versions. -
aiken package upgradeshould fail with a proper error when trying to upgrade a non-existing package. -
(bonus) Support more providers than
Githubsuch asGitLab.
Non-goals
- Implement a version resolver: this is overkill at this point and not something we want to do lightly. The current requirement for projects to have to manually specify all their dependencies (including transitive dependencies) is a FEATURE and done on-purpose.
Why is it a good idea?
These commands are seldom used at this stage because we don't yet have a large ecosystem and the stdlib comes pre-defined as dependency when running aiken new. However, the developer experience could still be made slightly better in anticipation and to prevent mistakes.
What is the current alternative and why is it not good enough?
Current alternative is not doing mistakes. It's very easy to mistype a branch name, and catching errors early is usually how we achieve good UX.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status