1
1
mirror of https://github.com/anoma/juvix.git synced 2024-12-02 10:47:32 +03:00
Commit Graph

125 Commits

Author SHA1 Message Date
Paul Cadman
2b2c8abb25
Use tagged version of ghc-musl in static linux build (#3170)
The issue with alpine ncurses packaging has been fixed upstream and the
ghc-musl containers have been rebuilt. Therefore we can resume using the
tagged releases of the ghc-musl container.

https://github.com/benz0li/ghc-musl/issues/10

Thanks @benz0li for help with diagnosing and fixing this issue.

Co-authored-by: Olivier Benz <olivier.benz@b-data.ch>
2024-11-13 19:17:48 +01:00
Jan Mas Rovira
ca56b6b0cd
Support traces in the anoma node (#3152)
This pr adds support for getting traces from the anoma node.
I've updated the test suite so that tests that were disabled because of
traces are now being run.
There are a few tests that require atention:
1. `test028`: Gives the wrong answer.
2. `test084`: Gives the wrong answer.
4. `test074`: Expected to fail because it uses scry.
5. `test086`: Expected to fail because Anoma representation of prngs is
different than the juvix representation.
2024-11-08 11:54:17 +00:00
Jan Mas Rovira
4cdcb2f747
Add anoma nockma tests (#3134)
* Fixes a bug in calling Anoma stdlib from Nock code
* Runs the anoma compilation test with the anoma node nockma evaluator.

I've classified the tests in 4 categories:
1. `Working`. The test works as expected.
2. `Trace`. We need more work on our end to get the traces from the
anoma node and check that they match the expected result.
3. `NodeError`. The anoma node returns `failed to prove the nock
program`.
4. `Wrong`. The anoma node returns some value that does not match the
expected value.

---------

Co-authored-by: Lukasz Czajka <lukasz@heliax.dev>
Co-authored-by: Łukasz Czajka <62751+lukaszcz@users.noreply.github.com>
Co-authored-by: Paul Cadman <git@paulcadman.dev>
2024-11-05 13:28:28 +00:00
Paul Cadman
23837ed745
Fix linux static build by pinning ghc-musl container version (#3132)
The linux nightly build stopped working on 2024-10-22 after the
ghc-musl:9.8.2 image was rebuilt.

With the following error:

```
Preprocessing executable 'juvix' for juvix-0.6.6..
Building executable 'juvix' for juvix-0.6.6..
[  1 of 199] Compiling Commands.Extra.Package
[  2 of 199] Compiling CommonOptions

<no location info>: error:
    Error loading shared library -lncursesw: No such file or directory
```

I've fixed this by pinning the container image using the container hash
from before the failure. We must use the `docker.io` repository because
`quay.io` does not seem to store old manifest files.

The linux nightly build is now working after this change:


https://github.com/anoma/juvix-nightly-builds/actions/runs/11579013347/job/32234216197
2024-10-29 19:58:00 +00:00
Łukasz Czajka
ddca867871
Remove VampIR from the CI (#3126) 2024-10-24 20:18:50 +02:00
Łukasz Czajka
038931ac6c
Fix RISC0 on the CI (#3061)
It seems that whenever a new major version of `cargo-risczero` becomes
available, the CI needs to be updated to install this version.
2024-09-26 13:30:04 +02:00
Paul Cadman
0d18294fce
Revert GHC 9.10.1 update (#3052)
We cannot build linux static binaries with GHC 9.10.1:

* https://github.com/anoma/juvix/issues/3037

This PR reverts the GHC update to unblock Juvix releases / nightly
releases. We can try the update again when stackage nightly updates to
GHC 9.10.1.
2024-09-19 21:02:43 +01:00
Paul Cadman
ef0bc6efb8
Update linux static binary workflow for GHC 9.10.1 (#3034)
This PR updates the GHC version and the stack version in the linux
static binary GitHub workflow. This is used to make Juvix linux binary
releases.

NB: The linux binary releases of stack no longer have the `-static`
suffix in the tar filename.
2024-09-13 17:52:51 +02:00
Łukasz Czajka
87adaf4512
Update to GHC 9.10.1 (#2991)
Since GHC 9.8.2 has a bug which blocks our development (see
https://github.com/anoma/juvix/pull/2977#issuecomment-2325866056), I
made a PR to update to GHC 9.10.1. Because stackage doesn't yet support
GHC 9.10.1, I had to add some explicit dependencies and use
`allow-newer-deps` in `stack.yaml`.

I think we should merge this not to get blocked by the bug, and later
clean up `stack.yaml` when GHC 9.10.1 becomes supported on stackage.

---------

Co-authored-by: Paul Cadman <git@paulcadman.dev>
2024-09-13 15:26:43 +02:00
Łukasz Czajka
c1774ffb76
Fix RISC0 in the CI (#3025) 2024-09-12 12:29:23 +02:00
Łukasz Czajka
5d0aa6ea54
Fix RISC0 compilation on the CI (#3015) 2024-09-10 17:17:00 +02:00
Jan Mas Rovira
3609b213f6
Use ormolu from stackage in the CI (#2900)
1. Adds the command `just format check`, which checks that all Haskell
files are formatted.
2. In CI, we use install ormolu from stackage and run it. This will
facilitate consistency between CI and local setups.

---------

Co-authored-by: Paul Cadman <git@paulcadman.dev>
2024-07-19 09:38:39 +01:00
Łukasz Czajka
1777251fde
Fix CI for RISC0 version 1.0.2 (#2888)
This PR updates the version of `cargo-risczero` in the CI. Ultimately,
we should figure out how to properly pin a fixed version, but apparently
that's not easy - it seems some dependencies need to be pinned and it's
not clear which ones, how, and to which versions. The problem is that to
execute the Rust code generated for RISC0 we need to compile it, and the
generated code depends on some RISC0-related libraries. Having the
correct version of the RISC0 Rust toolchain installed locally doesn't
fully solve the problem (doesn't seem to automatically select the right
versions of dependencies).
2024-07-12 13:36:48 +02:00
Łukasz Czajka
c963df7f5f
Cairo: untagged record representation (#2853)
* Closes #2722 
* Omits the header (tag) field from in-memory record representation in
Cairo
* Requires updating
[juvix-cairo-vm](https://github.com/anoma/juvix-cairo-vm): depends on
https://github.com/anoma/juvix-cairo-vm/pull/8
2024-06-25 10:29:39 +02:00
Łukasz Czajka
235d88f303
Copy propagation in JuvixReg (#2828)
* Closes #1614 
* Implements the copy propagation transformation in JuvixReg and adds
tests for it.
* For this optimization to give any improvement, we need to run dead
code elimination afterwards (#2827).
2024-06-18 21:38:02 +02:00
Łukasz Czajka
e2a6344f29
Fix Rust toolchain caching (#2825)
Fixes the error in the Rust toolchain caching by setting
`cache-on-failure` to false for the `setup-rust-toolchain` action.
2024-06-13 13:23:35 +02:00
Łukasz Czajka
84101536bf
Cairo: Support complex data types in program input (#2822)
* Types of arguments to `main` can now be field elements, numbers,
booleans and (nested) records and lists.
* Type of `main` result can now be a record of field elements, numbers
and booleans. Lists or nested records are not allowed for the result.
* Adds checks for the type of `main` in the Cairo pipeline.
* Requires updating
[juvix-cairo-vm](https://github.com/anoma/juvix-cairo-vm). The input can
be provided in a Json file via the `--program_input` option of
`juvix-cairo-vm`.
2024-06-13 12:37:01 +02:00
Jan Mas Rovira
6622d88c3b
Upgrade to ghc-9.8.2 (#2794)
haskell lsp 2.8.0.0 (available in ghc-up) is compatible with ghc-9.8.2.
I had to do some renaming in order to avoid shadowing.
2024-06-08 14:43:33 +02:00
Łukasz Czajka
346a48d55b
Disable macOS CI (#2821)
It's failing because of rate limits exceeded when installing RISC0 VM.
We should disable the macOS CI until we figure out how to reliably get
around this problem.
2024-06-08 10:52:29 +02:00
Łukasz Czajka
a4f551547b
RISC0 Rust backend (#2792)
* Adds a RISC0 backend which generates Rust code that can be compiled
with the official RISC0 toolchain.
* The RISC0 backend is a wrapper around the Rust backend.
* Adds the `risc0-rust` to the `compile` CLI command, which creates a
directory containing host and guest Rust sources for the RISC0 zkVM. The
generated code can be compiled/run using `cargo` from inside the created
directory (requires having RISC0 installed:
https://dev.risczero.com/api/zkvm/install).
2024-06-07 07:57:27 +02:00
Paul Cadman
d233bbd704 Install cargo in static binary build
This is now required by the runtime build target
2024-05-23 13:53:28 +01:00
Łukasz Czajka
7e737d7037
Rust runtime (#2782)
* Closes #2781 
* This PR only implements the Rust runtime. The Rust backend / code
generation need to be implemented in a separate PR.
* The tests are unit tests for different modules and tests with
"manually" compiled Juvix programs.
* Adds building & testing of the Rust runtime to the CI.
2024-05-22 12:26:51 +02:00
Paul Cadman
47b3b199cf
justfile: replace enableOptimized flag with disableOptimized (#2783)
`just install` now builds the optimized binary by default.

use `just disableOptimized=yes install` to build the non-optimized
binary (with faster build time).
2024-05-15 12:54:50 +02:00
Paul Cadman
778b6267a4
Use aarch64 macOS agent for CI build (#2754)
This PR updates the macOS CI build to use the `macos-14` build agent.
This uses the M series aarch64 chips.

* The M1 macOS agent does not have stack preinstalled so we must install
it using brew before building anything.
* The cache keys must have the `runner.arch` prefix to avoid building
with the x86_64 cache.

The macOS build / test run in about the same time as the linux build /
test, i.e significantly faster than on the x86 macOS agents.

## Notes

* We use the x86_64 binary of vamp-ir because the vamp-ir aarch64
releases do not have names that are compatible with the GitHub action we
are using to download the binary releases. The x86_64 binary works fine
for the purposes of testing.
2024-04-25 17:40:02 +02:00
Łukasz Czajka
8b8f323bf1
Cairo Elliptic Curve builtin (#2731)
* Closes #2720 
* Depends on https://github.com/anoma/juvix-cairo-vm/pull/3. For proper
functioning, the latest version of `juvix-cairo-vm` needs to be
installed.
2024-04-22 14:24:09 +02:00
Paul Cadman
b0fb240219
Use the justfile for CI builds (#2730)
This PR changes the CI build to use the justfile instead of the Makefile
to run builds and tests. CI builds now take advantage of parallel module
builds from https://github.com/anoma/juvix/pull/2729.

In order support this the runtime build target in the justfile now
supports `runtimeCcArg` and `runtimeLibtoolArg` so that the `CC` and
`LIBTOOL` Makefile argument can be set. This is required for the macOS
build.

In addition this PR upgrades the stack setup step action. Previously the
stack build flags included `--fast` which meant the whole project was
rebuilt in the `test` step, this has also been fixed.

Overall this speeds up the CI:
* Linux now takes 30mins (from 40mins)
* macOS now takes 60mins (from 80mins)
2024-04-18 12:52:37 +02:00
Łukasz Czajka
651875ec89
Support Cairo VM input hints (#2709)
* Closes #2687 
* Adds hint support in CASM. The supported hints are `Input(var)` and
`Alloc(size)`. These are the hints currently implemented in
[juvix-cairo-vm](https://github.com/anoma/juvix-cairo-vm).
* Adds the `--program_input` option to the `juvix dev casm run` command.
* Enables private inputs via `main` arguments. In generated CASM/Cairo
code, the arguments to `main` are fetched using the `Input` hint.
* Modifies the CI to use
[juvix-cairo-vm](https://github.com/anoma/juvix-cairo-vm)
2024-04-09 11:43:57 +02:00
Paul Cadman
d8e5f67c7a
Cache cairo-vm-cli in the CI build (#2707)
This PR modifies the CI manifest to cache the `cairo-vm-cli` executable
so we don't have to rebuild it on each run.

The ref of the cairo-vm repo is pinned to
`42e04161de82d7e5381258def4b65087c8944660` which is currently the HEAD
ref of the repository. This can be changed in the CI manifest by editing
the `CAIRO_VM_VERSION` variable. Doing so will trigger a rebuild of
`cairo-vm-cli`.
2024-03-28 18:32:36 +00:00
Łukasz Czajka
7d559b1f18
CASM serialization (#2679)
* Closes #2563 

Checklist
------------

- [x] Serialization of the Haskell CASM representation to the JSON
format accepted by the Cairo VM.
- [x] Add the `cairo` target to the `compile` commands.
- [x] Output via the Cairo `output` builtin.
- [x] Relativize jumps. Cairo VM doesn't actually support absolute
jumps.
- [x] Test the translation from CASM to Cairo by running the output in
the Cairo VM
- [x] Add Cairo VM to the CI
2024-03-26 17:18:52 +01:00
Paul Cadman
e3044c4fb1
Fix linux static binary build workflow (#2634)
The alpine abstract packages clang/llvm now meet minimum version
requirements in the Docker container we're using for the linux static
build.

The llvm package must now be installed separately to get the `llvm-ar`
tool.
2024-02-12 10:25:44 +00:00
Jan Mas Rovira
57bedc0d8c
Remove BangPattern pragmas (#2626)
`BangPatterns` is already enabled by
[`GHC2021`](https://ghc.gitlab.haskell.org/ghc/doc/users_guide/exts/control.html#extension-GHC2021),
so it makes sense to remove the pragmas and add the corresponding flag
to ormolu
2024-02-07 11:46:13 +00:00
Jan Mas Rovira
13f64afbc1
upgrade to Ghc 9.8.1 (#2624)
This PR updates the stackage LTS resolver to `nightly-2024-02-06` which
uses GHC 9.8.1

## Upgrade notes

You will need to update your HLS to
[2.6.0.0](https://github.com/haskell/haskell-language-server/releases/tag/2.6.0.0),
this release contains support for GHC 9.8.1

## Fixes

### `haskeline` / `repline`

We have removed the custom haskeline / repline forks used in the build.
This is because we had trouble overriding haskeline as it is bundled
with GHC and the stackage resolver uses this bundled version. We were
using a custom fork of haskeline to implement
[mapInputT_](15c0685c91/app/Commands/Repl.hs (L409))
in the Juvix REPL, required to implement error handling. This requires
private API from the Haskeline library.

Instead of using a custom fork we use TemplateHaskell to obtain access
to the private API we need. See
[DarkArts.hs](15c0685c91/src/Juvix/Prelude/DarkArts.hs)
and
[HaskelineJB.hs](15c0685c91/app/HaskelineJH.hs).

To obtain access to the private API, we adapted a method from [a Tweag
blogpost](https://www.tweag.io/blog/2021-01-07-haskell-dark-arts-part-i/)
and [repo](https://github.com/tweag/th-jailbreak) - updating it for GHC
9.8.1.

### `aeson-better-errors`

The `aeson-better-errors` library has not been updated to work with
`mtl-2.3.0` so it cannot work with the new stackage resolver. We are
using a [fork](https://github.com/Vekhir/aeson-better-errors.git) which
has been updated.

We should consider replacing this library in future, see
https://github.com/anoma/juvix/issues/2621

###  `path`

The `path` library now includes API `splitDrive` and `dropDrive` so we
can remove our versions of those functions from the prelude.

### `with-utf8`

We no longer need to depend on `with-utf8`. We were using this package
for UTF-8 versions of `readFile` and `writeFile` APIs. These APIs are
now available in the `text` package.

### Compiler warnings

GHC 9.8.1 introduces several new compiler warnings. 

* We have suppressed `missing-role-annotations` and
`missing-poly-kind-signatures`
* We added our own versions of `head` and `tail` to work around the new
`partial-tx` warning introduced for those functions in `Data.List`.
* We fixed up the code to avoid the
[term-variable-capture](https://ghc.gitlab.haskell.org/ghc/doc/users_guide/using-warnings.html#ghc-flag--Wterm-variable-capture)
warning.
2024-02-07 09:47:48 +00:00
Olivier Benz
5a878827f2
Use images from Quay (#2620)
I now mirror the *GHC musl* images to both Docker Hub and Quay:

* https://hub.docker.com/r/benz0li/ghc-musl
* https://quay.io/repository/benz0li/ghc-musl

Docker Hub imposes a rate limit. Quay, on the other hand, does not.

This also ensures the long-term availability of these images.
2024-02-05 11:42:07 +00:00
Jan Mas Rovira
39d176e643
Fast nockma eval (#2580)
Adds annotations to cells to indicate that it is a call to the stdlib
and might be evaluated faster in the Haskell evaluator.

The syntax for stdlib calls is as follows:
```
[stdlib@add args@<args-term> <left-term> <right-term>]
```
where `add` is the name of the function being called, `<args-term>` is a
nockma term that points to the position of the arguments, and
`<left-term>` and `<right-term>` are the actual components of the cell.
2024-01-19 12:01:58 +01:00
Paul Cadman
1c1a5b7117
Update the Juvix lock file when the Package file changes (#2522)
Adds a new version of the lock file that stores the hash (sha256 digest)
of the package file (Package.juvix, juvix.yaml) it was generated from as
a field:

```
# This file was autogenerated by Juvix version 0.5.4.
# Do not edit this file manually.

version: 2
checksum: d05940a4d3dc0e15451d02e1294819c875ba486ee54e26865ba8d190ac7c27c3
dependencies:
- git:
    name: stdlib
    ref: f68b0614ad695eaa13ead42f3466e0a78219f826
    url: https://github.com/anoma/juvix-stdlib.git
  dependencies: []
```

The lock file is regenerated when the hash of the package file doesn't
match the value of the `checksum` field, i.e when the user updates the
package file.

Existing lock files are automatically migrated to version 2.

* Closes https://github.com/anoma/juvix/issues/2464
2023-11-22 23:21:29 +01:00
Paul Cadman
7f009ce14c
Cache .hie directory in CI (#2490)
We use the options in `package.yaml`.

```
         - -fhide-source-paths
         - -fwrite-ide-info -hiedir=.hie
```
If a previously available .hie directory is missing then GHC will
rebuild the whole project with reason: `[HIE file is missing]`. So we
need to cache it to take advantage of incremental builds.
2023-11-01 14:15:53 +01:00
Paul Cadman
7a9b21a4f8
External package dependencies (#2272)
This PR adds external git dependency support to the Juvix package
format.

## New dependency Git item

You can now add a `git` block to the dependencies list:

```yaml
name: HelloWorld
main: HelloWorld.juvix
dependencies:
  - .juvix-build/stdlib
  - git:
      url: https://my.git.repo
      name: myGitRepo
      ref: main
version: 0.1.0
```

Git block required fields:
* `url`: The URL of the git repository
* `ref`: The git reference that should be checked out
* `name`: The name for the dependency. This is used to name the
directory of the clone, it is required. Perhaps we could come up with a
way to automatically name the clone directory. Current ideas are to
somehow encode the URL / ref combination or use a UUID. However there's
some value in having the clone directory named in a friendly way.

NB:
* The values of the `name` fields must be unique among the git blocks in
the dependencies list.

## Behaviour

When dependencies for a package are registered, at the beginning of the
compiler pipeline, all remote dependencies are processed:

1. If it doesn't already exist, the remote dependency is cloned to
`.juvix-build/deps/$name`
2. `git fetch` is run in the clone
3. `git checkout` at the specified `ref` is run in the clone

The clone is then processed by the PathResolver in the same way as path
dependencies.

NB:
* Remote dependencies of transitive dependencies are also processed.
* The `git fetch` step is required for the case where the remote is
updated. In this case we want the user to be able to update the `ref`
field.

## Errors

1. Missing fields in the Git dependency block are YAML parse errors
2. Duplicate `name` values in the dependencies list is an error thrown
when the package file is processed
3. The `ref` doesn't exist in the clone or the clone directory is
otherwise corrupt. An error with a suggestion to `juvix clean` is given.
The package file path is used as the location in the error message.
4. Other `git` command errors (command not found, etc.), a more verbose
error is given with the arguments that were passed to the git command.

## Future work

1. Add an offline mode
2. Add a lock file mechanism that resolves branch/tag git refs to commit
hashes

* closes https://github.com/anoma/juvix/issues/2083

---------

Co-authored-by: Jan Mas Rovira <janmasrovira@gmail.com>
2023-09-01 12:37:06 +01:00
Paul Cadman
227a51a56d
Install wasmer binary from Github releases (#2317)
The wasmerio/setup-wasmer action is causing failures on CI

e.g
https://github.com/anoma/juvix/actions/runs/5978292661/job/16220075597

This PR installs wasmer directly from GitHub releases instead.
2023-08-28 09:32:26 +02:00
Jan Mas Rovira
491f7f7508
Update ci to use ormolu 0.5.3.0 and reformat project (#2313)
Updates ormolu to 0.5.3.0 and formats the project
2023-08-25 17:37:23 +01:00
Paul Cadman
a167fee9d8
Fix shell variables in linux static build stack install (#2309) 2023-08-23 23:36:26 +01:00
Paul Cadman
06346d18de
Replace gitrev with githash for obtaining build-time git info (#2308)
This PR replaces [gitrev](https://hackage.haskell.org/package/gitrev)
with [githash](https://hackage.haskell.org/package/githash) which
provides more reliable git information about the current git info, it
seems to work as expected. githash originated as a fork of gitrev
containing fixes https://github.com/snoyberg/githash/issues/11

This PR also fixes the issue with git info detection in the linux static
build. There was a permission issue in the build container that caused
git cli calls to fail.

Closes:
* https://github.com/anoma/juvix/issues/2294
* https://github.com/anoma/juvix/issues/2130
2023-08-23 15:53:23 +01:00
Paul Cadman
46ab163ca7
Update stackage resolver to LTS 21.6 (#2275)
Stack LTS 21.6 uses GHC 9.4.5, binaries for HLS are available via ghcup.

Changes required:

1. Fix warnings about type level `:` and `[]` used without backticks.
2. Fix warnings about deprecation of builtin `~` - replaced with `import
Data.Type.Equality ( type (~) )` in the Prelude
3. SemVer is no longer a monoid
4. `path-io` now contains the `AnyPath` instances we were defining
(thanks to Jan) so they can be removed.
5. Added `aeson-better-errors-0.9.1.1` as an extra-dep. The reason it is
not part of the resolver is only because it has a strict bound on base
which is not compatible with ghc 9.4.5. To work around this I've set:

    ```
    allow-newer: true
    allow-newer-deps:
      - aeson-better-errors
    ```
which relaxed the upper constraint bounds for `aeson-better-errors`
only. When the base constraints have been updated we can remove this
workaround.

6. Use stack2cabal to generate the cabal.project file and to freeze
dependency versions.

    https://www.stackage.org/lts-21.6/cabal.config now contains the
constraint `haskeline installed`, which means that the version of
haskeline that is globally installed with GHC 9.4.5 will be used, see:
    * https://github.com/commercialhaskell/stackage/issues/7002
GHC 9.4.5 comes with haskeline 0.8.2 preinstalled but our configuration
contains the source-repository-package for haskeline 0.8.2.1 (required
because we're using a fork) so if you try to run` cabal build` you get a
conflict.

Constraints from cabal imports cannot yet be overridden so it's not
possible to get rid of this conflict using the import method. So we need
to use stack2cabal with an explicit freeze file instead.

7. Remove `runTempFilePure` as this is unused and depends on
`Polysemy.Fresh` in `polysemy-zoo` which is not available in the
resolver. It turns out that it's not possible to use the `Fresh` effect
in a pure context anyway, so it was not possible to use
`runTempFilePure` for its original purpose.

8. We now use https://github.com/benz0li/ghc-musl as the base container
for static linux builds, this means we don't need to maintain our own
Docker container for this purpose.

9. The PR for the nightly builds is ready
https://github.com/anoma/juvix-nightly-builds/pull/2, it should be
merged as soon as this PR is merged.

Thanks to @benz0li for maintaining https://github.com/benz0li/ghc-musl
and (along with @TravisCardwell) for help with building the static
binary.

* Closes https://github.com/anoma/juvix/issues/2166
2023-08-11 11:49:33 +02:00
Paul Cadman
1b30c75657
Build and cache smoke binary keyed using icu4c version (#2221)
This PR replaces fetching a precompiled binary of smoke with a
build/cache for macOS smoke tests on CI.

smoke dynamically links to icu4c, so a cached binary of smoke will break
when brew bumps the icu4c version. In this PR we use the icu4c version
in the cache key of the smoke build to avoid this issue.

NB: The smoke build cannot be done as a separate job because the smoke
binary must be built using exactly the same version of the macos-12
runner image as the smoke testing step to make sure that the icu4c
versions match.

Motivation for doing this is this failure:
https://github.com/anoma/juvix/actions/runs/5325094406/jobs/9645334642

which uses this release of the runner image
https://github.com/actions/runner-images/releases/tag/macOS-12%2F20230618.1

which contains the updated brew version of icu4c.

20230618.1 is currently a prerelease, but will start to run on more jobs
shortly.

```
2023-06-20T17:10:13.2222310Z Copied executables to /Users/runner/.local/bin:
2023-06-20T17:10:13.2223440Z - juvix
2023-06-20T17:10:13.5312790Z dyld[90256]: Library not loaded: '/usr/local/opt/icu4c/lib/libicuuc.72.dylib'
2023-06-20T17:10:13.5331930Z   Referenced from: '/Users/runner/hostedtoolcache/jonaprieto/smoke/latest/darwin-x64/smoke'
2023-06-20T17:10:13.5333610Z   Reason: tried: '/usr/local/opt/icu4c/lib/libicuuc.72.dylib' (no such file), '/usr/local/lib/libicuuc.72.dylib' (no such file), '/usr/lib/libicuuc.72.dylib' (no such file), '/usr/local/Cellar/icu4c/73.2/lib/libicuuc.72.dylib' (no such file), '/usr/local/lib/libicuuc.72.dylib' (no such file), '/usr/lib/libicuuc.72.dylib' (no such file)
2023-06-20T17:10:13.5334690Z make[1]: *** [smoke-only] Abort trap: 6
2023-06-20T17:10:13.5335310Z make: *** [smoke] Error 2
2023-06-20T17:10:13.5363170Z ##[error]Process completed with exit code 2.
```
2023-06-22 10:10:31 +02:00
Jonathan Cubides
812edea6a8
Update vamp-ir CI installation (#2199)
- Leveraging https://github.com/anoma/vamp-ir/pull/108
2023-06-16 14:29:31 +01:00
Jonathan Cubides
68ed1461ab
Add gnu-sed to the macOS build in the CI (#2123)
This PR installs the `gnu-sed` for the macOS build.
It can be called with the name `sed`, no `gsed`.

NB: The environmental variables set in one step are only reflected in
the subsequent steps.
2023-05-24 13:32:08 +01:00
Jonathan Cubides
2148d174f5
Add VampIR to the CI (#2096)
This PR:

- Makes `vamp-ir` available in the CI (pre-release 0.1.2)
- [Use a setup-wasmer action to install
`wasmer`](https://github.com/marketplace/actions/setup-wasmer)
- Fixes cache option value for `jaxxstorm/action-install-gh-release`'s
usages

Adds support for:

- #2103 


Related: 

- https://github.com/anoma/vamp-ir/issues/90

---------

Co-authored-by: Jan Mas Rovira <janmasrovira@gmail.com>
2023-05-22 19:49:36 +02:00
Jonathan Cubides
e2f2d0a2f4
Fix Makefile target bugs for formatting and type Checking Juvix files (#2057)
This PR resolves a few bugs in the Makefile targets for formatting and
type checking Juvix files, which were preventing the capture of type
checking errors for our examples and bad formatting for all the Juvix
files in the repository. With this PR, our code should now be clean, and
we can expect every file to be properly formatted and type checked.

Changes made:

- [x] Updated `make format-juvix-files`
- [x] Updated `make check-format-juvix-files`
- [x] Formatted all Juvix files
- [x] Comment a fragment in `examples/milestone/Bank/Bank.juvix`

In the future, we will drastically simplify the Makefile once we improve
the `format` and the `type check` command for example posted here:

- #2066 
- #2087 

Related:

- #2063 
- #2040 (due to some typechecking errors we're not capturing before)
- #2105
- https://github.com/anoma/juvix/issues/2059
2023-05-19 17:33:56 +02:00
Paul Cadman
ebeef381e6
ci: clean .juvix-build directory before formatting/typechecking examples (#2079)
Currently we typecheck and check formatting of juvix examples. However
the make target redundantly traverses the juvix files within the
.juvix-build directory contained in each project (which has been created
during previous tests).

This commit cleans the .juvix-build directories before performing each
of these checks.
2023-05-15 14:10:48 +02:00
Jonathan Cubides
d78a543c57
Bump to LTS Haskell 20.21 (ghc-9.2.7) (#2093)
This PR upgrades our Haskell configurations to compile with version
9.2.7. The checklist below can serve as a guide for similar future
updates:

- [x] Update Stack resolver in `stack.yaml`
- [x] Modify `tested-with` section in `package.yaml`
- [x] Build and push the new compiler docker image, see instructions
here
[docker/README.md](https://github.com/anoma/juvix/blob/main/docker/README.md):
`ghcr.io/paulcadman/ghc-alpine:9.2.7 container`.
- [x] Update Linux Github Action workflow in
`.github/workflows/linux-static-binary.yaml` and adjust
`docker/Dockerfile-ghc-alpine-9.2.7`
- [x] Revise GHC/Stack/Cabal versions in `.devcontainer/Dockerfile`
- [x] Refresh Cabal configuration in `cabal-project`
2023-05-15 12:06:18 +02:00
Jan Mas Rovira
aace4ca514
Fix pipeline setup in the repl (#2046)
This pr fixes a bug where the repl would crash if it had the implicit
stdlib dependency and the .juvix-build/stdlib directory did not yet
exist. This bug was not exposed in the smoke tests because the
.juvix-build was never cleared.

---------

Co-authored-by: Paul Cadman <git@paulcadman.dev>
2023-05-03 19:04:31 +01:00