1
1
mirror of https://github.com/anoma/juvix.git synced 2024-11-30 14:13:27 +03:00
juvix/tests
Paul Cadman 76d69b5ef3
Add juvix dependencies update command (#2419)
This PR adds a new command `juvix dependencies update` that fetches all
dependencies in a project and updates the project lock file.

Currently the only way to update the lock file is to delete it and
generate a new one.

## CLI Docs

```
juvix dependencies --help
Usage: juvix dependencies COMMAND

  Subcommands related to dependencies

Available options:
  -h,--help                Show this help text

Available commands:
  update                   Fetch package dependencies and update the lock file
```

## Example

A project containing the following `juvix.yaml`

```yaml
dependencies:
  - .juvix-build/stdlib/
  - git:
      url: https://github.com/anoma/juvix-test
      ref: v0.6.0
      name: test
main: Example.juvix
name: example
version: 1.0.0
```

compile to generate the lockfile: `juvix compile`

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

dependencies:
- path: .juvix-build/stdlib/
  dependencies: []
- git:
    name: test
    ref: a94c61749678ff57556ee6e4cb1f8fbbddbc4ab1
    url: https://github.com/anoma/juvix-test
  dependencies:
  - git:
      name: stdlib
      ref: 4facf14d9b2d06b81ce1be1882aa9050f768cb45
      url: https://github.com/anoma/juvix-stdlib
    dependencies: []
```

Now update the test dependency version:

```yaml
- .juvix-build/stdlib/
- git:
   url: https://github.com/anoma/juvix-test
   ref: v0.6.1
   name: test
main: Example.juvix
name: example
version: 1.0.0
```

And run `juvix dependencies update`

Now the lockfile has updated to the hash of v0.6.1:

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

dependencies:
- path: .juvix-build/stdlib/
  dependencies: []
- git:
    name: test
    ref: a7ac74cac0db92e0b5e349f279d797c3788cdfdd
    url: https://github.com/anoma/juvix-test
  dependencies:
  - git:
      name: stdlib
      ref: 4facf14d9b2d06b81ce1be1882aa9050f768cb45
      url: https://github.com/anoma/juvix-stdlib
    dependencies: []
```

---------

Co-authored-by: Jonathan Cubides <jonathan.cubides@uib.no>
2023-10-03 18:09:13 +02:00
..
Asm New compilation pipeline (#1832) 2023-03-14 16:24:07 +01:00
benchmark Add Partial trait (#2409) 2023-10-02 15:14:40 +02:00
Compilation Add Partial trait (#2409) 2023-10-02 15:14:40 +02:00
Core Fold lets when the bound variable occurs at most once (#2231) 2023-06-29 13:02:10 +02:00
examplesExpected Add a test suite for milestone examples (#1920) 2023-03-24 13:16:26 +00:00
Geb/positive Remove old function syntax (#2305) 2023-08-24 16:24:47 +02:00
Internal Add new case syntax (#2353) 2023-09-13 11:58:08 +01:00
negative Allow open statements in let expressions (#2395) 2023-10-02 23:13:45 +02:00
positive Allow open statements in let expressions (#2395) 2023-10-02 23:13:45 +02:00
runtime/positive Improve closure calls in the runtime (#2396) 2023-09-29 14:20:00 +02:00
smoke/Commands Add juvix dependencies update command (#2419) 2023-10-03 18:09:13 +02:00
VampIR Update pre-commit to check JSON formatting (#2400) 2023-09-28 14:55:35 +02:00
.gitattributes Juvix C runtime (#1580) 2022-11-03 09:38:09 +01:00