Ayaz Hafiz
852fd0a127
Lints
2022-10-02 21:38:04 -05:00
Ayaz Hafiz
0cc9ea4b05
Detect and report module names that don't match what they are used as
...
Prior to this commit, if you had a module structure like
```
| - A.roc
| - Dep
| - B.roc
```
where `B.roc` was defined as
```
interface B exposes [] imports []
```
and `A.roc` was defined as
```
interface A exposes [] imports [Dep.B]
```
The compiler would hang on you. The reason is that even though we expect
`B` to be named `Dep.B` relative to `A`, that would not be enforced.
With this patch, we now enforce such naming schemes - a module must have
the namespaced name it is referenced by. Currently, we determine the
expected namespaced name by looking at how transitive dependencies of the
root module reference the module. In the future, once we have a package
ecosystem and a solid idea of "package roots", we can use the "package
root" to determine how a module should be named.
Closes #4094
2022-10-02 21:38:03 -05:00
Ayaz Hafiz
a5ebd7f477
Comments and optimizations for builtins
2022-10-02 21:38:03 -05:00
Ayaz Hafiz
5d649666fa
Detect and report module import cycles
...
Closes #3557
2022-10-02 21:38:03 -05:00
Ayaz Hafiz
c67be21636
Check that module names correspond to the paths they are defined in
...
Closes #3440
Closes #4050
2022-10-02 21:38:02 -05:00
Ayaz Hafiz
cc125d62bc
Remove redundant reference
2022-09-30 13:40:35 -05:00
Ayaz Hafiz
92aa0912ea
Report unused imports in modules
2022-09-30 13:40:34 -05:00
Ayaz Hafiz
ae122a0aea
Improve style
2022-09-30 13:40:34 -05:00
Ayaz Hafiz
c521668d4c
Simplify how builtin types are added to a module
2022-09-30 13:40:33 -05:00
Ayaz Hafiz
2a508721ed
Don't resolve builtin modules imported from platform interfaces as namespaced
2022-09-27 17:57:45 -05:00
Anton-4
1bf355feb9
fmt
2022-09-24 14:55:37 +02:00
Anton-4
3b0293a87d
improved file problem msg
2022-09-24 14:41:06 +02:00
Anton-4
d83f23928e
quotes to make error stand out
2022-09-23 18:35:54 +02:00
rezzaghi
8278d37f1d
fix format
2022-09-23 11:56:31 -03:00
rezzaghi
ce70fce3b2
Add path to error message when trying to read directory
2022-09-23 11:01:00 -03:00
Ayaz Hafiz
06bef34829
Import Decode by default in all modules
2022-09-21 12:29:07 -05:00
Ayaz Hafiz
454f3634fd
Import all types from Encode by default
2022-09-21 12:29:06 -05:00
Ayaz Hafiz
7e5ff4883f
Do not qualify builtin modules with package shorthand when loading
2022-09-21 12:29:06 -05:00
Ayaz Hafiz
44772b8f3d
Don't add to host exposed during roc test
2022-09-14 11:26:50 -05:00
Ayaz Hafiz
3b4b1838b8
Push layout interner further through Layout
2022-08-31 14:33:52 -05:00
Ayaz Hafiz
c5466810a4
Add LayoutInterner to LayoutCache
...
Adds a thread-local interner of layouts to LayoutCache, and updates all
references appropriately.
This is a bit suboptimal for single-threaded workloads that will look at
creating layout caches again, like the REPL, but I think that's okay for
now - since the global interner will be uncontested for those workloads, it
should still be plenty fast to access the interner, even behind a lock.
2022-08-31 14:33:51 -05:00
Ayaz Hafiz
9d170be5c7
Add layout interner to load_internal
2022-08-31 14:33:51 -05:00
Ayaz Hafiz
66e65714b9
Fix release errors
2022-08-31 14:16:44 -05:00
Ayaz Hafiz
d13b556295
Trace stats for layout cache
2022-08-31 14:16:43 -05:00
Richard Feldman
c6516acdb4
Drop unused ExecutionMode
2022-08-28 16:01:37 -04:00
ayazhafiz
3456a44742
Only compile and run expects that belong to the same package
...
In particular, don't run expects that come from modules with a different
package qualification (including subpackages; we can loosen this
restriction later), or builtins when run on userspace apps/interfaces.
Closes #3722
2022-08-28 10:16:55 -05:00
Folkert
a22e04361c
Merge remote-tracking branch 'origin/main' into expect-fx-codegen
2022-08-23 16:28:21 +02:00
Ayaz Hafiz
31d9df96a1
Spellcheck
2022-08-20 10:00:34 -05:00
Ayaz Hafiz
7c6d811769
Report errors without mono when roc foo.roc
has errors
2022-08-19 22:19:04 -05:00
Ayaz Hafiz
b809d6d452
Dynamically load find/make specializations graph if there are no type errors
2022-08-19 22:19:04 -05:00
Richard Feldman
97e2900bf5
s/rtfeldman/roc-lang/g in links to GitHub repos
2022-08-12 15:24:09 -04:00
Folkert
82c07590db
thread fx expects to the runner
2022-08-12 14:42:30 +02:00
Folkert
7e6a3ddc15
more boilerplate
2022-08-12 13:50:06 +02:00
Folkert
7c9b1897bb
fully canonicalize expect-fx
2022-08-09 14:50:24 +02:00
Folkert
bcbc8b4d50
basic canonicalization
2022-08-09 13:59:24 +02:00
Folkert
4766c78d61
factor goal phase out of state
2022-08-09 12:45:57 +02:00
Folkert
68888c79ae
skip expect codegen when not running tests
2022-08-06 22:03:56 +02:00
Ayaz
d4e81ccbd2
Merge pull request #3695 from rtfeldman/derive-decoding-list
...
Derive decoding for lists!
2022-08-05 10:41:24 -05:00
Richard Feldman
0de889c1e9
Rename to_goal_phase, per Clippy's suggestion
2022-08-03 19:50:24 -04:00
Richard Feldman
3136c5fb63
Allow testing interface modules
2022-08-03 19:49:48 -04:00
Ayaz Hafiz
8b63402b1c
Load non-function derived ability specializations correctly
2022-08-03 16:10:44 -05:00
Ayaz Hafiz
57c1bed218
Include Decode aliases
2022-08-02 14:31:17 -05:00
Ayaz Hafiz
fc71e3df04
Add Decode to the load graph
2022-08-01 08:09:22 -05:00
Ayaz Hafiz
0989b2cb82
Move solve problems to their own crate
2022-07-28 08:57:32 -04:00
Ayaz Hafiz
0525c6d616
Import both specializations and declared ability mappings
2022-07-25 10:06:49 -04:00
Ayaz Hafiz
cd0b8577ab
Have load_internal deal with separate declared/known ability specializations
2022-07-25 09:24:58 -04:00
Ayaz Hafiz
e2454f497f
Store declared implementations, both custom and derived, in abilities store
2022-07-25 09:09:01 -04:00
Richard Feldman
cc790a2773
fixup! Rename bindgen_rs to rust_glue
2022-07-24 11:54:40 -04:00
Folkert
6ab0b5069e
run the formatter
2022-07-22 13:45:51 +02:00
Christoph Rüßler
c4f141b735
Use Instant over SystemTime to record timings
...
Closes #3575 .
2022-07-22 10:03:47 +02:00