compatibility with recent inkwell #67

Closed
opened 2021-11-02 14:23:34 +08:00 by sb10q · 3 comments
Owner

Updating inkwell causes this:

error[E0308]: mismatched types
   --> nac3core/src/codegen/mod.rs:330:37
    |
330 |         context.void_type().fn_type(&params, false)
    |                                     ^^^^^^^ expected slice, found struct `Vec`
    |
    = note: expected reference `&[BasicMetadataTypeEnum<'_>]`
               found reference `&Vec<BasicTypeEnum<'_>>`

error[E0308]: mismatched types
   --> nac3core/src/codegen/mod.rs:333:22
    |
333 |             .fn_type(&params, false)
    |                      ^^^^^^^ expected slice, found struct `Vec`
    |
    = note: expected reference `&[BasicMetadataTypeEnum<'_>]`
               found reference `&Vec<BasicTypeEnum<'_>>`

error[E0308]: mismatched types
   --> nac3core/src/codegen/expr.rs:348:41
    |
348 |             ctx.ctx.void_type().fn_type(&params, false)
    |                                         ^^^^^^^ expected slice, found struct `Vec`
    |
    = note: expected reference `&[BasicMetadataTypeEnum<'_>]`
               found reference `&Vec<BasicTypeEnum<'_>>`

error[E0308]: mismatched types
   --> nac3core/src/codegen/expr.rs:350:50
    |
350 |             ctx.get_llvm_type(fun.0.ret).fn_type(&params, false)
    |                                                  ^^^^^^^ expected slice, found struct `Vec`
    |
    = note: expected reference `&[BasicMetadataTypeEnum<'_>]`
               found reference `&Vec<BasicTypeEnum<'_>>`

error[E0308]: mismatched types
   --> nac3core/src/codegen/expr.rs:368:37
    |
368 |     ctx.builder.build_call(fun_val, &params, "call").try_as_basic_value().left()
    |                                     ^^^^^^^ expected slice, found struct `Vec`
    |
    = note: expected reference `&[BasicMetadataValueEnum<'_>]`
               found reference `&Vec<BasicValueEnum<'_>>`

error[E0308]: mismatched types
   --> nac3core/src/toplevel/composer.rs:248:60
    |
248 | ...                   .build_call(round_intrinsic, &[arg], "round")
    |                                                      ^^^ expected enum `BasicMetadataValueEnum`, found enum `BasicValueEnum`

error[E0308]: mismatched types
   --> nac3core/src/toplevel/composer.rs:285:60
    |
285 | ...                   .build_call(round_intrinsic, &[arg], "round")
    |                                                      ^^^ expected enum `BasicMetadataValueEnum`, found enum `BasicValueEnum`
Updating inkwell causes this: ```text error[E0308]: mismatched types --> nac3core/src/codegen/mod.rs:330:37 | 330 | context.void_type().fn_type(&params, false) | ^^^^^^^ expected slice, found struct `Vec` | = note: expected reference `&[BasicMetadataTypeEnum<'_>]` found reference `&Vec<BasicTypeEnum<'_>>` error[E0308]: mismatched types --> nac3core/src/codegen/mod.rs:333:22 | 333 | .fn_type(&params, false) | ^^^^^^^ expected slice, found struct `Vec` | = note: expected reference `&[BasicMetadataTypeEnum<'_>]` found reference `&Vec<BasicTypeEnum<'_>>` error[E0308]: mismatched types --> nac3core/src/codegen/expr.rs:348:41 | 348 | ctx.ctx.void_type().fn_type(&params, false) | ^^^^^^^ expected slice, found struct `Vec` | = note: expected reference `&[BasicMetadataTypeEnum<'_>]` found reference `&Vec<BasicTypeEnum<'_>>` error[E0308]: mismatched types --> nac3core/src/codegen/expr.rs:350:50 | 350 | ctx.get_llvm_type(fun.0.ret).fn_type(&params, false) | ^^^^^^^ expected slice, found struct `Vec` | = note: expected reference `&[BasicMetadataTypeEnum<'_>]` found reference `&Vec<BasicTypeEnum<'_>>` error[E0308]: mismatched types --> nac3core/src/codegen/expr.rs:368:37 | 368 | ctx.builder.build_call(fun_val, &params, "call").try_as_basic_value().left() | ^^^^^^^ expected slice, found struct `Vec` | = note: expected reference `&[BasicMetadataValueEnum<'_>]` found reference `&Vec<BasicValueEnum<'_>>` error[E0308]: mismatched types --> nac3core/src/toplevel/composer.rs:248:60 | 248 | ... .build_call(round_intrinsic, &[arg], "round") | ^^^ expected enum `BasicMetadataValueEnum`, found enum `BasicValueEnum` error[E0308]: mismatched types --> nac3core/src/toplevel/composer.rs:285:60 | 285 | ... .build_call(round_intrinsic, &[arg], "round") | ^^^ expected enum `BasicMetadataValueEnum`, found enum `BasicValueEnum` ```
sb10q added the
low-priority
label 2021-11-02 14:23:34 +08:00
Contributor

Please be aware that we may make breaking changes on master from time to time since we are pre-v1.0.0, in compliance with semver

I think we can leave it for now? They will introduce breaking changes frequently and may not worth the effort to track their master branch.

> Please be aware that we may make breaking changes on master from time to time since we are pre-v1.0.0, in compliance with semver I think we can leave it for now? They will introduce breaking changes frequently and may not worth the effort to track their master branch.
Author
Owner

If we can use a crates.io version, we aren't hit by the nixpkgs cargoLock bug and we can remove the hash from flake.nix.

If we can use a crates.io version, we aren't hit by the [nixpkgs cargoLock bug](https://github.com/NixOS/nixpkgs/issues/144195) and we can remove the hash from flake.nix.
sb10q referenced this issue from a commit 2021-12-25 22:17:10 +08:00
sb10q closed this issue 2021-12-25 22:17:10 +08:00
Author
Owner

It wasn't that hard...

It wasn't that hard...
ychenfo referenced this issue from a commit 2021-12-27 16:57:43 +08:00
Sign in to join this conversation.
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: M-Labs/nac3#67
No description provided.