1
1
mirror of https://github.com/anoma/juvix.git synced 2024-12-14 08:27:03 +03:00
juvix/app/Commands
janmasrovira 3d012cc8fb
Support more paths (#2000)
- Closes #1993 

This pr makes it possible to use `~`, `..` and environment variables in
the `juvix.yaml` and all flags / input of the cli.

In the CLI, the shell will be responsible for replacing environment
variables with their value, so the usual syntax can be used. For the
`dependencies` field, I have implemented a parser that has some
restrictions:
1. Environment variables are given with the makefile-like syntax
`$(VAR)`
2. The three characters `$` `(` `)` are reserved for the environment
variables syntax.
    They cannot be part of the path.
3. `~` is reserved for `$(HOME)`. I.e. the prepath `~~` will expand to
`$HOME$HOME`.
4. Nested environment variables are not allowed.

Thanks @paulcadman for the feedback. I think we are ready to merge this
nightmarish pr 👻

---------

Co-authored-by: Paul Cadman <git@paulcadman.dev>
2023-04-19 15:56:48 +01:00
..
Compile Fix: add supported targets as option for compile commands (#1983) 2023-04-13 14:16:07 +02:00
Dev Support more paths (#2000) 2023-04-19 15:56:48 +01:00
Doctor Refactor CLI (#1527) 2022-09-14 16:16:15 +02:00
Eval Print JuvixCore correctly (#1875) 2023-03-15 16:41:39 +01:00
Extra Support more paths (#2000) 2023-04-19 15:56:48 +01:00
Format Support more paths (#2000) 2023-04-19 15:56:48 +01:00
Html Support more paths (#2000) 2023-04-19 15:56:48 +01:00
Repl Pretty print JuvixCore values consistently with Juvix syntax (#1988) 2023-04-12 12:52:40 +02:00
Typecheck Support basic dependencies (#1622) 2022-12-20 13:05:40 +01:00
Base.hs Refactor CLI (#1527) 2022-09-14 16:16:15 +02:00
Compile.hs Support more paths (#2000) 2023-04-19 15:56:48 +01:00
Dev.hs Add juvix dev repl command (#1941) 2023-03-31 00:57:44 +02:00
Doctor.hs Update CI to install Smoke, Github actions, and Makefile fixes (#1735) 2023-01-24 11:50:23 +01:00
Eval.hs Test core to geb translation (#1865) 2023-03-27 15:32:03 +02:00
Format.hs Support more paths (#2000) 2023-04-19 15:56:48 +01:00
Html.hs Support more paths (#2000) 2023-04-19 15:56:48 +01:00
Init.hs Add juvix global project under xdg directory and other improvements (#1963) 2023-04-13 11:27:39 +02:00
Repl.hs Support more paths (#2000) 2023-04-19 15:56:48 +01:00
Typecheck.hs Update typecheck command to check for coverage (#1952) 2023-03-30 19:36:38 +02:00