Commit Graph

361 Commits

Author SHA1 Message Date
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
rvcas
437a95bfe8 fix: behave like rust with hyphens closes #722 closes #690 2023-08-31 18:00:21 -04:00
microproofs
baa6917af5 Fix: Change type map length assert to check for greater than equals instead of equals to argument length 2023-08-29 21:59:15 -04:00
microproofs
084b900b2a change: traverse_with_tree now has a boolean to determine when with is called
fix: Opaque types are now properly handled in code gen (i.e. code gen functions, in datums/redeemers, in from data casts)
chore: add specific nested opaque type tests to code gen
2023-08-19 20:07:37 -04:00
KtorZ
c1b8040ae2 Add helper for splitting a long line into multiple lines. 2023-08-19 13:39:39 -04:00
KtorZ
961e323c36 Enable iterating over validator's parameters with a callback
This is how we'll construct parameters interactively. We need to lookup the definition, and provide a data representation for it.
2023-08-19 13:39:39 -04:00
Ariady Putra
8cf92ce8ed aiken new: Try to get the latest tag of stdlib 2023-08-16 22:30:15 -04:00
microproofs
c95f43ae07 add one more test 2023-08-16 21:59:25 -04:00
microproofs
20aa54b5ca fix: last test fixed 2023-08-16 21:59:25 -04:00
microproofs
2456801b17 fix list clauses with guards and add more tests 2023-08-16 21:59:25 -04:00
rvcas
6ecb3f08b0 chore: default stdlib on new is 1.5.0 2023-08-16 13:24:10 -04:00
microproofs
eda388fb29 test(aiken-lang): add a new test for list edge case in when clause patterns 2023-08-08 20:47:35 -04:00
microproofs
367dabafb5 fix: update last 2 tests for new recursion optimization 2023-08-07 19:06:00 -04:00
Pi Lanningham
f464eb3702 Cargo fmt + clippy, with latest rust 2023-08-07 19:00:39 -04:00
microproofs
90c7753201 update tests for new recursion optmization 2023-08-07 19:00:39 -04:00
microproofs
1d9878c5ee fix: code gen tests now up to date using trace
fix: Formatter should take ErrorTerm and return "fail"
fix: fail with no reason should just return ErrorTerm
2023-08-07 12:02:44 -04:00
microproofs
624fdee9ea keep traces in tests 2023-08-07 12:02:44 -04:00
microproofs
36c80f36c1 fix tests 2023-08-07 12:02:44 -04:00
microproofs
49a0a91103 fix tests again 2023-08-07 12:02:44 -04:00
microproofs
5aecb96668 constants are back. I had broke them when switching how data casting works 2023-08-07 12:02:44 -04:00
microproofs
4e3ced5b75 fix and clean up tests and handle
one edge case on rearrange clauses
2023-08-07 12:02:44 -04:00
microproofs
018453f6b1 fix expect on tuple type using the wrong internal type 2023-08-07 12:02:44 -04:00
microproofs
f03ed41e03 fix some unnecessary lambdas in assign 2023-08-07 12:02:44 -04:00
microproofs
03dd13dc7d fixing list condition edge cases and clean up rearrange list clauses 2023-08-07 12:02:44 -04:00
microproofs
58b327e5b3 fixing bugs and edge cases 2023-08-07 12:02:44 -04:00
microproofs
55dd1a1a56 out with the old code and in with the air tree 2023-08-07 12:02:44 -04:00
microproofs
5bcc425f0f feat: changed air expressions clause guard
and list clause guard to air statements
2023-08-07 12:02:44 -04:00
rvcas
be7a441205 fix(uplc): pair type formatting closes #680 2023-07-19 13:49:05 -04:00
rvcas
e7c1b28b52 feat: add ability to reference validators in tests closes #632 2023-07-12 18:29:03 -04:00
rvcas
1ab1ff9a1f feat: rename error to fail 2023-07-12 09:16:37 -04:00
rvcas
01be548752 chore: update stdlib version in new command relates to #672 2023-07-10 07:36:31 -04:00
rvcas
8a7df7f66b test: add empty list test 2023-07-04 17:19:29 -04:00
Pi Lanningham
c10f0e53df cargo fmt 2023-07-01 16:17:10 -04:00
Pi Lanningham
4a8cb72708 Add a blueprint policy command
Computes the policy ID of a minting policy; added guards for blueprint address to check that it's not a minting policy; Wasn't 100% sure where the errors should live, so I'm happy to move them if there's objections
2023-07-01 16:17:10 -04:00
rvcas
619b73d03e feat: enhance new command 2023-06-23 19:40:11 -04:00
microproofs
db369da96e feat: Make traces produced by expect dependent on
the value of the tracing flag.
2023-06-23 14:03:23 -04:00
microproofs
e1f788b628 chore: commit tests first 2023-06-19 21:43:38 -04:00
microproofs
e72a9f8e0b chore: rearrange code gen test order 2023-06-14 13:12:49 -04:00
microproofs
1e0f7ea0ab fix: foldl test 2023-06-13 12:03:38 -04:00
microproofs
af36b5ac77 fixes:
fix: Issue where using var pattern in a when was passing the constr index instead of the constr
fix: Issue where expecting on a list had unexpected behaviors based on list length
2023-06-13 12:03:38 -04:00
rvcas
8d107b1293 fix(build): --uplc must use Program<Name> to pretty print 2023-06-07 16:25:59 -04:00
rvcas
cf6d04e95b chore: some clippy warnings 2023-06-02 19:47:52 -04:00
rvcas
9c29f4f26b fix: blueprints gen failing on List
closes #569

* added new methods to Definitions
  it doesn't use expect
* lookup was failing for the special map/pair case
  when resolving list generics

Co-authored-by: Pi <pi@sundaeswap.finance>
2023-06-02 17:53:10 -04:00
microproofs
6609ab335c chore: add another test for field destructuring in a list 2023-06-02 13:00:09 -04:00
microproofs
6955f79035 chore: update changelog
fix: Minor improvement to record update to use empty list instead of the null list from a record fields list.
2023-06-01 12:22:42 -04:00
microproofs
deee50b77e fix: just change as_key
Co-authored-by: Lucas Rosa <x@rvcas.dev>
2023-05-31 00:27:31 -04:00