Commit Graph

631 Commits

Author SHA1 Message Date
Dmitry Bushev
f9d2964e83
Update profiling CLI arguments (#3461) 2022-05-24 16:01:26 +03:00
Jaroslav Tulach
2973cd2db2
Avoid needless concatenations of warning/error messages (#3465)
While investigating [#182234656](https://www.pivotaltracker.com/n/projects/2539304/stories/182234656) I've noticed that  `GatherDiagnostics` calls `distinctBy` and uses `message` string. However such string has to be composed and that takes time:

![image](https://user-images.githubusercontent.com/26887752/169638644-cf7dd826-1016-402b-842a-fc27a77a64e1.png)

This PR eliminates the need for concatenation by associating each `Diagnostic` with an array of `keys` used to compute `equals` and `hashCode`.
2022-05-24 07:16:36 +02:00
Radosław Waśko
0073f461d9
Fix Dataflow Error propagation for Builtins accepting primitives (#3400)
[ci no changelog needed]

Fixes https://www.pivotaltracker.com/story/show/181652841
2022-05-19 15:25:30 +00:00
Hubert Plociniczak
688df9825c
Part 2 of system for builtin objects (#3454)
This is the 2nd part of DSL improvements that allow us to generate a lot of
builtins-related boilerplate code.
- [x] generate multiple method nodes for methods/constructors with varargs
- [x] expanded processing to allow for @Builtin to be added to classes and
and generate @BuiltinType classes
- [x] generate code that wraps exceptions to panic via `wrapException`
annotation element (see @Builtin.WrapException`

Also rewrote @Builtin annotations to be more structured and introduced some nesting, such as
@Builtin.Method or @Builtin.WrapException.

This is part of incremental work and a follow up on https://github.com/enso-org/enso/pull/3444.

# Important Notes
Notice the number of boilerplate classes removed to see the impact.
For now only applied to `Array` but should be applicable to other types.
2022-05-19 10:43:47 +00:00
Hubert Plociniczak
12d6ef799f
Refactor methods of Managed_Resource (#3460)
Promoted `with`, `take`, `finalize` to be methods of Managed_Resource
rather than static methods always taking `resource`, for consistency
reasons.

This required function dispatch boilerplate, similarly to `Ref`.
In future iterations we will address this boilerplate code.

Related to https://www.pivotaltracker.com/story/show/182212217
2022-05-18 17:27:42 +00:00
Radosław Waśko
8430ce2625
Parsing values with known types (#3455)
Implements https://www.pivotaltracker.com/story/show/181824146
2022-05-18 15:27:48 +00:00
Jaroslav Tulach
78e7d69198
Generator of natural numbers yields IllegalStateException (#3440) 2022-05-18 11:48:29 +00:00
Hubert Plociniczak
6b6b1430bc
Cleanup Ref - get/put (#3457)
The change promotes static methods of `Ref`, `get` and `put`, to be
methods of `Ref` type.
The change also removes `Ref` module from the default namespace.
Had to mostly c&p functional dispatch for now, in order for the methods
to be found. Will auto-generate that code as part of builtins system.

Related to https://www.pivotaltracker.com/story/show/182138899
2022-05-17 10:26:36 +00:00
Dmitry Bushev
d74fffd550
Replace Rope with CharSequence when building suggestions (#3453)
PR addresses an issue when during the initial compilation the `EnsureCompiledJob` depends too much time building the `LineView` of ropes.
Replacing the `Rope` with `CharSequence` in the compilation job reduces total time building the suggestions from ~600 ms to ~200 ms.

#### Before
![2022-05-13-160549_1310x120_scrot](https://user-images.githubusercontent.com/357683/168289736-fe8983ef-9bcc-4df0-bcd2-881bc2949773.png)
#### After
![2022-05-13-160609_1303x123_scrot](https://user-images.githubusercontent.com/357683/168289741-3326603d-8183-4925-b995-435655d6c8be.png)

[context-registry-npss.zip](https://github.com/enso-org/enso/files/8687294/context-registry-npss.zip)
2022-05-16 06:47:35 +00:00
Radosław Waśko
a32644dd85
Make it possible to run Enso with assertions enabled (#3450)
Before, when running Enso with `-ea`, some assertions were broken and the interpreter would not start.

This PR fixes two very minor bugs that were the cause of this - now we can successfully run Enso with `-ea`, to test that any assertions in Truffle or in our own libraries are indeed satisfied.

Additionally, this PR adds a setting to SBT that ensures that IntelliJ uses the right language level (Java 17) for our projects.
2022-05-13 15:38:52 +00:00
Hubert Plociniczak
a2dae60aa9
Generate BuiltinMethods from simple method and constructor signatures (#3444)
A low-hanging fruit where we can automate the generation of many
@BuiltinMethod nodes simply from the runtime's methods signatures.
This change introduces another annotation, @Builtin, to distinguish from
@BuiltinType and @BuiltinMethod processing. @Builtin processing will
always be the first stage of processing and its output will be fed to
the latter.

Note that the return type of Array.length() is changed from `int` to
`long` because we probably don't want to add a ton of specializations
for the former (see comparator nodes for details) and it is fine to cast
it in a small number of places.

Progress is visible in the number of deleted hardcoded classes.

This is an incremental step towards #181499077.

# Important Notes
This process does not attempt to cover all cases. Not yet, at least.
We only handle simple methods and constructors (see removed `Array` boilerplate methods).
2022-05-12 08:42:00 +00:00
Jaroslav Tulach
ab1ca54acd
Profile the language server (#3389)
In order to analyse why the `runner.jar` is slow to start, let's _"self sample"_ it using the [sampler library](https://bits.netbeans.org/dev/javadoc/org-netbeans-modules-sampler/org/netbeans/modules/sampler/Sampler.html). As soon as the `Main.main` is launched, the sampling starts and once the server is up, it writes its data into `/tmp/language-server.npss`.

Open the `/tmp/language-server.npss` with [VisualVM](https://visualvm.github.io) - you should have one copy in your
GraalVM `bin/jvisualvm` directory and there has to be a GraalVM to run Enso.

#### Changelog

- add: the `MethodsSampler` that gathers information in `.npss` format
- add: `--profiling` flag that enables the sampler
- add: language server processes the updates in batches
2022-05-10 12:44:05 +00:00
Jaroslav Tulach
21c46901b7
Debug Enso language in ChromeDev tools with --inspect option (#3432)
Finally this pull request proposes `--inspect` option to allow [debugging of `.enso`](e948f2535f/docs/debugger/README.md) in Chrome Developer Tools:

```bash
enso$ ./built-distribution/enso-engine-0.0.0-dev-linux-amd64/enso-0.0.0-dev/bin/enso --inspect --run ./test/Tests/src/Data/Numbers_Spec.enso
Debugger listening on ws://127.0.0.1:9229/Wugyrg9Nm4OUL9YhzdcElmLft71ayZW3LMUPCdPyNAY
For help, see: https://www.graalvm.org/tools/chrome-debugger
E.g. in Chrome open: devtools://devtools/bundled/js_app.html?ws=127.0.0.1:9229/Wugyrg9Nm4OUL9YhzdcElmLft71ayZW3LMUPCdPyNAY
```
copy the printed URL into chrome browser and you should see:

![obrazek](https://user-images.githubusercontent.com/26887752/167235327-8ad15fb2-96d4-4a0c-9e31-ed67ab46578b.png)

One can also debug the `.enso` files in NetBeans or [VS Code with Apache Language Server extension](https://cwiki.apache.org/confluence/display/NETBEANS/Apache+NetBeans+Extension+for+Visual+Studio+Code) just pass in special JVM arguments:
```bash
enso$ JAVA_OPTS=-agentlib:jdwp=transport=dt_socket,server=y,address=8000 ./built-distribution/enso-engine-0.0.0-dev-linux-amd64/enso-0.0.0-dev/bin/enso --run ./test/Tests/src/Data/Numbers_Spec.enso
Listening for transport dt_socket at address: 8000
```
and then _Debug/Attach Debugger_. Once connected choose the _Toggle Pause in GraalVM Script_ button in the toolbar (the "G" button):

![obrazek](https://user-images.githubusercontent.com/26887752/167235598-98266c7e-beb5-406b-adc6-8167b3d1b453.png)

and your execution shall stop on the next `.enso` line of code. This mode allows to debug both - the Enso code as well as Java code.

Originally started as an attempt to write test in Java:

* test written in Java
* support for JUnit in `build.sbt`
* compile Java with `-g` - so it can be debugged
* Implementation of `StatementNode` - only gets created when `materialize` request gets to `BlockNode`
2022-05-10 08:55:08 +00:00
Hubert Plociniczak
cdebced203
Regression: Fix repl after builtins reshuffle (#3435)
Debug is not imported by default (let me know if it should be?)

# Important Notes
When Debug was part of Builtins.enso everything was imported. Let me know if the new setup is not as expected.
2022-05-10 08:02:39 +00:00
Hubert Plociniczak
a06f1ed3b9
Fix infinite loop by doing deep copy (#3441)
Patch provided by Jaroslav, appears to fix local issues with inifite loop
introduced in https://github.com/enso-org/enso/pull/3429.

### Important Notes

This renders https://github.com/enso-org/enso/pull/3439 obsolete. Related to https://www.pivotaltracker.com/n/projects/2539304/stories/182024911
2022-05-09 15:32:16 +02:00
Hubert Plociniczak
4bbabc00be
Move Builtin Types and Methods to stdlib (#3363)
This PR replaces hard-coded `@Builtin_Method` and `@Builtin_Type` nodes in Builtins with an automated solution
that a) collects metadata from such annotations b) generates `BuiltinTypes` c) registers builtin methods with corresponding
constructors.
The main differences are:
1) The owner of the builtin method does not necessarily have to be a builtin type
2) You can now mix regular methods and builtin ones in stdlib 
3) No need to keep track of builtin methods and types in various places and register them by hand (a source of many typos or omissions as it found during the process of this PR)

Related to #181497846
Benchmarks also execute within the margin of error.

### Important Notes

The PR got a bit large over time as I was moving various builtin types and finding various corner cases.
Most of the changes however are rather simple c&p from Builtins.enso to the corresponding stdlib module.
Here is the list of the most crucial updates:
- `engine/runtime/src/main/java/org/enso/interpreter/runtime/builtin/Builtins.java` - the core of the changes. We no longer register individual builtin constructors and their methods by hand. Instead, the information about those is read from 2 metadata files generated by annotation processors. When the builtin method is encountered in stdlib, we do not ignore the method. Instead we lookup it up in the list of registered functions (see `getBuiltinFunction` and `IrToTruffle`)
- `engine/runtime/src/main/java/org/enso/interpreter/runtime/callable/atom/AtomConstructor.java` has now information whether it corresponds to the builtin type or not.
- `engine/runtime/src/main/scala/org/enso/compiler/codegen/RuntimeStubsGenerator.scala` - when runtime stubs generator encounters a builtin type, based on the @Builtin_Type annotation, it looks up an existing constructor for it and registers it in the provided scope, rather than creating a new one. The scope of the constructor is also changed to the one coming from stdlib, while ensuring that synthetic methods (for fields) also get assigned correctly
- `engine/runtime/src/main/scala/org/enso/compiler/codegen/IrToTruffle.scala` - when a builtin method is encountered in stdlib we don't generate a new function node for it, instead we look it up in the list of registered builtin methods. Note that Integer and Number present a bit of a challenge because they list a whole bunch of methods that don't have a corresponding method (instead delegating to small/big integer implementations).
During the translation new atom constructors get initialized but we don't want to do it for builtins which have gone through the process earlier, hence the exception
- `lib/scala/interpreter-dsl/src/main/java/org/enso/interpreter/dsl/MethodProcessor.java` - @Builtin_Method processor not only  generates the actual code fpr nodes but also collects and writes the info about them (name, class, params) to a metadata file that is read during builtins initialization 
- `lib/scala/interpreter-dsl/src/main/java/org/enso/interpreter/dsl/MethodProcessor.java` - @Builtin_Method processor no longer generates only (root) nodes but also collects and writes the info about them (name, class, params) to a metadata file that is read during builtins initialization
- `lib/scala/interpreter-dsl/src/main/java/org/enso/interpreter/dsl/TypeProcessor.java` - Similar to MethodProcessor but handles @Builtin_Type annotations. It doesn't, **yet**, generate any builtin objects.  It also collects the names, as present in stdlib, if any, so that we can generate the names automatically (see generated `types/ConstantsGen.java`)
- `engine/runtime/src/main/java/org/enso/interpreter/node/expression/builtin` - various classes annotated with @BuiltinType to ensure that the atom constructor is always properly registered for the builitn. Note that in order to support types fields in those, annotation takes optional `params` parameter (comma separated). 
- `engine/runtime/src/bench/scala/org/enso/interpreter/bench/fixtures/semantic/AtomFixtures.scala` - drop manual creation of test list which seemed to be a relict of the old design
2022-05-05 20:18:06 +02:00
Marcin Kostrzewa
ce6a97e977
Sum type info in suggestions DB (#3422)
A draft of simple changes to the compiler to expose sum type information. Doesn't break the stdlib & at the same time allows for dropdowns. This is still broken, for example it doesn't handle exporting/importing types, only ones defined in the same module as the signature. Still, seems like a step in the right direction – please provide feedback.

# Important Notes
I've decided to make the variant info part of the type, not the argument – it is a property of the type logically.

Also, I've pushed it as far as I'm comfortable – i.e. to the `SuggestionHandler` – I have no idea if this is enough to show in IDE? cc @4e6
2022-05-05 16:05:22 +00:00
Jaroslav Tulach
3ab2c8f8a0
Delay conversion of Truffle function body nodes until the function is invoked (#3429)
Most of the functions in the standard library aren't gonna be invoked during particular program execution. It makes no sense to build their Truffle AST for the functions that are not executing. Let's delay the construction of the tree until a function is first executed.
2022-05-05 12:53:49 +02:00
Marcin Kostrzewa
96a0c92c8b
Automatically force all-defaulted functions (#3414)
This changes the interpreter to treat functions with all-defaulted args as thunks. Seems to have no performance impact in compiled code.
2022-04-27 17:57:00 +00:00
Dmitry Bushev
69b5e2ab8a
Fix search of local suggestions (#3417)
Changelog:
- fix: `search/completion` request with the position parameter.
- fix: `refactoring/renameProject` request. Previously it did not take into account the library namespace (e.g. `local.`)
2022-04-26 12:06:48 +00:00
Dmitry Bushev
01d308de74
Load component group modules (#3412) 2022-04-25 18:09:09 +03:00
Radosław Waśko
a53fbb6dcc
Make REPL display results using to_text (#3411)
[ci no changelog needed]

# Important Notes
The REPL used to use some builtin Java text representation leading to outputs like this:
```
> [1,2,3]
>>> Vector [1, 2, 3]
> 'a,b,c'.split ','
>>> Vector JavaObject[[Ljava.lang.String;@131c0b6f (java.lang.String[])]
```

This PR makes it use `to_text` (if available, otherwise falling back to regular `toString`). This way we get outputs like this:

```
> [1,2,3]
>>> [1, 2, 3]
> 'a,b,c'.split ','
>>> ['a', 'b', 'c']
```
2022-04-21 14:13:45 +00:00
Radosław Waśko
fecaa81551
Review Range and Interval, resolve infinite loop issue (#3408)
Implements: https://www.pivotaltracker.com/story/show/181652841
2022-04-20 16:22:01 +00:00
Hubert Plociniczak
63ff67b621
Add formatting checks for Scala and Java (#3394) 2022-04-20 16:11:24 +02:00
Hubert Plociniczak
059bb8c7e9
Apply automatic formatting prior to turning on checks (#3405)
Result of automatic formatting with `scalafmtAll` and `javafmtAll`.
Prerequisite for https://github.com/enso-org/enso/pull/3394

### Important Notes

This touches a lot of files and might conflict with existing PRs that are in progress. If that's the case, just run
`scalafmtAll` and `javafmtAll` after merge and everything should be in order since formatters should be deterministic.
2022-04-19 12:34:34 +02:00
Jaroslav Tulach
ab692b3b74
Enso Date shall be converted to java.time.LocalDate when passed to Java (#3374) 2022-04-15 06:02:05 +02:00
Dmitry Bushev
998d078b9a
Fill component groups of standard libraries (#3391)
Changelog:
- add: component groups to package descriptions
- add: `executionContext/getComponentGroups` method that returns component groups of libraries that are currently loaded
- doc: cleanup unimplemented undo/redo commands
- refactor: internal component groups datatype
2022-04-14 13:12:18 +00:00
Dmitry Bushev
c402d9a900
Implement Events Monitor (#3392)
PR adds a monitor that handles messages between the language server and the runtime and dumps them as a CSV file `/tmp/enso-api-events-*********.csv`

```
UTC timestamp,Direction,Request Id,Message class
```

# Important Notes
⚠️ Monitor is enabled when the log level is set to trace. You should pass `-vv` (very verbose) option to the backend when starting IDE
```
enso -- -vv
```
2022-04-12 15:17:47 +00:00
Radosław Waśko
891f064a6a
Extend Aggregate_Spec test suite with tests for missed edge-cases to ensure the feature is well-tested on all backends (#3383)
Implements https://www.pivotaltracker.com/story/show/181805693 and finishes the basic set of features of the Aggregate component.

Still not all aggregations are supported everywhere, because for example SQLite has quite limited support for aggregations. Currently the workaround is to bring the table into memory (if possible) and perform the computation locally. Later on, we may add more complex generator features to emulate the missing aggregations with complex sub-queries.
2022-04-12 11:02:01 +00:00
Marcin Kostrzewa
4e51f31eb7
Always call defaulted atom arguments (#3358)
Solves the issue of defaulted args not being called in atoms. Doesn't solve the more general function issue.
2022-04-08 08:21:59 +00:00
Dmitry Bushev
29e3f05f27
Fix multiline code docparser (#3379)
Changelog:
- fix: docparser handles multiline code sections correctly
- feat: split paragraphs into keyed sections
2022-04-06 04:39:58 +00:00
Dmitry Bushev
23e5216922
Fix docparser (#3370)
Changelog:
- fix the docparser case when there is an unclosed formatted section before a list
- add the test checking the doc generation on the stdlib
2022-03-31 04:44:34 +00:00
Dmitry Bushev
435d7bb47b
Fix resource management in ModuleCache (#3367)
PR fixes an issue when compiler crashes while trying to load an incompatible `IR` cache.
2022-03-29 13:47:03 +00:00
Radosław Waśko
20be5516a5
Aggregates in the Database library - MVP (#3353)
Implements infrastructure for new aggregations in the Database. It comes with only some basic aggregations and limited error-handling. More aggregations and problem handling will be added in subsequent PRs.

# Important Notes
This introduces basic aggregations using our existing codegen and sets-up our testing infrastructure to be able to use the same aggregate tests as in-memory backend for the database backends.

Many aggregations are not yet implemented - they will be added in subsequent tasks.

There are some TODOs left - they will be addressed in the next tasks.
2022-03-28 15:51:37 +00:00
Dmitry Bushev
a34c2bcfe6
Implement Documentation Sections API (#3360) 2022-03-25 10:49:37 +03:00
Radosław Waśko
85a5770b7f
Quick-fix for Error.to_text CCE (#3357)
This is just a quick fix addressing an issue which was making debugging problematic.

The proper solution to the broader issue described at https://github.com/enso-org/enso/issues/1538#issuecomment-789645573 still needs to be done.
2022-03-24 13:12:53 +00:00
Radosław Waśko
85c09e7414
Make Resource.bracket not run the action if initializer failed with a dataflow error (#3356) 2022-03-23 16:36:35 +01:00
Hubert Plociniczak
66e2135b0d
Initialize AtomConstructor's fields via local vars (#3330)
The mechanism follows a similar approach to what is being in functions
with default arguments.
Additionally since InstantiateAtomNode wasn't a subtype of EnsoRootNode it
couldn't be used in the application, which was the primary reason for
issue #181449213.
Alternatively InstantiateAtomNode could have been enhanced to extend
EnsoRootNode rather than RootNode to carry scope info but the former
seemed simpler.

See test cases for previously crashing and invalid cases.
2022-03-21 09:15:14 +00:00
Radosław Waśko
cc7333812d
The library developer should be able to handle specific types of Panics while passing through others (#3344)
Implements https://www.pivotaltracker.com/story/show/181569176

Also ensures that Dataflow Errors have proper stack traces (earlier they did not point at the right location).
2022-03-18 16:57:06 +00:00
James Dunkerley
286950b2a2
Replace deprecated EpbContext calls and caching of Ordering (#3342)
Final set of deprecated calls to CachedContext removed.
Also removed caching of Ordering as these are singletons.
2022-03-16 13:23:31 +00:00
Radosław Waśko
dedd1eac96
Refactor library warnings to use the new system (#3337)
Implements https://www.pivotaltracker.com/story/show/181536964
2022-03-15 12:52:57 +01:00
Radosław Waśko
247b284316
Data analysts should be able to use Text.location_of to find indexes within string using various matchers (#3324)
Implements https://www.pivotaltracker.com/n/projects/2539304/stories/181266029
2022-03-12 19:42:00 +00:00
James Dunkerley
58fe42a20c
Fix many of the deprecated warnings in the engine build (#3321)
Cleaning up the deprecated access to Context and Language
2022-03-09 17:08:03 +00:00
Marcin Kostrzewa
4653bfeeab
Decorate values with arbitrary warnings (#3248) 2022-03-09 16:40:02 +01:00
James Dunkerley
65465fb8ef
Restructuring the Faker type and creating tests for Group_By (#3318)
- Added Minimum, Maximum, Longest. Shortest, Mode, Percentile
- Added first and last to Map
- Restructured Faker type more inline with FakerJS
- Created 2,500 row data set
- Tests for group_by
- Performance tests for group_by
2022-03-09 10:31:02 +00:00
Hubert Plociniczak
f92108158c
Added compare_to to True/False (#3317) 2022-03-08 14:24:04 +01:00
Dmitry Bushev
d3846578cc
Fix Error Payload Serialization (#3315) 2022-03-04 11:57:49 +03:00
James Dunkerley
fb68f18739
Within Vector, use Array.Copy wherever possible (#3236)
Following the Slice and Array.Copy experiment, took just the Array.Copy parts out and built into the Vector class.

This gives big performance wins in common operations:

| Test | Ref | New |
| --- | --- | --- |
| New Vector | 41.5 | 41.4 |
| Append Single | 26.6 | 4.2 |
| Append Large | 26.6 | 4.2 |
| Sum | 230.1 | 99.1 |
| Drop First 20 and Sum | 343.5 | 96.9 |
| Drop Last 20 and Sum | 311.7 | 96.9 |
| Filter | 240.2 | 92.5 |
| Filter With Index | 364.9 | 237.2 |
| Partition | 772.6 | 280.4 |
| Partition With Index | 912.3 | 427.9 |
| Each | 110.2 | 113.3 |

*Benchmarks run on an AWS EC2 r5a.xlarge with 1,000,000 item count, 100  iteration size run 10 times.*

# Important Notes
Have generally tried to push the `@Tail_Call` down from the Vector class and move to calling functions on the range class.

- Expanded benchmarks on Vector
- Added `take` method to Vector
- Added `each_with_index` method to Vector
- Added `filter_with_index` method to Vector
2022-03-03 15:40:48 +00:00
Hubert Plociniczak
1531a77b11
Fix teardown for engine's testcases (#3303)
This changes intends to cleanup some directories that are being left
behind after running `sbt test`:
- a random `foobar` directory was being created in the `engine` project
directory
- every run of a test suite would add more temporary directories in `/tmp`

The change does not make use of `deleteOnExit` which can pretty
unreliable. Instead we recursively delete files in directories and
directories to make sure nothing is left behind.
2022-03-03 15:36:01 +01:00
Dmitry Bushev
40f44be858
Update the Language Server API (#3308) 2022-03-03 16:28:04 +03:00
Dmitry Bushev
3858ae7517
Add API for component groups (#3286) 2022-02-24 15:41:14 +03:00
Marcin Kostrzewa
67b4e59506
Properly expose stacktraces and related data to user code (#3271) 2022-02-16 10:36:19 +03:00
Edward Kmett
0c25ee736c
Upgrade Truffle and Graal to Version 21.3.0 (#3258) 2022-02-11 19:05:13 +03:00
Marcin Kostrzewa
ee8df25fd5
Fix vector sorting with TCO comparators (#3256) 2022-02-09 22:17:43 +01:00
Radosław Waśko
8b24336604
Data analysts should be able to reorder columns into name order using sort_columns functions (#3250) 2022-02-08 17:28:46 +01:00
Michał Wawrzyniec Urbańczyk
4baad5f146
Nightly proccess preparations: Setting Enso version through the environment (#3241)
Co-authored-by: Radosław Waśko <radoslaw.wasko@enso.org>
Co-authored-by: Radosław Waśko <wasko.radek@gmail.com>
2022-02-07 15:14:32 +01:00
Edward Kmett
8a70debb59
Implement conversions (#180312665) (#3227)
* Implement conversions

start wip branch for conversion methods for collaborating with marcin

add conversions to MethodDispatchLibrary (wip)

start MethodDispatchLibrary implementations

conversions for atoms and functions

Implement a bunch of missing conversion lookups

final bug fixes for merged methoddispatchlibrary implementations

UnresolvedConversion.resolveFor

progress on invokeConversion

start extracting constructors (still not working)

fix a bug

add some initial conversion tests

fix a bug in qualified name resolution, test conversions accross modules

implement error reporting, discover a ton of ignored errors...

start fixing errors that we exposed in the standard library

fix remaining standard lib type errors not caused by the inability to parse type signatures for operators

TODO: fix type signatures for operators. all of them are broken

fix type signature parsing for operators

test cases for meta & polyglot

play nice with polyglot

start pretending unresolved conversions are unresolved symbols

treat UnresolvedConversons as UnresolvedSymbols in enso user land

* update RELEASES.md

* disable test error about from conversions being tail calls. (pivotal issue #181113110)

* add changelog entry

* fix OverloadsResolutionTest

* fix MethodDefinitionsTest

* fix DataflowAnalysisTest

* the field name for a from conversion must be 'that'. Fix remaining tests that aren't ExpressionUpdates vs. ExecutionUpdate behavioral changes

* fix ModuleThisToHereTest

* feat: suppress compilation errors from Builtins

* Revert "feat: suppress compilation errors from Builtins"

This reverts commit 63d069bd4f.

* fix tests

* fix: formatting

Co-authored-by: Dmitry Bushev <bushevdv@gmail.com>
Co-authored-by: Marcin Kostrzewa <marckostrzewa@gmail.com>
2022-02-06 04:02:09 -05:00
Dmitry Bushev
2d4df96e10
Implement the component resolving algorithm (#3244) 2022-02-03 10:40:39 +03:00
Dmitry Bushev
e6d9b5741d
Add support for the component groups syntax (#3235) 2022-01-26 18:57:50 +03:00
Radosław Waśko
cfdb33bc68
Improve Vector (#3232) 2022-01-25 18:29:39 +01:00
James Dunkerley
8387375d83
Moving distinct to Map (#3229)
* Moving distinct to Map

* Mixed Type Comparable Wrapper

* Missing Bracket
Still an issue with `Integer` in the mixed vector test

* PR comments

* Use naive approach for mixed types

* Enable pending test

* Performance timing function

* Handle incomparable types cleanly

* Tidy up the time_execution function

* PR comments.

* Change log
2022-01-25 09:57:30 +00:00
Radosław Waśko
4fc97d5563
Fix a few typos in code (#3223)
* Fix a typo in build.sbt
* Change incorrect Panic.catch reference to Panic.recover
2022-01-13 16:17:19 +01:00
Dmitry Bushev
ca0a6f0bf6
Update Scala to 2.13.7 (#3214) 2021-12-31 17:50:32 +03:00
Dmitry Bushev
2676aa50a3
fix: method clash error (#3210) 2021-12-28 18:09:34 +03:00
Mateusz Czapliński
895291876c
Fix problems related to error visualisation evaluation (#3193)
- Add parser & handler in IDE for `executionContext/visualisationEvaluationFailed` message from Engine (fixes a developer console error "Failed to decode a notification: unknown variant `executionContext/visualisationEvaluationFailed`"). The contents of the error message will now be properly deserialized and printed to Dev Console with appropriate details.
- Fix a bug in an Enso code snippet used internally by the IDE for error visualizations preprocessing. The snippet was using not currently supported double-quote escaping in double-quote delimited strings. This lack of processing is actually a bug in the Engine, and it was reported to the Engine team, but changing the strings to single-quoted makes the snippet also more readable, so it sounds like a win anyway.
    - A test is also added to the Engine CI, verifying that the snippet compiles & works correctly, to protect against similar regressions in the future.

Related: #2815
2021-12-21 10:00:57 +01:00
Dmitry Bushev
f03640b93a
Test visualizations with error values (#3196) 2021-12-17 19:07:16 +03:00
Dmitry Bushev
0b9a5b5f65
Fix path in Windows tests (#3191) 2021-12-14 14:52:38 +03:00
Dmitry Bushev
04ac2a2009
Add method benchmarks (#3180) 2021-12-07 18:35:14 +03:00
Dmitry Bushev
51d1c941f5
Flaky upgrade spec (#3179) 2021-12-07 15:55:51 +03:00
Dmitry Bushev
6a426c477a
Enable conversion methods (#3177) 2021-12-03 18:14:13 +03:00
Dmitry Bushev
607330712a
Add support for conversions in Language Server (#3175) 2021-12-03 11:31:44 +03:00
Radosław Waśko
46c31bb9a5
Preinstalling With Dependencies (#1981) 2021-11-23 11:51:17 +03:00
Michał Wawrzyniec Urbańczyk
361882b033
Fix SystemProcessTest to not require presence of echo program on Windows. (#3152)
Co-authored-by: Dmitry Bushev <bushevdv@gmail.com>
2021-11-16 16:37:12 +01:00
Adam Obuchowicz
bb3b145af5
Refactor gui/src/rust/ide to two app/gui and app/ide-desktop (#3157) 2021-11-16 10:04:56 +01:00
Michał W. Urbańczyk
99053decd8 various default branch switch - related updates 2021-11-01 01:37:30 +01:00
Ara Adkins
d7cdfd0899
Enable caches by default for the nightly runner (#2002) 2021-09-28 19:48:25 +01:00
Marcin Kostrzewa
f4823f0ad6
Auto Parallelism (#2000) 2021-09-28 00:48:17 +02:00
Ara Adkins
d6465e9e97
Implement a --compile command for the engine runner (#1998) 2021-09-24 12:24:44 +01:00
Ara Adkins
1cd2706ba8
Load IR Caches from Disk (#1996) 2021-09-18 13:48:13 +01:00
Dmitry Bushev
592b016caf
Add log.masking runtime option (#1993) 2021-09-10 10:56:23 +01:00
Ara Adkins
ab8b2a2d4a
Implement writing of IR caches (#1991) 2021-09-08 17:15:42 +01:00
Ara Adkins
7cced6a9de
Make the BindingsMap able to break links (#1980) 2021-08-31 15:50:33 +01:00
Radosław Waśko
45c01da490
Make Library-Related Operations Not Block the Actor System (#1975) 2021-08-30 15:51:38 +02:00
Radosław Waśko
826e28a149
Implement library/preinstall (Without Dependencies Yet) (#1972) 2021-08-27 14:01:13 +02:00
Ara Adkins
649fe33ccf
Add support for IR cache locations (#1973) 2021-08-26 11:52:35 +01:00
Ara Adkins
c18fe2d750
Provide regex support on Text (#1968) 2021-08-23 12:09:51 +01:00
Radosław Waśko
8cef409db2
Getting and Setting Library Metadata (#1967) 2021-08-20 10:23:05 +02:00
Radosław Waśko
63819526d7
Update the editions/listDefinedLibraries Endpoint (#1964) 2021-08-19 17:21:31 +02:00
Marcin Kostrzewa
4536ed9f9b
Stdlib Improvements (#1963) 2021-08-19 14:55:15 +02:00
Radosław Waśko
385464d0f0
Implement Files.list (#1961) 2021-08-18 21:26:22 +02:00
Radosław Waśko
0a60e5180a
Update Simple Library Server (#1952) 2021-08-18 10:01:28 +02:00
Dmitry Bushev
0d43c32171
[release: nightly] Retry visualization evaluation (#1958)
Retry the evaluation of visualization expression
2021-08-17 18:43:39 +03:00
Dmitry Bushev
db317abb4a
Log visualization evaluation errors (#1956)
Log errors during the visualization evaluation
2021-08-17 14:59:19 +03:00
Maciej Mikołajek
6652a00241
Title in docs in IDE (#1904) 2021-08-17 01:40:58 +02:00
Radosław Waśko
be6e60509a
Tool To Bump Stdlib Version (#1947) 2021-08-13 18:14:20 +02:00
Dmitry Bushev
de1a0ced60
Execution complete notification (#1945)
Add executionContext/executionComplete notification
2021-08-12 19:26:44 +03:00
Radosław Waśko
fac0405fd0
Updating Editions (#1944) 2021-08-12 16:55:23 +02:00
Ara Adkins
eb7e7d0872
Propagate dataflow errors in host and polyglot (#1941) 2021-08-11 17:05:23 +01:00
Dmitry Bushev
63a44e198c
Reset idle time (#1938)
Add _idle/reset HTTP endpoint that
resets the idle time counter
2021-08-11 16:39:39 +03:00
Marcin Kostrzewa
a69d978110
Fix visualization interrupts (#1939) 2021-08-11 13:06:47 +02:00
Radosław Waśko
31167fd6ae
Revert "Revert "Library Publishing MVP (#1898)"" (#1933) 2021-08-09 16:00:04 +02:00
Dmitry Bushev
77bfeb9149
Increase Binary WebSocket Buffer (#1923)
increase buffer of the binary WebSocket
connection from 10 to 100
2021-08-04 14:50:44 +03:00
Ara Adkins
a1116995d8
Fix a bad heuristic for identifying module docs (#1919) 2021-08-03 13:19:22 +01:00
Dmitry Bushev
6bfd500846
Support Types Unions in Suggestions Database (#1912)
Add support for binary operators in type signatures
2021-07-30 17:58:33 +03:00
Ara Adkins
e9523d8eda
Add aliases to the standard library (#1907) 2021-07-28 19:21:19 +01:00
Dmitry Bushev
8336a97931
Add Support for Project Templates (#1902)
Add an ability to create a project from a template
2021-07-27 19:13:14 +03:00
Ara Adkins
bc96f0e05c
Add support for documenting modules (#1900) 2021-07-26 13:26:41 +01:00
Ara Adkins
a7478bc573
Revert "Library Publishing MVP (#1898)"
This reverts commit 1bd4e5824e.
2021-07-26 10:32:19 +01:00
Radosław Waśko
1bd4e5824e
Library Publishing MVP (#1898) 2021-07-23 18:16:34 +02:00
Radosław Waśko
f3bc88b91e
Library Downloads MVP (#1885) 2021-07-22 08:24:06 +02:00
Dmitry Bushev
980ba8cb65
Add Reexport Field to Suggestions (#1793)
Add the reexport field to suggestions
2021-07-20 19:10:53 +03:00
Radosław Waśko
86fcd86055
New Language Server API Implementations / Mocks (#1875) 2021-07-17 16:49:51 +02:00
Dmitry Bushev
4235d345aa
[release: nightly] Prune Versions when Verifying Modules Index (#1881)
clean module versions together with the
module suggestions
2021-07-16 20:10:55 +03:00
Dmitry Bushev
214495ad56
Add Runtime Tests (#1869)
Add extra runtime tests
2021-07-15 19:44:50 +03:00
Ara Adkins
314742ab47
[release: nightly] Disable interrupts to protect HostClassLoader (#1867) 2021-07-15 13:09:48 +01:00
Dmitry Bushev
1a9af9f39e
[release: nightly] Fix the compilation order (#1866) 2021-07-15 11:37:56 +01:00
Radosław Waśko
782a671498
Fix imports when attaching a visualization (#1857) 2021-07-14 09:41:29 +01:00
Radosław Waśko
2eadf9f19f
Bump Minimal PM/Launcher Versions for New Engine (#1854) 2021-07-13 13:08:00 +02:00
Dmitry Bushev
b3badf1b80
Add Idleness Http Endpoint (#1847)
Implement `GET / _idle` request
2021-07-12 16:53:44 +03:00
Dmitry Bushev
3591e1b5c9
Updates and fixes for the cloud (#1817) 2021-07-09 14:41:50 +01:00
Radosław Waśko
b58e895b18
Editions Integration (#1832) 2021-07-08 15:38:20 +02:00
Ara Adkins
b71d01b507
Add compiler support for conversion methods (#1834) 2021-07-08 12:51:42 +01:00
Maciej Mikołajek
520cd70d55
Documentation files on disk Part 1. (#1744) 2021-07-07 15:00:33 +02:00
Radosław Waśko
e58b5eb81d
Dynamically Loading Libraries (#1826) 2021-07-06 00:27:14 +02:00
Radosław Waśko
8d71145d57
Add File System Path to the Content Roots (#1827) 2021-07-05 11:23:29 +02:00
Radosław Waśko
0b347d7443
Support for Multiple Content Roots (#1821) 2021-06-29 18:52:26 +02:00
Radosław Waśko
44ef29a3b7
Fix the PM Not Checking To Preinstall the Graal Runtime if the Engine Was Already Installed (#1824) 2021-06-29 11:46:20 +02:00
Marcin Kostrzewa
1d18310d2a
Refactor import resolver to allow for dynamic loading of modules. (#1822) 2021-06-28 16:20:15 +02:00
Marcin Kostrzewa
334a022ffd
Import syntax including namespace (#1806) 2021-06-24 12:42:24 +02:00
Ara Adkins
5a3775e028
Add syntactic support for conversion definitions (#1815) 2021-06-23 18:29:13 +01:00
Maciej Mikołajek
4173dd810f
Documentation in the Suggestions Database (#1791) 2021-06-22 14:44:48 +02:00
Radosław Waśko
241a1e7d74
Define Editions (#1797) 2021-06-18 16:39:45 +02:00
Ara Adkins
af4558a93c
Refactor the LS to support multiple content roots (#1800) 2021-06-16 11:00:42 +01:00
Ara Adkins
90c020d666
Implement byte-based file operations (#1795) 2021-06-11 14:48:28 +01:00
Ara Adkins
0b363e3e85
Add support for the file/checksum endpoint (#1787) 2021-06-08 15:21:17 +01:00
Marcin Kostrzewa
b4709ab529
Default visualization definitions (#1786) 2021-06-08 08:12:02 +02:00
Dmitry Bushev
46f101a2ae
Fix Masking in Actor Logging (#1761)
Replace ActorLogging with SLF4J logger
to enable masking.
2021-06-03 12:59:34 +03:00
Adam Obuchowicz
48bbce54de
FlatBuffers Schema Fix (#1778) 2021-06-02 13:51:02 +02:00
Dmitry Bushev
d67f7a2b31
Add HTML Documentation API (#1758)
Add support for the HTML documentation chunks
2021-06-01 15:43:22 +03:00
Ara Adkins
1661832c95
Update the FlatBuffers schemas (#1763) 2021-05-28 13:27:41 +01:00
Ara Adkins
a981e72fdf
Provide API access to the project name (#1759) 2021-05-27 16:13:52 +01:00
Ara Adkins
80eff9c017
Misc compiler enhancements (#1748) 2021-05-21 16:53:44 +01:00
Dmitry Bushev
f34f8be895
Add evaluation for one-shot expressions (#1749) 2021-05-21 14:19:21 +01:00
Ara Adkins
a8fce2421a
Remove the EPB GIL for GraalPython (#1747) 2021-05-20 08:29:22 +01:00
Dmitry Bushev
6c084fc8ae
Add support for detailed logger configuration (#1745) 2021-05-19 09:02:32 +01:00
Dmitry Bushev
c202c92b68
Log akka messages (#1719) 2021-05-18 09:23:13 +01:00
Ara Adkins
48bcebc723
Update to GraalVM 21.1.0 (#1738) 2021-05-14 13:08:39 +01:00
Dmitry Bushev
1b6388702f
Implement masking of sensitive data in logs (#1732) 2021-05-12 16:31:53 +01:00
Ara Adkins
74b1fe9d23
Finish updating the standard library examples (#1731) 2021-05-06 16:55:26 +01:00
Radosław Waśko
c3e4901eb1
Add a workflow for building nightly releases (#1689) 2021-05-05 11:58:14 +01:00
Ara Adkins
66599fda25
Enhance examples for Standard.Base.* (#1714) 2021-05-04 09:49:53 +01:00
Dmitry Bushev
7c98ed6014
feat: higher-kinded types in suggestions (#1712)
Support higher-kinded types when building suggestions.
2021-04-29 12:08:05 +03:00
Dmitry Bushev
cf8034683c
Add detailed logging to the tooling init (#1704) 2021-04-28 15:11:42 +01:00
Dmitry Bushev
ff54c07431
Add a schema version to the suggestions database (#1703) 2021-04-28 12:16:42 +01:00
Dmitry Bushev
c9e5e4efe4
Synchronize Runtime Updates Sending (#1691)
Add `UpdatesSynchronizationState` that manages
the runtime update messages and tracks which 
updates are sent to the user
2021-04-26 13:15:04 +03:00
Dmitry Bushev
d9e1a47460
Report Visualization Errors (#1671)
Add `executionContext/visualisationEvaluationFailed`
notification
2021-04-21 16:32:22 +03:00
Dmitry Bushev
f43655a80c
Add an Atom Suggestion for a Module (#1659)
Add an atom suggestion representing a module
2021-04-13 16:43:36 +03:00
Dmitry Bushev
fde4f2d0d6
Resolve clashing project identifiers (#1665) 2021-04-13 13:19:16 +01:00
Ara Adkins
9f60e22508
Update all references to dev.enso.org 2021-04-07 20:39:46 +01:00
Dmitry Bushev
ec66117cc6
Install Required GraalVM Components (#1651)
Project manager ensures that the required 
GraalVM components are installed.
2021-04-07 18:19:24 +03:00
Ara Adkins
8b0588939e
Fix some implementations for the Vector constructors (#1650) 2021-04-06 20:06:34 +01:00
Dmitry Bushev
96957b7b03
Sync Suggestions Database when Renaming the Project (#1647)
Changelog:
- feat: during the boot, prune outdated modules 
  from the suggestions database
- feat: when renaming the project, send updates 
  about changed records in the database
- refactor: remove deprecated 
  executionContext/expressionValuesComputed 
  notification
2021-04-06 14:23:12 +03:00
Ara Adkins
9585080ab8
Clean up the standard library docs (#1641) 2021-04-01 12:20:36 +01:00
Dmitry Bushev
91e591c5b3
Enable All Languages in Context (#1640)
Enable All Languages in Context
2021-03-31 20:18:48 +03:00
Radosław Waśko
444ae39d28
Inlining Helper for Benchmarks (#1638) 2021-03-31 17:11:34 +02:00
Dmitry Bushev
c32780fbc8
Misc Runtime Fixes (#1633)
Misc runtime fixes
2021-03-30 12:11:04 +03:00
Ara Adkins
8e942b5fa0
Rank suggestions by self-type specificity (#1629) 2021-03-29 16:31:17 +01:00
Dmitry Bushev
29eaecaeec
Wait for truffle context init (#1617) 2021-03-26 09:19:48 +00:00
Ara Adkins
78ab5ee5e5
Provide searcher suggestions for compatible types (#1613) 2021-03-25 12:07:41 +00:00
Dmitry Bushev
6ba5941591
Do not cache panics (#1611) 2021-03-25 10:30:58 +00:00
Marcin Kostrzewa
d97c7f51a4
Make the process library more IDE-friendly (#1591) 2021-03-18 15:45:02 +00:00
Radosław Waśko
49b30f2e9d
Database Visualization Support (#1582) 2021-03-18 14:28:52 +01:00
Ara Adkins
e4e16a3da3
Fix the array visualisation and misc crashes (#1588) 2021-03-17 16:34:53 +00:00
Dmitry Bushev
35a0db19bc
Index Builtins Suggestions (#1575)
PR enables suggestions indexing for
the Builtins module
2021-03-17 13:07:49 +03:00
Radosław Waśko
21f667323e
PostgreSQL Support in Database Library (#1565)
Co-authored-by: Marcin Kostrzewa <marckostrzewa@gmail.com>
2021-03-16 17:53:04 +01:00
Ara Adkins
96697ddc97
Fix a crash due to shadowed project names (#1571) 2021-03-16 12:45:19 +00:00
Marcin Kostrzewa
ca90d9824a
Don't use thread interrupts to cancel executions (#1574) 2021-03-16 10:43:36 +01:00
Dmitry Bushev
b0680d0384
Add Locations Filter for Instrumented Locations (#1564)
PR adds the location filter that excludes lambdas 
and local functions from the instrumentation.
2021-03-12 14:27:24 +03:00
Radosław Waśko
5f8af886e5
Connection and Materialization in the Database Library (#1546) 2021-03-09 19:52:42 +01:00
Marcin Kostrzewa
f298fbd3cf
R Interop (#1559) 2021-03-09 16:19:05 +01:00
Marcin Kostrzewa
03fa549daf
Python interop (#1541) 2021-03-05 12:18:37 +01:00
Dmitry Bushev
b5e9895fa7
Initialize language server on client connection (#1535) 2021-03-04 16:59:05 +00:00
Ara Adkins
2b4f0ef2ad
Bump scalac to 2.13.5 (#1531) 2021-03-01 16:35:57 +00:00
Dmitry Bushev
2bba2ccfca
Fix Invalidation of Dynamic Dependencies (#1532)
Revert change from #1495, where dynamic 
dependencies come with external ids.
2021-03-01 18:23:04 +03:00
Marcin Kostrzewa
3a88be543f
Make panic messages short (#1528) 2021-03-01 14:46:05 +01:00
Ara Adkins
fea8856970
Additional fixes for parser crashes (#1523) 2021-02-26 13:17:53 +00:00
Dmitry Bushev
0c5a36283b
fix: lambda locations (#1522)
Reattach original locations during
the lambda desugaring
2021-02-26 12:59:21 +03:00
Dmitry Bushev
3bf566fdee
feat: invalidate method dependencies (#1516)
When the edit changes the method body, invalidate 
all the method usages, and the corresponding 
dependencies
2021-02-26 08:26:34 +03:00
Radosław Waśko
6544c2478d
Implement the first part of the database library (#1475) 2021-02-25 13:48:18 +00:00
Ara Adkins
37a64dd098
Desugar blanks in function position (#1512) 2021-02-25 11:44:13 +00:00
Dmitry Bushev
b79d5f95a6
Always Send Panic Updates (#1508)
Always send panic updates
2021-02-25 13:43:21 +03:00
Ara Adkins
2c5ed028aa
Band-aid the "template pattern segment" error (#1509) 2021-02-25 09:46:03 +00:00
Dmitry Bushev
51d5c5ebde
Analyze compiled modules (#1507)
PR changes the logic of EnsureCompiledJob to analyze 
all compiled modules, disregarding its previous 
compilation stage.
2021-02-25 11:29:23 +03:00
Marcin Kostrzewa
299c59826e
Fix the type of Type_Error's name field (#1504) 2021-02-24 14:53:11 +01:00
Marcin Kostrzewa
d1c127531e
Error message representations (#1498) 2021-02-22 17:25:53 +01:00
Ara Adkins
8ec2a92b77
Upgrade GraalVM to 21.0 (#1487) 2021-02-22 13:32:55 +00:00
Dmitry Bushev
dced7b96f6
Fix Dependency Analysis (#1495)
PR fixes dependency analysis on IR.Error nodes.
2021-02-19 19:38:13 +03:00
Dmitry Bushev
ad4d6286d5
Set Correct Payload for Dataflow Errors (#1484)
Set DataflowError payload for dataflow error updates.
2021-02-18 15:05:20 +03:00
Radosław Waśko
ef539b6ddf
Add Stack Traces in Tests (#1482)
Co-authored-by: Ara Adkins <iamrecursion@users.noreply.github.com>
2021-02-15 18:41:54 +01:00
Marcin Kostrzewa
c4a0772190
Polyglot JS Definitions (#1451) 2021-02-08 18:14:54 +01:00