Commit Graph

19908 Commits

Author SHA1 Message Date
Jan Van Bruggen
07a66f4962
Fix positionaConfigs typo 2022-10-06 23:53:51 -06:00
Ayaz Hafiz
3490b4b6ef
Format 2022-09-30 13:39:02 -05:00
Ayaz Hafiz
0fceb8573c
Simplify parse error logic a bit 2022-09-30 13:38:40 -05:00
Ayaz Hafiz
b47e26aa83
Fix some leftover type errors 2022-09-30 13:35:32 -05:00
Ayaz Hafiz
13369b47d2
Format 2022-09-30 13:31:19 -05:00
Ayaz Hafiz
e2c9a8fc17
Annotate arg 2022-09-30 13:31:19 -05:00
Ayaz Hafiz
cee38b895a
Error on missing positional args 2022-09-30 13:31:19 -05:00
Ayaz Hafiz
5245c4f640
Implement positional arguments 2022-09-30 13:31:18 -05:00
Ayaz Hafiz
84ddf35956
Make sure argument parsing marks arguments as taken 2022-09-30 13:31:01 -05:00
Ayaz Hafiz
6ccab83576
Add comments about MarkedArgs 2022-09-30 13:28:53 -05:00
Ayaz Hafiz
5a188bda25
More efficient representation of args in the arg parser
Rather than taking slices of a list when parsing subcommands and the
like, we can mark certain positions in the arguments list as having
already been parsed. This allows us to keep the argument list constant,
at just the precise of an extra set (which is likely to be small in
practice).

This also makes it easy to show what arguments are leftover, if the time
comes for that. It also makes parsing positional arguments easy; you
just grab the next unmarked arguments.
2022-09-30 13:28:52 -05:00
Anton-4
81703fb3b2
Merge pull request #4131 from TimWhiting/expression_indentation_ends_prematurely_fix
fix expression indentation error
2022-09-30 17:16:57 +02:00
Tim Whiting
ab000a5b49
Update error text
fix error text
2022-09-30 07:36:24 -06:00
Jan Van Bruggen
f6c981294a
Merge pull request #4126 from roc-lang/i4064
Str.splitFirst should not find match if needle is longer than haystack
2022-09-29 23:30:56 -06:00
Jan Van Bruggen
cd5747a15c
Run formatter even though it makes matchesAtHelp uglier
Signed-off-by: Jan Van Bruggen <JanCVanB@pm.me>
2022-09-29 23:28:34 -06:00
Jan Van Bruggen
5d814b3ea5
Refactor matchesAtHelp for clarity
Signed-off-by: Jan Van Bruggen <JanCVanB@pm.me>
2022-09-29 23:28:27 -06:00
Ayaz
9e7832ea0b
Merge pull request #4129 from roc-lang/arg-parser-fixes
Localize parsing errors in the arg parser
2022-09-30 00:06:43 -05:00
Ayaz Hafiz
c9c2f61e3e
Add some docs to matchesAtHelp 2022-09-29 22:32:16 -05:00
Tim Whiting
f323fe6534
fix expression indentation error 2022-09-28 20:11:24 -06:00
Ayaz Hafiz
f3f3898d7a
Format 2022-09-28 17:55:12 -05:00
Brian Carroll
4f23bc39f0
Merge pull request #3552 from roc-lang/csv_decoding-server_example
CSV Decoding in pure Roc
2022-09-28 21:46:26 +01:00
Ayaz Hafiz
3be0265159
Localize parsing errors in the arg parser
Previously, missing arguments would be reported incorrectly by the CLI
platform's arg parser, as [discussed on Zulip](https://roc.zulipchat.com/#narrow/stream/231634-beginners/topic/Args.20for.20CLI.20platform.3F/near/299068775).
This fixes that.
2022-09-28 14:44:30 -05:00
Ayaz Hafiz
1d7dc65800
Str.splitFirst should not find match if needle is longer than haystack
Closes #4064
2022-09-28 13:14:36 -05:00
Folkert de Vries
190ff7e21a
Merge pull request #4122 from roc-lang/dependabot/cargo/env_logger-0.9.1
Bump env_logger from 0.9.0 to 0.9.1
2022-09-28 16:54:47 +02:00
Folkert
2e5f207283
Merge remote-tracking branch 'origin/main' into csv_decoding-server_example 2022-09-28 16:39:34 +02:00
Ayaz
8b80eb1728
Merge pull request #4098 from roc-lang/env-decode
Decoding environment variables
2022-09-28 09:29:04 -05:00
Ayaz Hafiz
f72a1f9a9a
REmove env_logger dep 2022-09-28 09:10:27 -05:00
Folkert
4ada4d4996
deallocate roc string in parser platform 2022-09-28 15:30:17 +02:00
Folkert
9106479d07
access out of bounds in string split 2022-09-28 15:17:07 +02:00
Folkert
f44a30cf48
fix off-by-one error in List.dropAt 2022-09-28 14:57:55 +02:00
Folkert
d70625b21b
improved symbol debugging output from the surgical linker 2022-09-28 14:11:54 +02:00
dependabot[bot]
aa186930cd
Bump env_logger from 0.9.0 to 0.9.1
Bumps [env_logger](https://github.com/env-logger-rs/env_logger) from 0.9.0 to 0.9.1.
- [Release notes](https://github.com/env-logger-rs/env_logger/releases)
- [Changelog](https://github.com/env-logger-rs/env_logger/blob/main/CHANGELOG.md)
- [Commits](https://github.com/env-logger-rs/env_logger/compare/v0.9.0...v0.9.1)

---
updated-dependencies:
- dependency-name: env_logger
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-09-28 09:35:13 +00:00
Anton-4
f4f9d89059
Merge pull request #4119 from roc-lang/dependabot/cargo/peg-0.8.1
Bump peg from 0.8.0 to 0.8.1
2022-09-28 11:33:56 +02:00
Ayaz Hafiz
b53c2c001c
Ignore roc/roc run test cases when passing env vars, for now 2022-09-27 18:26:16 -05:00
Ayaz Hafiz
efddc38e66
Add EnvDecoding to cli-platform 2022-09-27 18:21:47 -05:00
Ayaz Hafiz
ca8b6a29d8
Add cli_run test for env.roc 2022-09-27 18:21:40 -05:00
Ayaz Hafiz
e04960573e
Format env.roc 2022-09-27 18:21:05 -05:00
Ayaz Hafiz
9cd82ab7e4
Ignore env binary 2022-09-27 18:18:42 -05:00
Ayaz Hafiz
331a4c2888
Format Env.roc 2022-09-27 18:17:52 -05:00
Ayaz Hafiz
43e734f75c
Make implementation easier to read 2022-09-27 18:03:19 -05:00
Brendan Hansknecht
30dbad88ae
ensure that the csv platform flushes to stdout successfully 2022-09-27 16:01:15 -07:00
Ayaz Hafiz
a8b1cb2d90
Implement decoding lists from env vars 2022-09-27 17:57:46 -05:00
Ayaz Hafiz
57231de0c1
Add example of decoding environment variables 2022-09-27 17:57:46 -05:00
Ayaz Hafiz
b9f34df96d
Add comment about annotations 2022-09-27 17:57:46 -05:00
Ayaz Hafiz
2a508721ed
Don't resolve builtin modules imported from platform interfaces as namespaced 2022-09-27 17:57:45 -05:00
Ayaz Hafiz
38ab8de37c
Implement Env.decode for the CLI platform 2022-09-27 17:57:45 -05:00
Brian Carroll
173a4ec8ab
Define roc_memmove in case LLVM decides to use memmove 2022-09-27 21:24:23 +01:00
dependabot[bot]
33c34e3095
Bump peg from 0.8.0 to 0.8.1
Bumps [peg](https://github.com/kevinmehall/rust-peg) from 0.8.0 to 0.8.1.
- [Release notes](https://github.com/kevinmehall/rust-peg/releases)
- [Commits](https://github.com/kevinmehall/rust-peg/compare/0.8.0...0.8.1)

---
updated-dependencies:
- dependency-name: peg
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-09-26 23:01:08 +00:00
Ayaz
11ef947e85
Merge pull request #4117 from roc-lang/dependabot/cargo/insta-1.20.0
Bump insta from 1.19.0 to 1.20.0
2022-09-26 17:59:53 -05:00
Brian Carroll
f272e4b584
Merge branch 'main' of github.com:rtfeldman/roc into csv_decoding-server_example 2022-09-26 21:34:47 +01:00