Commit graph

344 commits

Author SHA1 Message Date
Luke Boswell
8a566dc339
WIP 2024-11-11 10:22:58 +11:00
Luke Boswell
d0ee040421
make clippy happy 2024-10-24 11:31:15 +11:00
Luke Boswell
926014518f
Merge remote-tracking branch 'remote/main' into rebuild-platform 2024-10-24 10:21:08 +11:00
Jasper Woudenberg
ad555297cf
Set argv[0] to .roc file passed to 'roc run'
When we run `roc run <file>` or `roc <file>` then Roc will compile a
binary and run it. Before this commit we would set the path to the
compiled binary as argv[0]. This commit changes the behavior to make
argv[0] in the binary correspond to the roc file being ran.

This benefits the use of roc scripts that make use of a shebang:

    #!/usr/bin/env roc

With this change such scripts will be able to read the path to
themselves out of ARGV. This trick is commonly used for instance by bash
scripts in order to access files relative to the script itself.
2024-10-21 21:54:46 +02:00
Anton-4
e73484d282
improve names
Signed-off-by: Anton-4 <17049058+Anton-4@users.noreply.github.com>
2024-10-15 12:53:56 +02:00
David Edwards
94ad57dcfa
Read file line by line rather than all at once 2024-10-13 21:33:41 +01:00
David Edwards
13ffa9b9db
Initial Sketch of roc check on Markdown
This commit alters `roc check` to be able to run on Markdown files. The overall flow is:
 - check if the file has a `.md` extension
  - if it does extract any fenced code blocks marked as Roc
  - write those blocks to temp files
  - run `roc check` sequentially on every temp file
  - print out the results of `roc check`
  - exit early if any individual `roc check` has non-zero exit status
 - if the file does not have `.md` extension proceed as before
2024-10-09 21:13:45 +01:00
Luke Boswell
e3afeaa7ff
WIP Merge remote-tracking branch 'remote/main' into rebuild-platform 2024-10-09 09:21:46 +11:00
Omar Jatoi
3f318e2235
update existing calls to roc_cache_dir()
using `roc_cache_packages_dir()` instead, which will return "~/.cache/roc/packages", which was the existing functionality, but `roc_cache_dir()` will now return "~/.cache/roc"
2024-10-03 12:52:52 -04:00
Hannes
058ef106af Add commit information to roc versions built from source 2024-09-25 21:12:46 +08:00
Aurélien Geron
b57258f5cb
Remove a couple remaining references to pf.Task 2024-09-11 15:39:26 +12:00
Sam Mohr
aadc74a37b
Merge branch 'main' into repl-no-color-no-header-flags 2024-09-06 15:52:18 -07:00
Luke Boswell
beb2dcbc84
remove unneeded basic-cli reference in formatting test 2024-09-04 21:26:37 +10:00
Anton-4
f89f2e8ea7
fix #6987
Signed-off-by: Anton-4 <17049058+Anton-4@users.noreply.github.com>
2024-09-03 20:43:25 +02:00
Luke Boswell
012a2fc63f
Merge remote-tracking branch 'remote/main' into rebuild-platform 2024-09-03 20:35:39 +10:00
Anton-4
e7a44430fd
update to basic cli 15 2024-08-31 14:30:07 +02:00
jamin-eisenberg
d9db14c3d7
Make whitespace uniform 2024-08-28 18:15:24 -04:00
jamin-eisenberg
7429f8a970
Initial attempt (failing tests?) 2024-08-28 18:15:23 -04:00
Anton-4
7938e4bdc8
basic-cli 0.15, test fixes 2024-08-28 18:39:15 +02:00
Anton-4
44b8abdead
update to basic-cli 0.14 2024-08-23 15:50:05 +02:00
Luke Boswell
767ec7af84
cli run tests passing on macos 2024-08-16 17:59:53 +10:00
Luke Boswell
9ecb209f73
add suppress warning flag, remove test test_roc_app_slim 2024-08-16 11:29:39 +10:00
Sam Mohr
550baded7f
Merge branch 'main' into rebuild-platform 2024-08-14 19:39:30 -07:00
Joshua Warner
2d9aa00771
Rename RemoveSpaces->Normalize 2024-08-12 23:05:55 -07:00
Luke Boswell
3ebff4348f
Merge pull request #6979 from roc-lang/fix-target-arg-unknown
make target an argument for preprocess-host
2024-08-12 17:21:26 +10:00
Joshua Warner
0abea91796
Rename Full -> FullAst 2024-08-10 16:06:01 -07:00
Anton-4
439ebcddce
make target an argument 2024-08-10 14:31:29 +02:00
Joshua Warner
d25c048d48
Move Full from fmt to parse and reorganize confusingly-named Module ast type 2024-08-07 23:01:49 -07:00
Joshua Warner
4f32f43048
Implement block / indent based parsing
... and enforce that defs can only occur in blocks (or, inside parenthesized expressions)
2024-07-27 13:34:16 -07:00
Anton-4
3a36d84c45
update to basic-cli 0.12 2024-07-10 20:07:03 +02:00
Luke Boswell
f515311915
clippy fix 2024-07-09 15:47:56 +10:00
Luke Boswell
287d00df85
remove gen_stub_lib 2024-07-09 15:24:24 +10:00
Luke Boswell
85447ec2cc
replace stray strings with impl on Target 2024-07-09 14:39:36 +10:00
Luke Boswell
dc0902bc92
WIP
WIP

WIP

WIP

ignore some cli tests that are going to move

try fix for linux valgrind tests

try a legacy host for valgrind

fix roc_glue tests
2024-07-09 13:48:09 +10:00
Richard Feldman
595695af23
Merge pull request #6869 from roc-lang/fs
Add no_std fs
2024-07-07 18:47:24 -04:00
Ayaz Hafiz
0e52a7e069
Make sure FunctionKind is determined in all entry points
There are a lot of entry points for a Roc program. They should probably
be all consolidated into one, but for now, when FunctionKind is needed,
determine it from the environment. This fixes EXPERIMENTAL_ROC_ERASE for
`roc test` etc.

Also print the location of a failure when `internal_error!` is called. I
think this should panic instead, and I thought it used to - does anyone
know if that changed?
2024-07-07 16:01:14 -05:00
Anton-4
1bcf30391b
Merge pull request #6819 from roc-lang/rust-1-77-2-upgrade
Rust 1.77.2 upgrade
2024-07-06 03:23:54 +02:00
Richard Feldman
6932b3f8f2
Fix Windows with_tempfile 2024-07-04 19:50:01 -04:00
Richard Feldman
5bf2c11bea
Fix some unused warnings on Windows tests 2024-07-04 19:34:53 -04:00
Luke Boswell
f69d39dffc
Merge pull request #6808 from roc-lang/process-host
Update preprocess host API
2024-07-03 10:23:44 +10:00
Ryan Barth
720ed2a457
fix: calculate windows dll symbols from prebuilt shared library 2024-06-30 22:56:14 -07:00
Luke Boswell
ee84b61360
update preprocess host API 2024-06-28 09:12:45 +10:00
Jackson Wambolt
d0f8dbe85b
Clean up roc_dev_native a bit
`writer` is only used by the parent process, so we don't need the
soon-to-be-forked child process to create it just to immediately get
overwritten by `execve`.
2024-06-26 01:49:13 -05:00
Jackson Wambolt
11c9b90551
Get exit code correctly
`status` isn't the exit code of the program - the actual exit code is
shifted left by 8 bits. We can get that with a `WIFEXITED` check to make
sure the exit code exists, followed by `WEXITSTATUS` to retrieve it.
2024-06-26 01:49:13 -05:00
Jackson Wambolt
1f0303cf53
Narrow use of unsafe in roc_run_native
`roc_run_native_fast` is actually the only unsafe part of the function,
so we probably don't need everything to be wrapped in an `unsafe` block.
2024-06-26 01:43:19 -05:00
Anton-4
212c736806
macos clippy 2024-06-19 14:11:42 +02:00
Agus Zubiaga
2da7ea394b
Add --main flag to specify app/package to resolve deps from 2024-06-07 17:09:44 -03:00
Agus Zubiaga
504107f90e
Include ingested files in package tarballs
If a package has an ingested file import, we will now add the file
to the tarball.
2024-05-18 02:07:58 +02:00
Anton-4
16f3969fc3
minor style improvements 2024-05-08 14:06:14 +02:00
Roland Rodriguez
fae1e4b51e
fix: ensure tests explicitly cleanup temp files 2024-05-06 19:20:43 -06:00