1
1
mirror of https://github.com/anoma/juvix.git synced 2024-12-13 19:49:20 +03:00
juvix/app
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
..
Commands Support more paths (#2000) 2023-04-19 15:56:48 +01:00
TopCommand Support more paths (#2000) 2023-04-19 15:56:48 +01:00
App.hs Support more paths (#2000) 2023-04-19 15:56:48 +01:00
AsmInterpreter.hs Refactor Core datastructures (#1975) 2023-04-04 18:58:05 +02:00
CommonOptions.hs Support more paths (#2000) 2023-04-19 15:56:48 +01:00
Evaluator.hs Support more paths (#2000) 2023-04-19 15:56:48 +01:00
GlobalOptions.hs Support more paths (#2000) 2023-04-19 15:56:48 +01:00
Main.hs Support more paths (#2000) 2023-04-19 15:56:48 +01:00
TopCommand.hs Add juvix format command (#1886) 2023-03-29 15:51:04 +02:00