Commit Graph

2642 Commits

Author SHA1 Message Date
KtorZ
8d45b2a2f5 Enforce ordering of commands/sub-commands according to source
By default, clap orders command alphabetically, which can be quite
    confusing when listing commands with `--help`:

    ```
    SUBCOMMANDS:
        eval      Evaluate an Untyped Plutus Core program
        flat      Encode textual Untyped Plutus Core to flat bytes
        fmt       Format an Untyped Plutus Core program
        help      Print this message or the help of the given subcommand(s)
        unflat    Decode flat bytes to textual Untyped Plutus Cor
    ```

    It is possible to instrument clap to order commands in the same way
    they are declared in the source, giving us back the freedom to order
    and group them in a manner that makes sense, e.g.:

    ```
    SUBCOMMANDS:
        fmt       Format an Untyped Plutus Core program
        eval      Evaluate an Untyped Plutus Core program
        flat      Encode textual Untyped Plutus Core to flat bytes
        unflat    Decode flat bytes to textual Untyped Plutus Cor
        help      Print this message or the help of the given subcommand(s)
    ```
2022-10-28 17:20:41 +02:00
KtorZ
9c608ad9f1 Refactor cli's crate; split code into a hierarchy of modules.
This follows a simple convention:

    - `main.rs` contains as little as possible and delegates both
      data-types definitions and command executions to sub-modules.

    - modules are named after their respective commands. For
      sub-commands,

    - Each command module can be in one of two forms:

      - Either it is a leaf command, and it then contains an `Args`
	struct that defines the command arguments; and a function
	`exec` when outlines the execution logic.

      - Or, it is a group command with multiple sub-commands. In which
	case the module defines a `Cmd` struct encapsulating all
	sub-commands; and also an `exec` function which simply
	dispatches the logic to sub-functions.

    ---

    This commit also removes the `dev` command which is currently
    unused. The rationale being: if it's not there, it's not there.
2022-10-28 17:20:39 +02:00
KtorZ
6d0d938fb9 Extra project utilities in their own crate.
This was currently in the 'cli' crates, but this code is pretty standalone and need not to be mixed with the rest of the cli logic.
  Ideally, we want the cli crate to be only a thin wrapper over functionality available from the rest of the lib crates.
2022-10-28 13:48:40 +02:00
Turner
aabcacbe87 Expose Pallas stuff, bump version, update changelog 2022-10-27 20:40:37 -07:00
rvcas
819256df99 feat: wrap up adding uplc builtins for now 2022-10-25 18:52:27 -04:00
rvcas
d5d2ba9cd7 feat: start creating aiken/builtin module 2022-10-25 18:52:27 -04:00
rvcas
53b2adb7df chore: remove some nix stuff 2022-10-24 00:53:17 -04:00
rvcas
2e5fdb12d9 chore: update roadmap 2022-10-24 00:12:39 -04:00
rvcas
4064a3e4e6 chore: update changelog 2022-10-24 00:09:00 -04:00
rvcas
a41d05f7b6 feat: change project structure 2022-10-24 00:09:00 -04:00
rvcas
825783ca61 feat: typecheck If expressions 2022-10-24 00:09:00 -04:00
rvcas
5244e58c9f feat: typechecking is working 2022-10-24 00:09:00 -04:00
rvcas
cabc653167 feat: start expr inference 2022-10-24 00:09:00 -04:00
rvcas
81c87ab4da feat: register import, types, and values in environment 2022-10-24 00:09:00 -04:00
rvcas
d0287d418b feat: add prelude 2022-10-24 00:09:00 -04:00
rvcas
4df3de0a03 feat: some boilerplate for typechecking 2022-10-24 00:09:00 -04:00
rvcas
ed2ef4fa9b feat: sort modules and detect cycles 2022-10-24 00:09:00 -04:00
rvcas
15c774b7d0 Release 0.0.21
aiken@0.0.21
flat-rs@0.0.21
uplc@0.0.21

Generated by cargo-workspaces
2022-10-23 17:58:21 -04:00
rvcas
bed33196bb chore: update changelog 2022-10-23 17:57:53 -04:00
Kasey White
c89690aa77 Create unknown constructor error for decode 2022-10-23 17:54:21 -04:00
Kasey White
360a5b6017 preceding bytes output changes if you error before position 5 2022-10-23 17:54:21 -04:00
Kasey White
56984dea36 more spacing for parse error 2022-10-23 17:54:21 -04:00
Kasey White
15cfb22c8f more detailed parse errors when decoding with flat 2022-10-23 17:54:21 -04:00
alessandrokonrad
4ef654b660 fixed clippy issue 2022-10-22 18:01:36 -04:00
alessandrokonrad
c6de827721 added apply_params_to_script function 2022-10-22 18:01:36 -04:00
rvcas
e67aa7b943 chore: update readme and book 2022-10-20 14:10:03 -04:00
alessandrokonrad
7ca276bad4 updated changelog 2022-10-19 17:04:43 -04:00
alessandrokonrad
e6f3c40429 changed i64 -> i128 2022-10-19 17:04:43 -04:00
rvcas
ce875a3c47 Release 0.0.20
aiken@0.0.20
aiken-lang@0.0.20
flat-rs@0.0.20
uplc@0.0.20

Generated by cargo-workspaces
2022-10-17 17:22:50 -04:00
rvcas
08736817ca chore: update changelog 2022-10-17 17:22:03 -04:00
rvcas
a9621756f4 chore: update changelog 2022-10-17 17:21:19 -04:00
alessandrokonrad
a83c731eb1 fixed err description 2022-10-17 08:35:45 -04:00
alessandrokonrad
ad542a68e8 removed unnecessary return statement 2022-10-17 08:35:45 -04:00
alessandrokonrad
0856f6ccf2 added checked operators to some DefaultFunction 2022-10-17 08:35:45 -04:00
alessandrokonrad
cfc1f92646 leave as i128 2022-10-17 08:35:45 -04:00
alessandrokonrad
4e8fd53e70 fixed comments 2022-10-17 08:35:45 -04:00
alessandrokonrad
a14dae5863 changed slot_length to u32 2022-10-17 08:35:45 -04:00
alessandrokonrad
28b9fed8e5 added i128 integer support 2022-10-17 08:35:45 -04:00
rvcas
e30bd829aa chore: update changelog 2022-10-13 10:56:04 -04:00
rvcas
6e7ea45e11 fix: flip the cbor_hex if condition 2022-10-13 10:56:04 -04:00
rvcas
da89e9902c feat: starting to get pretty error messages 2022-10-11 14:34:27 -04:00
rvcas
59d7b54473 feat: start integrating miette 2022-10-11 14:34:27 -04:00
rvcas
57dc50e3aa chore: temp allow dead code 2022-10-09 15:39:28 -04:00
rvcas
754b2d00b9 chore: more contributing docs 2022-10-09 15:39:28 -04:00
rvcas
0889e7d5c4 fix: do not try to deploy mdbook if not main 2022-10-09 15:39:28 -04:00
rvcas
6b79eb0961 chore: split example into lib and script 2022-10-09 15:39:28 -04:00
rvcas
03d4a6f1e1 chore: rename 2022-10-09 15:39:28 -04:00
rvcas
ff26db2245 feat: start project building 2022-10-09 15:39:28 -04:00
MitchTurner
756e7c7680 Include info for running CI checks locally (#66) 2022-10-09 14:33:58 -04:00
rvcas
549a1ae971 chore: add .github/FUNDING.yml 2022-10-08 19:17:44 -04:00