Commit Graph

2713 Commits

Author SHA1 Message Date
microproofs 1bcc9e8524 fix: expect on tuples from data now checks for no more items after the last 2023-09-26 12:49:50 -04:00
microproofs 8e75007a5f changelog: remove accidental duplicated Fixed 2023-09-25 21:16:19 -04:00
microproofs 38d15c677f Update changelog 2023-09-25 21:16:19 -04:00
microproofs 1ca3499128 chore: rename type 2023-09-25 21:16:19 -04:00
microproofs eb0b4dd6d8 update lock files 2023-09-25 21:16:19 -04:00
microproofs b8737a1021 add one more test for unbound generics 2023-09-25 21:16:19 -04:00
microproofs 534eb62a07 fix: There was a stack overflow due to passing unbound types to a function 2023-09-25 21:16:19 -04:00
microproofs 1cab479b81 fix: dependency hoisting for cyclic functions
Add more tests
2023-09-25 21:16:19 -04:00
microproofs 2f80d07132 fix: minor stuff including fixing the var name used in modify_cyclic_calls
and carefully controling the functions we add to sorted dependencies
2023-09-25 21:16:19 -04:00
microproofs f4310bcf33 feat: finished up mutual recursion
Now we "handle" vars that call the cyclic function.
That includes vars in the cyclic function as well as in other functions
"handle" meaning we modify the var to be a call that takes in more arguments.
2023-09-25 21:16:19 -04:00
microproofs ae3053522e feat: Update cyclic functions to be aware of being in a cycle.
Finish the creation of cyclic functions
The last part is to update vars that call into a function in the cycle
2023-09-25 21:16:19 -04:00
microproofs 794fc93084 remove unused structs 2023-09-25 21:16:19 -04:00
microproofs 0b38855ce4 add new enum for hoistablefunctions 2023-09-25 21:16:19 -04:00
microproofs ced818c455 checkpoint commit 2023-09-25 21:16:19 -04:00
microproofs 0fb9837ddf chore: change UserFunction to HoistableFunction to prepare for mututal recursion 2023-09-25 21:16:19 -04:00
KtorZ 984237075a Add new acceptance test scenario: 066
Mutua recursion.
2023-09-25 21:16:19 -04:00
microproofs 74b8ab62b2 chore: add comments 2023-09-25 21:16:19 -04:00
microproofs a4aa51ed2d WIP: first part of mutual recursion is done.
This involves creating the function definition and detecting cycles.
The remaining part is to "fix" the call sites
of the mutually recursive functions
2023-09-25 21:16:19 -04:00
Chris Gianelloni ecc5769c64 fix: restore static binary builds
Signed-off-by: Chris Gianelloni <cgianelloni@applause.com>
2023-09-20 16:25:45 -04:00
microproofs 5b018b7c07 test: add a test around a tuple of constructors when with many conditions 2023-09-20 16:20:42 -04:00
rvcas 4ca8681ca0
chore: commit example lock files 2023-09-20 13:26:49 -04:00
rvcas 1ecdf38842
fix: release 2023-09-20 13:03:38 -04:00
KtorZ ee4001d2c8
chore: Release 2023-09-20 18:03:46 +02:00
KtorZ 91d4cb9b12
Fix a date in the CHANGELOG for 0.17.0 2023-09-20 18:02:39 +02:00
microproofs 4650c64f6b update changelog 2023-09-20 11:51:01 -04:00
KtorZ f379039efc
Fix record shorthand causing parsing ambiguity in if/else expressions.
Fixes #735.
2023-09-15 09:41:00 +02:00
rvcas 1dea348a2e
chore: rust rover error 2023-09-13 21:29:05 -04:00
rvcas 7b915b7dcf
chore: allow clippy::arc_with_non_send_sync in tests 2023-09-13 19:07:45 -04:00
rvcas d808197507
chore: clippy fix 2023-09-13 18:17:59 -04:00
rvcas bc0824f4eb
chore: new aiken.lock files for examples 2023-09-13 18:17:40 -04:00
rvcas 9a4f181a0f
chore: clippy fix 2023-09-13 17:19:31 -04:00
KtorZ 06347c3efa Add CHANGELOG entry. 2023-09-13 17:17:32 -04:00
KtorZ c711a97e69 Throttle calls to package registry for version resolution
The 'HEAD' call that is done to resolve package revisions from
  unpinned versions is already quite cheap, but it would still be better
  to avoid overloading Github with such calls; especially for users of a
  language-server that would compile on-the-fly very often. Upstream
  packages don't change often so there's no need to constantly check the
  etag.

  So we now keep a local version of etags that we fetched, as well as a
  timestamp from the last time we fetched them so that we only re-fetch
  them if more than an hour has elapsed. This should be fairly resilient
  while still massively improving the UX for people showing up after a
  day and trying to use latest 'main' features.

  This means that we now effectively have two caching levels:

  - In the manifest, we store previously fetched etags.
  - In the filesystem, we have a cache of already downloaded zip archives.

  The first cache is basically invalidated every hour, while the second
  cache is only invalidated when a etag changes. For pinned versions,
  nothing is invalidated as they are considered immutable.
2023-09-13 17:17:32 -04:00
KtorZ 15efeb3069 Remove unused code & data-type 'UseManifest'
If it's unused, it shall be gone. It obfuscate what functions are
  doing and require managing extra complexity for no reason.
2023-09-13 17:17:32 -04:00
KtorZ 5381762e50 Rework logs around dependency fetching. 2023-09-13 17:17:32 -04:00
KtorZ 76ff09ba0e Ensure that version resolution works offline
And so, even for unpinned package. In this case, we can't do a HEAD request. So we fallback by looking at what's available in the cache and using the most recently downloaded version from the cache. This is only a best effort as the most recently downloaded one may not be the actual latest. But common, this is a case where (a) someone didn't pin any version, (b) is trying to build on in an offline setup. We could possibly make that edge-case better but, let's see if anyone ever complains about it first.
2023-09-13 17:17:32 -04:00
KtorZ 87087a1811 Always check package status when version is not pinned
When the version isn't a git sha or a tag, we always check that we got
  the last version of a particular dependency before building. This is
  to avoid those awkward moments where someone try to use something from
  the stdlib that is brand new, and despite using 'main' they get a
  strange build failure regarding how it's not available.

  An important note is that we don't actually re-download the package
  when the case occurs; we merely check an HTTP ETag from a (cheap) 'HEAD'
  request on the package registry. If the tag hasn't changed then that
  means the local version is correct.

  The behavior is completely bypassed if the version is specified using
  a git sha or a tag, as here, we can assume that fetching it once it
  enough (and that it can change). If a package maintainer force-pushed
  a tag however, there may be discrepency and the only way around that
  is to `rm -r ./build`.
2023-09-13 17:17:32 -04:00
KtorZ 3c3a7f2423 Define 'is_git_sha_or_version' to assert whether a version is 'immutable'
Best-effort to assert whether a version refers is a git sha digest or a tag. When it is, we
avoid re-downloading it if it's already fetched. But when it isn't, and thus refer to a branch,
we always re-download it. Note however that the download might be short-circuited by the
system-wide package cache, so a download doesn't actually mean a network request.

The package cache is however smart-enough to assert whether a package in the cache must be
re-downloaded (using HTTP ETag). So this is mostly about delegating the re-downloading logic to
the global packages cache.
2023-09-13 17:17:32 -04:00
KtorZ 65fb3a640a Remove dead-code. 2023-09-13 17:17:32 -04:00
KtorZ a72628a4dc Auto-derive 'Debug' trait instance for types in deps
Actually useful to debug / troubleshoot things.
2023-09-13 17:17:32 -04:00
microproofs a45001376d fix: is_record was used incorrectly in code gen,
the real solution was to look up the datatype and check constructors length
2023-09-13 00:33:02 -04:00
microproofs d042d55d42 fix clippy warnings in code gen 2023-09-12 21:25:05 -04:00
KtorZ 9782c094b7
Fix clippy suggestions. 2023-09-08 16:21:07 +02:00
KtorZ 8ba5946c32
Preserve escape sequence after formatting
Bumped into this randomly. We do correctly parse escape sequence, but
  the format would simply but the unescaped string back on save. Now it
  properly re-escapes strings before flushing them back. I also removed
  the escape sequence for 'backspace' and 'new page' form feed as I
  don't see any use case for those in an Aiken program really...
2023-09-08 12:12:15 +02:00
KtorZ 5cfc3de7bf
Add CODEOWNERS 2023-09-08 10:21:33 +02:00
rvcas 6b70292dfb
chore: cargo fmt 2023-09-06 21:10:50 -04:00
rvcas 1de7b2866a
feat(cli): add --deny to build, check, and docs
This is useful for CI, where people that may have
a stricter workflow want to force CI to fail if any warnings
are detected.
2023-09-06 17:19:44 -04:00
microproofs 819a0a20e6 add tests for case and constr
Fix a minor issue with decoding order
2023-09-03 11:52:49 -04:00
microproofs c9b01ab365 chore: fill in cost model
test: Add case and constr eval tests
2023-09-03 11:52:49 -04:00
microproofs 85901dc141 chore: update cost model with placeholders for new terms to pass tests 2023-09-03 11:52:49 -04:00