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

More acceptance test scenarios. #176

Merged
merged 19 commits into from
Dec 19, 2022
Merged

More acceptance test scenarios. #176

merged 19 commits into from
Dec 19, 2022

Conversation

KtorZ
Copy link
Member

@KtorZ KtorZ commented Dec 15, 2022

No description provided.

KtorZ added a commit to aiken-lang/stdlib that referenced this pull request Dec 15, 2022
  - Slightly more efficient until we have compiler optimizations in.
  - Also 'solves' issue captured in acceptance tests 016 and 017 (see aiken-lang/aiken#176)
KtorZ added a commit to aiken-lang/stdlib that referenced this pull request Dec 15, 2022
  - Slightly more efficient until we have compiler optimizations in.
  - Also 'solves' issue captured in acceptance tests 016 and 017 (see aiken-lang/aiken#176)
@rvcas rvcas added the code gen Untyped Plutus Core code generation label Dec 15, 2022
@rvcas rvcas added this to the v0.1.0 - Initial Alpha milestone Dec 15, 2022
@@ -6,6 +6,7 @@ pub fn new() {
Map { inner: [] }
}

// Seems to be an issue with the parser. The TypedExpr body is excluding the Equal binop.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can have a look at that one.

@KtorZ KtorZ force-pushed the some-interesting-test-cases branch from 5071b66 to 79f2360 Compare December 17, 2022 14:06
KtorZ and others added 15 commits December 17, 2022 17:10
  ```
  Error:
    × Main thread panicked.
    ├─▶ at /Users/ktorz/Documents/Projects/aiken-lang/aiken/crates/project/src/lib.rs:616:36
    ╰─▶ called `Result::unwrap()` on an `Err` value: FreeUnique(Name { text: "test_slice", unique:
        Unique(7) })
  ```
  ```
  Error:
    × Main thread panicked.
    ├─▶ at /Users/ktorz/Documents/Projects/aiken-lang/aiken/crates/project/src/lib.rs:596:22
    ╰─▶ called `Result::unwrap()` on an `Err` value: FreeUnique(Name { text: "test_slice", unique:
        Unique(6) })
  ```
  ```
  Error: examples/acceptance_tests/018/lib/test.ak

    × or_else_2 failed
    help: ┍━ left ━━━━━━━━━━━┑
          │ (con data #182a) │
          ┕━━━━━━━━━━━━━━━━━━┙

          should be equal to

          ┍━ right ━━━━━━━━━━┑
          │ (con integer 42) │
          ┕━━━━━━━━━━━━━━━━━━┙
  ```
  ```
  Error:
    × Main thread panicked.
    ├─▶ at crates/lang/src/uplc.rs:2001:81
    ╰─▶ called `Option::unwrap()` on a `None` value
  ```
  ```
  Error: 020/lib/test.ak

    × map_2 failed
    help: ┍━ left ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┑
          │ Type mismatch expected 'integer' got 'data' │
          ┕━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┙

          should be equal to

          ┍━ right ━━━━━━━━━━━━━━━━┑
          │ (con data #d8799f0fff) │
          ┕━━━━━━━━━━━━━━━━━━━━━━━━┙
  ```
  ```
  Error: aiken::check

    × Checking
    ╰─▶ Unknown type

        VerificationKey

     ╭─[021/lib/test.ak:4:1]
   4 │ pub type PoolId =
   5 │   Hash<VerificationKey>
     ·        ───────────────
   6 │
     ╰────
  ```
  This is because there's no proper way to catch panics in Rust, which
  makes it hard to know _which_ test did cause the panic when this
  happen. The stack trace gives little detail about this, but we can
  print this information before it happens -- making it easier to
  identify the culprit.
  ```
  thread 'main' has overflowed its stack
  fatal runtime error: stack overflo
  ```
  It's best to keep builtin as-close-as possible to their standard name
  because they're hard to document. We can then leverage the prelude and
  the standard lib for convenient names.
@KtorZ KtorZ force-pushed the some-interesting-test-cases branch from fa7e3ae to 5fb9060 Compare December 17, 2022 16:10
KtorZ and others added 2 commits December 18, 2022 12:41
  Instead, prints out a README with useful informations.
Use more cost efficient recurse
Monomorphize needed to deal with function arg return types
bytearray variant added for variant names
@MicroProofs
Copy link
Member

One test left to pass and that will be fixed in pr #164. Let's merge for now

@rvcas rvcas merged commit 43ff66c into main Dec 19, 2022
@rvcas rvcas deleted the some-interesting-test-cases branch December 19, 2022 05:41
@KtorZ KtorZ mentioned this pull request Dec 20, 2022
7 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code gen Untyped Plutus Core code generation
Projects
Status: 🚀 Released
Development

Successfully merging this pull request may close these issues.

3 participants