Commit Graph

28623 Commits

Author SHA1 Message Date
Richard Feldman
0d44ebb46e
Merge pull request #6659 from roc-lang/add-new-sponsors
Add new individual sponsors
2024-04-21 15:18:38 -04:00
Richard Feldman
e9a4335cc2
Add @AngeloChecked to sponsors - thank you so much! 💜 2024-04-21 15:17:41 -04:00
Richard Feldman
839cf0ca45
Add @noverby to sponsors - thank you so much! 💜 2024-04-21 15:17:22 -04:00
Richard Feldman
2c480dda54
Fix some missing HTML tags 2024-04-21 15:16:59 -04:00
Agus Zubiaga
5112e064e5
Add module_path to can env instead of threading it through 2024-04-21 10:30:34 -03:00
Agus Zubiaga
e5789158e5
Remove todo on ingested file handling 2024-04-21 10:13:26 -03:00
Agus Zubiaga
1b3c16e517
Handle import ValueDef in lang_srv tokens 2024-04-21 09:39:39 -03:00
Luke Boswell
d69d2ee940
replace removed comment 2024-04-21 13:45:04 +10:00
Luke Boswell
9ad6d9248c
converge loc_pattern_help_help and loc_parse_tag_pattern_arg 2024-04-21 13:32:38 +10:00
Luke Boswell
6844df6c37
fix parsing lists in tag patterns 2024-04-21 13:27:50 +10:00
Agus Zubiaga
7ebfc6d06d
Support both inline and header imports
Load will now convert header imports to inline import defs, so that
we can support both temporarily.
2024-04-20 19:04:09 -03:00
Luke Boswell
4cf256c6b7
Merge pull request #6654 from joshuawarner32/proposed_check_indent_fix
Remove unnecessary arg to check_indent
2024-04-21 07:49:17 +10:00
Luke Boswell
397055c0c6
Merge pull request #6655 from joshuawarner32/fix-fuzz-build
Fix syntax fuzzer cargo config
2024-04-21 07:48:05 +10:00
Joshua Warner
a24daeaa57
Fix syntax fuzzer cargo config 2024-04-20 11:21:36 -07:00
Anton-4
c1d0c24194
fix expected type
Rust's u128 and Roc's U128 have different alignment. They can not be used interchangebly, that leads to segmentation faults. See also https://roc.zulipchat.com/#narrow/stream/395097-compiler-development/topic/str_to_u128.20segfault/near/434410692
2024-04-20 19:57:47 +02:00
Agus Zubiaga
7a53484479
Report an error when import shadows a symbol in scope 2024-04-20 12:38:17 -03:00
Agus Zubiaga
979aff8bf7
Explicit builtin import warning
We will now show a warning if a builtin is imported explicitly,
since this is unncessary.

We will not show the warning if they expose functions from the builtin:

	import Dict exposing [isEmpty]

However, we will show a special warning if they expose types from it:

	import Dict exposing [Dict, isEmpty]
2024-04-20 12:35:46 -03:00
Agus Zubiaga
3217e5a3f0
Allow dots in import module names
We found some issues with the private submodules part of the proposal [1],
and we decided to keep module directories for now.

[1] https://docs.google.com/document/d/1E_77fO-44BtoBtXoVeWyGh1xN2KRTWTu8q6i25RNNx0/edit#heading=h.x84bh32l37em
2024-04-20 12:33:02 -03:00
Agus Zubiaga
b56f029a09
Fix unqualified unused import false positive
If we exposed a symbol in an import and used it both unqualified
and qualified, we'd produce an unused warning false positive.

This happened because we were using a single bit flag to determine
whether a value was used qualified or unqualified.
2024-04-20 12:18:52 -03:00
Agus Zubiaga
1f347f6ca1
Fix package module resolution in inline imports
We were still passing `ModuleIds` from `load` to `can`, but now
that imports can appear in any scope, we don't know which package
an unqualified module name belongs to from the top level.

We now pass `PackageModuleIds` instead  and keep a Map of `ModuleName` to
`ModuleId` in `Scope`.

This also allow us to import multiple modules with the same name from different
packages as long as a unique alias is provided.
2024-04-20 12:16:37 -03:00
Agus Zubiaga
842a256907
Implement import aliases
Allows a module to be imported with an alias:

    import JsonDecode as JD

Import aliases must be unique and they cannot have the same name
as an imported module.
2024-04-20 12:07:01 -03:00
Agus Zubiaga
d5a38a26db
Merge branch 'main' into inline-imports 2024-04-20 12:01:11 -03:00
Anton-4
a6f47fb50f
Merge pull request #6653 from roc-lang/dependabot/cargo/rustls-0.21.11
Bump rustls from 0.21.7 to 0.21.11
2024-04-20 14:51:43 +02:00
Joshua Warner
50d2111919
Remove unnecessary arg to check_indent
Quick refactoring / follow-up to #6634
2024-04-19 20:25:55 -07:00
dependabot[bot]
83e723dfd1
Bump rustls from 0.21.7 to 0.21.11
Bumps [rustls](https://github.com/rustls/rustls) from 0.21.7 to 0.21.11.
- [Release notes](https://github.com/rustls/rustls/releases)
- [Changelog](https://github.com/rustls/rustls/blob/main/CHANGELOG.md)
- [Commits](https://github.com/rustls/rustls/compare/v/0.21.7...v/0.21.11)

---
updated-dependencies:
- dependency-name: rustls
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-19 20:01:13 +00:00
Richard Feldman
6059f7afcb
Merge pull request #6651 from roc-lang/fix-nesting-suffix
Fix recursion for suffixed `!` in top-level def
2024-04-19 14:53:34 -04:00
Richard Feldman
da129c9a41
Merge pull request #6650 from nathanielknight/fix-shiftLeftBy-example
Minor fix to the docstring of `Num.shiftLeftBy`
2024-04-19 07:19:48 -04:00
Richard Feldman
ca8682e93c
Merge pull request #6649 from roc-lang/suffixed-when
Add support for suffixed `when` expressions
2024-04-18 22:15:28 -04:00
Luke Boswell
5e738a4ab5
fix recursion in top-level def 2024-04-19 10:34:33 +10:00
Nathaniel Knight
02689de797 Minor fix to the docstring of Num.shiftLeftBy 2024-04-17 20:50:17 -07:00
Luke Boswell
ae908f89a9
suffixed when branches 2024-04-18 12:47:11 +10:00
Luke Boswell
a889810dfd
unwrap suffixed when condition 2024-04-18 09:44:57 +10:00
Richard Feldman
f44a208204
Merge pull request #6646 from roc-lang/trailing-suffixed
Fix unwrapping for trailing expressions
2024-04-17 08:45:31 -04:00
Luke Boswell
0198a683c7
fix unwrapping of trailing expr 2024-04-17 09:54:29 +10:00
Anton-4
99ca3f545f
clippy 2024-04-16 20:02:08 +02:00
Anton-4
1a5e065055
Merge branch 'main' into rust-1-76-0-upgrade 2024-04-16 13:33:27 +02:00
Luke Boswell
7a84dcd39c
don't unwrap intermediate answer if not required 2024-04-16 16:25:20 +10:00
Richard Feldman
c74685f74a
Merge pull request #6634 from roc-lang/suffixed-bang
De-sugar bang `!` operator
2024-04-15 20:38:55 -04:00
Luke Boswell
c5cba98381
Merge remote-tracking branch 'remote/main' into suffixed-bang 2024-04-16 06:42:31 +10:00
Anton-4
5c45cc9c3e
fmt 2024-04-15 19:38:04 +02:00
Anton-4
dc96e194bd
clippy 2024-04-15 19:36:52 +02:00
Anton-4
a7b843743d
upgrade to rust 1.76.0 2024-04-15 19:20:07 +02:00
Anton-4
8502a37b3c
fmt 2024-04-15 16:51:07 +02:00
Anton-4
e4b814ce1c
clippy 2024-04-15 16:50:44 +02:00
Anton-4
4d9202ec6e
upgrade to rust 1.75.0 2024-04-15 16:29:23 +02:00
Anton-4
0563a05d21
Merge pull request #6394 from roc-lang/dependabot/cargo/tracing-0.1.40
Bump tracing from 0.1.39 to 0.1.40
2024-04-15 14:53:04 +02:00
Anton-4
9a8d8ed243
Merge branch 'main' into dependabot/cargo/tracing-0.1.40 2024-04-15 14:05:47 +02:00
Anton-4
a0cf09f980
Merge pull request #6643 from roc-lang/split_utils
Split `test_utils`
2024-04-15 13:25:54 +02:00
Luke Boswell
f9771a9983
split test_utils 2024-04-15 20:30:34 +10:00
Anton-4
972b254ebd
Merge pull request #6587 from faldor20/optional-decoding-works
Decoding of records with missing fields.
2024-04-15 09:55:21 +02:00