Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Basic commands for manipulating the aiken.toml #259

Merged
merged 6 commits into from
Jan 15, 2023

Conversation

KtorZ
Copy link
Member

@KtorZ KtorZ commented Jan 14, 2023

Fixes #257 & Closes #151.

Screenshot 2023-01-14 at 23 27 15

  • 📍 Move 'PackageName' and associated methods in its own module.
    This is a bit cleaner, as the 'cmd/new' had many on-the-fly functions
    which are better scoped inside this module.

    Plus, it plays nicely with the std::str::FromStr trait definition.

  • 📍 Also move some associated methods to the 'Config' module
    And refactor the 'new' command implementation.

  • 📍 Add new 'deps add' command
    This makes it easier to add new dependencies, without having to
    manually edit the aiken.toml file.

    The command is accessible via two different paths:

    • aiken deps add

    or simply

    • aiken add

    for this is quite common to find at the top-level of the command-line,
    and, we still want to keep commands for managing dependencies grouped
    under a command sub-group and not all at the top-level. So we're
    merely promoting that one for visibility.

  • 📍 Rename sub-command 'deps' → 'packages'
    Slightly more readable and self-explanatory.

  • 📍 Add 'packages upgrade' command.

  This is a bit cleaner, as the 'cmd/new' had many on-the-fly functions
  which are better scoped inside this module.

  Plus, it plays nicely with the std::str::FromStr trait definition.
  And refactor the 'new' command implementation.
  This makes it easier to add new dependencies, without having to
  manually edit the `aiken.toml` file.

  The command is accessible via two different paths:

  - aiken deps add

  or simply

  - aiken add

  for this is quite common to find at the top-level of the command-line,
  and, we still want to keep commands for managing dependencies grouped
  under a command sub-group and not all at the top-level. So we're
  merely promoting that one for visibility.
  Slightly more readable and self-explanatory.
@KtorZ KtorZ requested a review from rvcas January 14, 2023 22:29
@KtorZ KtorZ self-assigned this Jan 14, 2023
  There are restrictions regarding how modules are called, but given that packages are tight to repositories anyway; there's no way someone can publish and use an aiken package on 'aiken-lang' without being part of the organization. So the restriction on the command-line is pointless. Plus, it prevents us from using 'aiken-lang' as a placeholder name for tutorials.
@rvcas
Copy link
Member

rvcas commented Jan 15, 2023

nice super cool

@rvcas rvcas added the tooling Tooling and developer experience improvements label Jan 15, 2023
@rvcas rvcas merged commit 8ac2d75 into main Jan 15, 2023
@rvcas rvcas deleted the basic-add-upgrade-packages branch January 15, 2023 03:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tooling Tooling and developer experience improvements
Projects
Status: 🚀 Released
Development

Successfully merging this pull request may close these issues.

Add a aiken add command for adding dependencies Package Management
2 participants