Commit Graph

1873 Commits

Author SHA1 Message Date
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
Kaz Wesley
b32fedacd9
Profiling: intervals tool and devtools-file generator (#3359)
* Profiling: intervals tool

* devtools profile generator

* docs

* ignore open intervals, because devtools does

* intervals tool: show interval counts

* Re-add a doc comment. Was accidentally deleted.

* Implement review.

* DURATION_FLOOR_MS

* Rename methods that apply a profile's contents to self

* Description of chrome format

* Link to profile.json format documentation is design doc

* Implement profiling-level switch described in design doc

* lint
2022-04-11 06:08:09 -07: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
Jaroslav Tulach
1b829e0a1d
Remove --skip-version-validation option before passing the args on (#3386) 2022-04-08 04:20:51 +02:00
James Dunkerley
bade0c31de
First and Last ordering (#3380)
Add the missing `order_by` support to First and Last aggregations for InMemory table.
2022-04-06 12:36:46 +00:00
Radosław Waśko
a71db71645
Adding most of remaining aggregates to Database Table (#3375) 2022-04-06 10:06:50 +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
Nikita Pekin
42ac28d0de
Add benchmark for Text.reverse with strings of varying length (#3381)
This pull request adds a benchmark for the `Text.reverse` function added in #3377 as part of https://www.pivotaltracker.com/n/projects/2539304/stories/181265419.

Per discussion with @jdunkerley on Discord it is useful to have this benchmark as this is a low-level item we want to track.
2022-04-05 17:59:21 +00:00
Nikita Pekin
22e3941371
Data analysts should be able to reverse strings using Text.reverse (#3377)
This commit implements `Text.reverse` as an extension on `Text`.
`Text.reverse` reverses strings. For example: `"Hello World!".reverse`
results in `"!dlroW olleH"`.

Strings are reversed by their Extended Grapheme Clusters not by their
characters. This has some performance implications because we need to
find these grapheme cluster boundaries when iterating. To do so,
`BreakIterator.getCharacterInstance` is used.

Implements: https://www.pivotaltracker.com/n/projects/2539304/stories/181265419
2022-04-05 16:45:56 +00:00
Ilya Bogdanov
fb52c1a9a2
Applying Magnet Alignment Algorithm to newly opened Component Browser (#3366)
[Task link](https://www.pivotaltracker.com/story/show/181076594)

This PR enables new node position adjustment using the Magnet Alignment algorithm for the following cases:

- When creating node with (+) button without nodes selected
- When creating node with "Mouse pointer dictated placement." not under the source node
- When the node is pushed left due to lack of space - only horizontally

The size of the `alignment area` around node is slightly enlarged, so that it's impossible to create a node that is being too close to other nodes.

Videos with AC demonstration:

https://user-images.githubusercontent.com/6566674/160565491-818b1705-43f8-41ab-abad-047031b2f9e5.mp4


https://user-images.githubusercontent.com/6566674/160565501-d2d4ea85-68c7-4385-9681-701ab86fdd98.mp4


https://user-images.githubusercontent.com/6566674/160565535-9cbeadfe-397b-4cf8-802a-1ec4148a70a2.mp4
2022-04-05 11:22:29 +00:00
Adam Obuchowicz
e5a7420b5a
The EnsoGL Component abstraction with special dropping behavior (#3322)
In this branch:
* The workaround for cursor-not-being-updated-after-closing-searcher bug (discovered while testing #3278) is reverted.
* The proper fix was introduced: created an abstraction for EnsoGL component, which, when dropping, will not immediately drop the FRP network and model, but instead put it into the Garbage Collector. The Collector ensures, that all "component hiding" effects and events will be handled, and drops FRP network and model only after that.
* I run clippy for wasm32 target out of curiosity. There was one warning, and I fixed it on this branch.
2022-04-04 15:55:55 +00:00
James Dunkerley
a4dbc9a37b
Moving Aggregation to Java (#3364) 2022-04-04 09:12:48 +00:00
Mateusz Czapliński
3c5f8d714a
Placement of newly opened Component Browser when nodes are selected (#3361)
When a new node is created with the <kbd>TAB</kbd> key or by clicking the `(+)` on-screen button while multiple nodes are selected, place the new node below all the selected nodes. (Previously, the new node was placed below the node that was selected earliest.)

Additionally, when placing a new node below an existing non-error node with a visualization enabled, place the new node below the visualization. (Previously, the new node was placed to the left of the visualization.)

https://www.pivotaltracker.com/story/show/180887079

#### Visuals

The following screencast demonstrates the feature on various arrangements of selected nodes, with visualization enabled and disabled.

https://user-images.githubusercontent.com/273837/159971452-148aa4d7-c0f3-4b48-871a-a2783989f403.mov

The following screencast demonstrates that new nodes created by double-clicking an output port of a node with visualization enabled are now placed below the visualization:

https://user-images.githubusercontent.com/273837/160107733-e3f7d0f9-0161-49d1-8cbd-06e18c843a20.mov

# Important Notes
- Some refactorings that were needed for this PR were ported from the #3301 PR:
- the code responsible for calculating the positions of new nodes was moved to a separate module (`new_node_position`);
- the `free_place_finder` module was made a submodule of the `new_node_position` module, due to the latter being its only user.
2022-03-31 20:17:04 +00:00
Mateusz Czapliński
b8a5e22ef8
Placement of newly opened Component Browser dictated by the mouse pointer. (#3301)
Use a new algorithm for placement of new nodes in cases when:

- a) there is no selected node, and the `TAB` key is pressed while the mouse pointer is near an existing node (especially in an area below an existing node);
- b) a connection is dragged out from an existing node and dropped near the node (especially in an area below the node).

In both cases mentioned above, the new node will now be placed in a location suggested by an internal algorithm, aligned to existing nodes. Specifically, the placement algorithm used is similar to when pressing `TAB` with a node selected.

For more details, see: https://www.pivotaltracker.com/story/show/181076066

# Important Notes
- Visible visualizations enabled with the "eye icon" button are treated as part of a node. (In case of nodes with errors, visualizations are not visible, and are not treated as part of a node.)
2022-03-31 14:16:28 +00:00
Radosław Waśko
43265f10a8
Implement Error-Handling for Database aggregations, unify some error helpers across backends (#3371) 2022-03-31 12:10:22 +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
Ilya Bogdanov
e9f3b2327e
GraphEditor Unit Tests (#3352)
[ci no changelog needed]

This PR adds a few simple unit tests for GraphEditor, that can be used as an example of native Unit Tests.

Covered:
1. Creating nodes
- By internal API
- By using a TAB shortcut
- By using (+) button
- By dropping edge
2. Connecting two nodes with an edge

Some APIs were extended to allow their testing.

Usage of `glyph::System` in `text/component/area` was disabled by conditional compilation, as this code can't be used in native code due to JS dependencies.
2022-03-30 12:49:07 +00:00
Wojciech Daniło
fbd80ad4a3
Allowing EnsoGL mouse to interact with more than 4096 sprites (#3369) 2022-03-30 04:50:55 +02: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
Mateusz Czapliński
7152e0d44d
Revert "Allowing EnsoGL mouse to interact with more than 4096 sprites at the same time. (#3351)" (#3368)
This reverts commit 546c333269.
2022-03-29 11:24:28 +02:00
Wojciech Daniło
546c333269
Allowing EnsoGL mouse to interact with more than 4096 sprites at the same time. (#3351) 2022-03-29 04:15:08 +02: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
Kaz Wesley
bec7a58a28
Build and memoize a GLSL prelude (#3365)
Saves ~375 ms during startup.
2022-03-25 17:49:26 -07:00
Dmitry Bushev
a34c2bcfe6
Implement Documentation Sections API (#3360) 2022-03-25 10:49:37 +03:00
Kaz Wesley
39f39fa687
Log set_context in profile data (#3362)
Any context loss is relevant to performance. Also, having the event in the log
may help debugging any context-loss-related issues we might encounter.
2022-03-24 21:30:15 +01: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
Kaz Wesley
edadca1c88
Make IntelliJ workaround compatible with 'run watch --crate' (#3355) 2022-03-23 11:42:45 -07: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
Michael Mauderer
6ad3dd571c
Frp profiling stats (#3323) 2022-03-23 12:06:25 +01:00
James Dunkerley
02bcfbb2a8
Refactor Aggregate Column (#3349)
- Make it easier to understand the computations.
- Fix issue with First.
- Improve quote handling in Concatenate
- Added validation and warnings to input
2022-03-22 18:18:46 +00:00
Wojciech Daniło
ccaf24877f
Updating paste macro usage (#3334) 2022-03-22 11:43:14 +01:00
Kaz Wesley
a87b2021a3
Profiling application details (#3332)
* Profiling application details

Add enough profiling to account for every missed frame during startup.

See https://www.pivotaltracker.com/story/show/181499507

* Build ActiveInterval hierarchy in profiler_data

* update doctests / await_!

* docs/formatting/naming

* more graph modes

* increase WASM size

Due to new render-profile-flamegraph scene. We should remove these from the main release WASM blob one way or another.

* lint

* fix a test

* Organization (feedback)

* Add @wdanilo to Cargo.lock CODEOWNERS

As discussed after my previous PR got stuck waiting for Cargo.lock review.

* fix doctests

* Update docs. Removed a limitation.
2022-03-21 11:09:56 -07:00
Mateusz Czapliński
b117a7ddae
Opening Component Browser by clicking on the output port (#3346)
Double-clicking a node's output port or clicking the port with a right mouse button (RMB) creates a new node aligned to the clicked node.

#### Visuals

The screencast below demonstrates the following features:
- double-clicking the left mouse button on a node's output port;
- clicking the right mouse button on a node's output port;
- alignment of the nodes created as a result of the actions described above;
- corner case: double-clicking (and RMB-clicking) on output ports of a "collapsed" ("enterable") node;
- double-clicking on a "collapsed" ("enterable") node still allows entering the node when done over an area of the node that is not the node's output port;
- basic support for nodes with multiple output ports (shown on the `interface` demo scene).

https://user-images.githubusercontent.com/273837/158991856-e0faa5f0-9d2f-44bd-bddd-ba314977db6e.mov

The supplementary screencast below demonstrates that double-clicking or RMB-clicking a node's output port cancels the action of dragging a new connection from a node.

https://user-images.githubusercontent.com/273837/158998097-100aed42-37ff-4467-939f-2b755ef0d3dc.mov




https://www.pivotaltracker.com/story/show/181076145

# Important Notes
- The "double-clicking a node" shortcut was previously used to allow entering a "collapsed" node (for example, a node created by pressing the `cmd+g` keyboard shortcut after selecting a group of nodes). This PR keeps that functionality when the user double-clicks on a node, as long as the mouse is not positioned over the node's output ports.
- The support for nodes with multiple output ports is currently very basic. The information about a port (`Crumb`) is passed into the `create_node` function, but it is not passed further to `NodeSource`. The Node Searcher currently does not support passing port information through `NodeSource`.
2022-03-21 15:08:17 +00: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
Dmitry Bushev
9d402bd599
Split documentation comment into sections (#3347) 2022-03-21 10:14:25 +03: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
Ilya Bogdanov
466f1e29c3
Fix enso-formatter unit test (#3345)
Unit test in enso-formatter is fixed and re-enabled.

[ci no changelog needed]

The fix by @wdanilo
2022-03-18 14:49:38 +00:00
Michael Mauderer
ec9c2f35e8
Bump Rust toolchain to nightly-2022-02-24. (#3348) 2022-03-18 13:45:56 +00:00
Adam Obuchowicz
5b7576f53a
Fix compilation error when building single graph_editor crate (#3319)
@akavel spotted a compilation error, when building test for graph_editor crate. The cause was that:
* prelude without serde still added serde derivatives in im_string_newtype
* and the graph_editor needs serde from prelude anyway (because it wants to have serializable ImStrings).
2022-03-17 14:35:35 +01:00
Michael Mauderer
28be22fea5
Fix performance issue with too many labels existing in the performance visualisation. (#3336)
This PR resolves the issue that too many text labels are created in the performance visualization.

https://user-images.githubusercontent.com/1428930/158601643-d8941752-2922-4551-9759-62fa468289ec.mp4

# Important Notes
[ci no changelog needed]
2022-03-17 11:44:40 +00:00
Ilya Bogdanov
cdcc852e03
Node searcher zoom & edited node growth/shrink animation (#3327)
In this PR two things are implemented:
1. Node Searcher zoom factor (and therefore its size) is fixed no matter how you move the main camera. The node searcher is also positioned directly below currently edited node at all times.
2. Node growth/shrink animation when you start/finish node editing. After animation end the edited node zoom factor is also fixed and matches the zoom factor of the node searcher.

See attached video with different ways of editing/creating nodes:

https://user-images.githubusercontent.com/6566674/157348758-2880aa2b-494d-46e6-8eee-a22be84081ed.mp4


#### Technical details

1. Added several additional scene layers for separate rendering: `node_searcher`, `node_searcher_text`, `edited_node`, `edited_node_text`. Searcher is always rendered by `node_searcher` camera, edited node moves between its usual layers and `edited_node` layer. Because text rendering uses different API, all node components were modified to support change of the layer.
2. Also added `node_searcher` DOM layer, because documentation is implemented as a DOM object.
3. Added two FRP endpoints for `ensogl::Animation`: `on_end` and `set_value`. These endpoints are useful while implementing growth/shrink animation.
4. Added FRP endpoints for the `Camera2d`: `position` and `zoom` outputs. This allows to synchronize cameras easily using FRP networks.
5. Growth/shrink animation implemented in GraphEditor by blending two animations, similar to Node Snapping implementation. However, shrinking animation is a bit tricky to implement correctly, as we must always return node back to the `main` scene layer after editing is done.
2022-03-17 10:38:18 +00:00
Ilya Bogdanov
11dfd7bfc9
Return creating node with (+) button & fix a regression (#3338)
* Creating a new node with the (+) button (#3278)

[The Task](https://www.pivotaltracker.com/story/show/180887253)

A new (+) button on the left-bottom corner appeared. It may be clicked to open searcher in the middle of the scene, as an alternative to tab key.

https://user-images.githubusercontent.com/3919101/154514279-7972ed6a-0203-47cb-9a09-82dba948cf2f.mp4

* The window_control_buttons::common was extracted to separate crate `ensogl-component-button` almost without change.
* This includes a severe refactoring of adding nodes in general in the Graph Editor. The whole responsibility of adding new nodes (and starting their editing) was moved to Graph Editor - the Project View only reacts for GE events to show searcher properly.
* The status bar was moved from the bottom-left corner to the middle-top of the scene. It does not collide with (+) button, and plays "notification" role anyway.
* The `interface` debug scene was buggy. The problem was with one expression's span-tree. When I replaced it, the scene works.
* I've removed "new searcher" API, as it is completely outdated.
* I've changed code owners of integration tests to GUI team, as it is the team writing mostly the integration tests (int rust)

* Fix regression #181528359

* Add docs & remove unused function

* Fix & enable native Rust tests

* Fix formatting

Co-authored-by: Adam Obuchowicz <adam.obuchowicz@enso.org>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2022-03-16 21:02:47 +03: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
08183f59f2
Minor fixes for Text (#3340)
* Avoid unnecessary copies

* Add tests for conversions

* Add guidelines for Text tests

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2022-03-15 16:11:46 +00:00
Michał Wawrzyniec Urbańczyk
5bc9811f6a
Remove Windows code signing environment. (#3343) 2022-03-15 16:07:52 +01:00
James Dunkerley
6c1c4554f5
Refactor table.group_by to table.aggregate (#3339)
Following UX work move to `table.aggregate` function.
2022-03-15 15:23:36 +01: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
Kaz Wesley
348abdb680
Generate reports about profiling results of top-level sections of the application. (#3306) 2022-03-15 03:12:39 +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