Commit Graph

106 Commits

Author SHA1 Message Date
KtorZ
10c1b46bf7 Bump minimum rust version everywhere to 1.70.0 2024-11-13 19:38:57 +01:00
KtorZ
93d0191489 Fix latest clippy warnings. 2024-10-25 11:27:28 +02:00
microproofs
a7741ec286 chore: Release 2024-10-19 13:45:54 -04:00
microproofs
356d845a9a chore: Release 2024-10-01 16:14:25 -04:00
KtorZ
51b6b77db8 Build LSP projects with verbose tracing level
Without that, the language server might trigger awkward warnings about
  unused imports due to trace stripping. So it's better to compile/check
  projects in the language server in the most expanded form.
2024-10-01 16:12:41 +02:00
microproofs
3d77b5c378 chore: Release 2024-09-20 14:05:15 -04:00
microproofs
7047c7720e chore: Release 2024-09-13 16:52:20 -04:00
KtorZ
0905146140 chore: Release 2024-09-10 13:25:04 +02:00
Riley-Kilgore
5879dcfd4c Fix import completions 2024-09-09 12:52:56 -04:00
rvcas
be31a7ce38 chore: Release 2024-09-03 17:01:41 -04:00
rvcas
20ac89fc33 chore: reset version 2024-09-03 17:01:24 -04:00
KtorZ
c21466831c Bump versions to 1.1.0, in anticipation. 2024-08-29 09:12:37 +02:00
KtorZ
e31c6de04e Adjust module organization to facilitate resurrection of the playground.
The playground doesn't / cannot depend on aiken-project because that becomes a gigantic pain. So instead, we try to keep essential stuff inside aiken-lang when possible.
2024-08-29 09:12:37 +02:00
KtorZ
91e0e2493a Provide better errors on unknown type in cyclic definitions.
Let's consider the following case:

  ```
  type Var =
    Integer

  type Vars =
    List<Var>
  ```

  This incorrectly reports an infinite cycle; due to the inability to
  properly type-check `Var` which is also a dependent var of `Vars`. Yet
  the real issue here being that `Integer` is an unknown type.

  This commit also upgrades miette to 7.2.0, so that we can also display
  a better error output when the problem is actually a cycle.
2024-08-06 19:24:48 +02:00
Matthias Benkort
e6bb13def6 Merge pull request #994 from aiken-lang/conditional-modules
Conditional configuration & environment
2024-08-06 09:05:11 +02:00
Riley-Kilgore
5160ab49de Use char instead of str 2024-08-05 16:27:37 -04:00
Riley-Kilgore
9296516f5a Fixed hyphen in filename breaking LSP 2024-08-05 16:27:37 -04:00
KtorZ
fbe2f82582 Thread down environment module from cli down to the type-checker
We simply provide a flag with a free-form output which acts as
  the module to lookup in the 'env' folder. The strategy is to replace
  the environment module name on-the-fly when a user tries to import
  'env'.

  If the environment isn't found, an 'UnknownModule' error is raised
  (which I will slightly adjust in a following commits to something more
  related to environment)

  There are few important consequences to this design which may not seem
  immediately obvious:

  1. We parse and type-check every env modules, even if they aren't
     used. This ensures that code doesn't break with a compilation error
     simply because people forgot to type-check a given env.

     Note that compilation could still fail because the env module
     itself could provide an invalid API. So it only prevents each
     modules to be independently wrong when taken in isolation.

  2. Technically, this also means that one can import env modules in
     other env modules by their names. I don't know if it's a good or
     bad idea at this point but it doesn't really do any wrong;
     dependencies and cycles are handlded all-the-same.
2024-08-04 10:27:32 +02:00
KtorZ
f14dfdf8e1 Allow pattern-matching on bytearrays
- Doesn't allow pattern-matching on G1/G2 elements and strings,
    because the use cases for those is unclear and it adds complexity to
    the feature.

  - We still _parse_ patterns on G1/G2 elements and strings, but emit an
    error in those cases.

  - The syntax is the same as for bytearray literals (i.e. supports hex,
    utf-8 strings or plain arrays of bytes).
2024-08-03 13:51:36 +02:00
rvcas
4645fd3e28 chore: Release 2024-07-25 08:28:15 -04:00
KtorZ
49190b485a chore: Release 2024-07-25 09:58:06 +02:00
KtorZ
216dab99d4 chore: Release 2024-06-06 11:19:34 +02:00
KtorZ
2070576e46 New LSP quickfix for 'use let' warning. 2024-05-30 19:30:41 +02:00
rvcas
338fc0eba6 chore: Release 2024-05-23 16:45:10 -04:00
rvcas
ff50d4d2cf chore: Release 2024-05-23 16:23:59 -04:00
rvcas
7c5b9aa35e feat(lsp): find_node for TypedArgVia 2024-04-02 19:22:19 -04:00
rvcas
075668b52e chore: Release 2024-03-25 22:09:37 -04:00
KtorZ
4e8042fd06 chore: Release 2024-03-22 16:10:17 +01:00
KtorZ
22b86a5f82 Add --max-success for running more or less prop runs on demand. 2024-03-09 19:17:57 +01:00
KtorZ
a578728a94 Resolve type aliases based on inferred types.
Before this commit, we would always show the 'declared form' of type aliases, with their generic, non-instantiated parameters. This now tries to unify the annotation with the underlying inferred type to provide even better alias pretty printing.
2024-03-08 16:01:21 +01:00
KtorZ
7a2537432a Accept an optional --seed parameter for check, otherwise default to random.
Also, show the seed on failure.
2024-03-03 20:36:01 +01:00
microproofs
982eff449e chore: Release 2024-01-31 13:48:20 -05:00
microproofs
8584adc1b7 chore: Release 2024-01-25 15:10:11 -05:00
rvcas
defd36ad8c chore: Release 2024-01-25 11:07:32 -05:00
KtorZ
627c6b576e Move line_numbers under 'aiken-lang'
And add some unit tests to ensure things are working properly.
2024-01-19 14:30:15 +01:00
KtorZ
d27ea98a8f Rework tracing arguments to --keep-traces & --trace-level
This allows for a more fine-grained control over how the traces are showed. Now users can instrument the compiler to preserve only their user-defined traces, or the only the compiler, or all, or none. We also want to add another trace level on top of that: 'compact' to only show line numbers; which will work for both user-defined and/or compiler-generated traces.
2024-01-19 14:30:15 +01:00
microproofs
86146ae7f4 adding codegen traces 2024-01-19 14:30:14 +01:00
rvcas
2647e4aae6 chore: Release 2023-12-04 22:14:03 -05:00
rvcas
1503b525b2 feat(lsp): implement quickfix for utf8 byte array is valid hex string warning 2023-11-28 21:02:15 -05:00
rvcas
858a9621fc fix: due to how error code now get printed match_code for quickfix was always false 2023-11-28 21:00:17 -05:00
rvcas
2dab62857f chore: useless rebinding 2023-11-28 19:46:08 -05:00
rvcas
f7dd2de17b feat: implement hover info for tuple, list, and contructor pattern elements 2023-11-28 16:12:37 -05:00
microproofs
49bd4ba33d chore: Release 2023-10-25 19:00:03 -04:00
KtorZ
46c58dbd61 Implement quickfixes for redundant imports. 2023-10-22 00:29:09 +02:00
KtorZ
5f8e256050 Present aiken-lsp & fill-in CHANGELOG 2023-10-21 21:39:30 +02:00
KtorZ
c0513da032 Add quickfix for unknown constructors. 2023-10-21 14:24:47 +02:00
KtorZ
5986163ba7 Add quickfix for unknown alias & data types. 2023-10-21 13:57:06 +02:00
KtorZ
d965467a53 Fix insertion of unqualified import when first
I previously missed a case and it causes qualified imports to be added at the end if they are lexicographically smaller than ALL other qualified imports. No big deal, but this is now fixed.
2023-10-21 13:56:15 +02:00
KtorZ
c550b4766d Implement quickfix for 'UnknownModule'. 2023-10-21 12:59:48 +02:00
KtorZ
e48ac6b592 Relocate and refactor quickfix code into its own module
We're going to have more quickfixes, to it's best not to overload the
  'server' module. Plus, there's a lot of boilerplate around the
  quickfixes so we might want to factor it out.
2023-10-21 12:00:58 +02:00