Commit Graph

158 Commits

Author SHA1 Message Date
Kaz Wesley
bd60a20bd3
Profiling workflows (#3475)
Define some workflows for batch-mode profiling.

Implemented:
- collapse nodes
- create node
- enter collapsed node
- new project
- open visualization

They can currently be built and run with a command like:
`./run.sh ide build --profiling-level=debug && dist/ide/linux-unpacked/enso --entry-point profile --workflow create_node --save-profile out.json`

And the data can be displayed with:
`dist/ide/linux-unpacked/enso --entry-point profiling_run_graph --load-profile out.json`

Demo of recording and viewing a profile with a command-line one-liner:

https://user-images.githubusercontent.com/1047859/169954795-2d9520ca-84f9-45d2-b83a-5063ebe6f718.mp4

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

# Important Notes
- When defining workflows, two helpers are enough to allow us to tell when the action is really done: `Fixture::compile_new_shaders`, and `Fixture::backend_execution`. Often, it is appropriate to await both, but it depends on the task.
- The shader compiler is now driven by a `Controller`; while the `Compiler` is reset if context is lost, the `Controller`'s state survives context loss.
- A new `--load-profile` option supports specifying a profile by path when running `profiling_run_graph`.
- Drop the `with_same_start` profiler interface; we ended up preferring a child profiler convention, and this interface was not implemented compatibly with the stricter data model we've had since the introduction of `profiler::data`.
- Fix the noisy `rustfmt` output.
2022-06-01 18:01:16 +00:00
Michał Wawrzyniec Urbańczyk
6fc4947764
Bumped the build script (#3489)
* The bash entry point was renamed `run.sh` -> `run`. Thanks to that `./run` works both on Linux and Windows with PowerShell (sadly not on CMD). 
* Everyone's favorite checks for WASM size and program versions are back. These can be disabled through `--wasm-size-limit=0` and `--skip-version-check` respectively. WASM size limit is stored in `build-config.yaml`.
* Improved diagnostics for case when downloaded CI run artifact archive cannot be extracted. 
* Added GH API authentication to the build script calls on CI. This should fix the macOS build failures that were occurring from time to time. (Actually they were due to runner being GitHub-hosted, not really an OS-specific issue by itself.)
* If the GH API Personal Access Token is provided, it will be validated. Later on it is difficult to say, whether fail was caused by wrong PAT or other issue.
* Renamed `clean` to `git-clean` as per suggestion to reduce risk of user accidently deleting unstaged work. 
* Whitelisting dependabot from changelog checks, so PRs created by it are mergeable.
* Fixing issue where wasm-pack-action (third party) randomly failed to recognize the latest version of wasm-pack (macOS runners), leading to failed builds.
* Build logs can be filtered using `ENSO_BUILD_LOG` environment variable. See https://docs.rs/tracing-subscriber/0.3.11/tracing_subscriber/struct.EnvFilter.html#directives for the supported syntax.
* Improve help for ci-run source, to make clear that PAT token is required and what scope is expected there.

Also, JS parts were updated with some cleanups and fixes following the changes made when introducing the build script.
2022-06-01 13:44:40 +02:00
Adam Obuchowicz
9c13a7fcbf
Integration Test for getComponentGroups method (#3483)
This PR contains minimal integration with new engine's method and an integration test printing the method's return value. It was written as a part of https://www.pivotaltracker.com/story/show/181743571

# Important Notes
The test requires 2022.1.1-nightly.2022-04-26 engine version or later.
2022-05-27 11:47:44 +00:00
Mateusz Czapliński
58581b69d0
Quick lookup Suggestion Database Entries by Name. (#3446)
Add a method in `SuggestionDatabase` allowing to find a suggestion entry by a fully qualified path, working faster than a linear search through all the entries in the `SuggestionDatabase`.

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

# Important Notes
- **Testing:** when testing the PR with the newest currently available nightly version of the Engine, you may observe the following warnings in the Chrome JS Developer Console (the numerical values may differ):

index.ts?ab16:289 WARN app/gui/src/model/suggestion_database.rs:61 An existing suggestion entry id at Standard.Base.Nothing.Nothing.is_nothing was overwritten with 768.
index.ts?ab16:289 WARN app/gui/src/model/suggestion_database.rs:61 An existing suggestion entry id at Standard.Base.Data.Numbers.Integer.up_to was overwritten with 936.
index.ts?ab16:289 WARN app/gui/src/model/suggestion_database.rs:61 An existing suggestion entry id at Standard.Base.Data.Numbers.Integer.down_to was overwritten with 937.
index.ts?ab16:289 WARN app/gui/src/model/suggestion_database.rs:61 An existing suggestion entry id at Standard.Base.Data.Text.Text.== was overwritten with 971.

This is a result of bugs in the Standard Library. Those are planned to be addressed by:
- #3480 short-term (to fix the specific bugs currently present in the Standard Library),
- https://www.pivotaltracker.com/story/show/182283983 long-term (to improve the Engine such that it disallows introducing this category of bugs in the Standard Library in the future).

(For more details, see also: https://discord.com/channels/401396655599124480/978929754138877962.)

As a result of the bugs mentioned above, the Engine is responding with some invalid replies. In case of such invalid replies, warnings are emitted in the JS Dev Console. Other than the warnings, the code is expected to work correctly with the Engine for the cases when the Engine returns correct data.
- A `HashMapTree` was used for storing the map. A quick back-of-the-envelope estimation of memory usage of a simpler alternative (a one-level `HashMap`) would put the alternative at ~1MB (~10k entities × averaged ~100 bytes per entity path), which was considered too much in a discussion with @farmaazon.
- The `HashMapTree::remove` method deletes a whole subtree of a `HashMapTree`. An alternative removal method was implemented for use in `suggestion_database::QualifiedNameToIdMap` to better match `HashMap` entry removal semantics.
- In case of path collisions, a warning is emitted.
- Paths are treated case-sensitively.
- The new method of the `SuggestionDatabase` type is currently only used in unit tests. This matches the explicit requirement in the Task's description.
- JS Developer Console logging was enabled for the `tracing` package. The `WARN` level was picked to match the default level enabled in the "old" logging infrastructure.

[ci no changelog needed]
2022-05-26 14:09:55 +00:00
Adam Obuchowicz
eef0738f63
Component Group Entry with icons and text highlighting. (#3459)
This PR extends the Component Group Entry with icon and option to highlight the text. Here the convert has highlighted "con".

https://user-images.githubusercontent.com/3919101/169046537-4f8b823c-322e-40dc-8abb-24d1d7092341.mp4


### Important Notes

Although this PR includes effort for adjusting Component Group style to better reflect the design, it is not entirely finished: the selection still works badly and will be fixed in another PR.
2022-05-24 09:48:19 +02:00
Michał Wawrzyniec Urbańczyk
14a01c4635
New IDE build script (#3466) 2022-05-23 04:16:04 +02:00
Ilya Bogdanov
4ebf637fd4
Fully visible group name in partially scrolled Component Group View (#3447)
[ci no changelog needed]

[Task link](https://www.pivotaltracker.com/story/show/181725003)

This PR implements a fully visible component group header while scrolling the group (using the ScrollArea).
The header moves in sync with scrolling movements (using new `set_header_pos` FRP input), so it looks like the component group is scrolled. ScrollArea masks the "scrolled" entries above the header. This design allows a fully visible header even though our renderer doesn't support nested layers masking yet.

The screencast:

https://user-images.githubusercontent.com/6566674/168320360-2c2017b2-0ef5-42ce-9c79-82b9641c1d73.mp4


The most recent one, with the updated demo scene from develop:


https://user-images.githubusercontent.com/6566674/168555268-8552c4b0-f887-4388-89a1-e65ddf668be6.mp4

# Important Notes
- I fixed the API of the list view so now it supports non-hardcoded scene layers (previously it did not). I also believe it was implemented incorrectly.
- I've found a [pretty weird bug](https://www.pivotaltracker.com/story/show/182193824): the component group inside the ScrollArea is invisible unless I add some arbitrary shape to the scroll area content. I use a `transparent_circle` for this purpose in the demo scene. The bug is probably related to masking the sublayers, though I wasn't able to reproduce it properly on a simpler example.
- The selection box is removed from the demo scene as agreed with @farmaazon . The correct implementation has proven to be much harder than I expected, and we will implement another approach in a separate PR.
- I also modified the `shadow::Parameters` so that it uses `Var`s instead of plain values.
2022-05-17 13:52:08 +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
Michael Mauderer
fd3c316636
Fix default text color not being applied correctly. (#3456) 2022-05-17 09:57:40 +01:00
Wojciech Daniło
9e219d698c
Initial parser implementation in Rust (#3341) 2022-05-17 05:13:20 +02:00
Michael Mauderer
0b34346c19
Improve profiling for UI interactions v2. (#3451)
* Extends the instrumentation of the code base and upgrades some FRPs to the newer API macro.
* Extends the run-graph demo scene to specify a profile via URL without recompilation.
* Fixes labels in the flame graph demo scene.
* Fixes an issue with loading profiles that contains escaped characters.

# Important Notes
* no longer contains the upgrade of the `text::View` to `define_endpoints_2`. This should be fixed as part of the text rendering rewrite.

[ci no changelog needed]
2022-05-16 12:28:50 +00:00
Michael Mauderer
c313a4c499
Recommend installing a new version of wasm-opt. (#3452)
Update contributing guidelines to include a recommendation for installing `wasm-opt`.

# Important Notes
[ci no changelog needed]
2022-05-16 07:35:17 +00:00
Michael Mauderer
ba651428aa Revert "Recommend installing a new version of wasm-opt."
This reverts commit 08f3ad3d0b.
2022-05-13 13:38:29 +01:00
Michael Mauderer
08f3ad3d0b Recommend installing a new version of wasm-opt. 2022-05-13 13:37:03 +01:00
Mateusz Czapliński
b7cf493f7d
Component Group View colors parametrization (#3434)
Parametrize the colors used in a Component Group view based on a single color passed to an FRP input.

Customizing the colors of a Component Group will be needed for the larger Component Group List panel. This customization will work as a visual hint for the User, helping them to distinguish different Component Groups in the panel. A single input color will be configured for every Component Group in the `package.yaml` file (see the Design Doc). Therefore, all shades of the color required by the Component Group view must be calculated from this single input color.

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

#### Visuals

The following screencast of the `component_group` debug scene shows how all required shades of color are calculated from a single input color. It also shows a new "dimmed" display mode of the Component Group. The debug scene does not support selecting entries in a "dimmed" Component Group, as this is not required by the Design Doc.


https://user-images.githubusercontent.com/273837/168074651-bf3d5ea5-99b0-4b69-9934-ad8565ffc54e.mov






The following is a screenshot of the Node Searcher, to demonstrate that it still works correctly:

<img width="623" alt="Screenshot 2022-05-09 at 17 13 01" src="https://user-images.githubusercontent.com/273837/167441109-e9a47b5a-45a2-4172-85ed-c593e43e02d6.png">

# Important Notes
- A new type `Params` was added in the `list_view::entry::Entry` trait. This was needed to allow passing FRP information to entries separately for every ListView instance.
- Note: `style_prefix` and `max_width_px` parameters of the `list_view::entry::Entry::new` function may get moved into the new `Params` type in the future. To save time, this was not attempted in this PR, as agreed with @farmaazon.

[ci no changelog needed]
2022-05-13 08:38:43 +00:00
Kaz Wesley
d4d725ade6
Fix blink when adding node (#3448)
Fix blink when adding node
2022-05-12 16:17:29 -07:00
Michael Mauderer
d24f0f7ebb
Revert "Improve profiling for UI interactions. (#3437)" (#3449)
This reverts commit e6133444ce.
2022-05-13 00:18:57 +02:00
Michael Mauderer
e6133444ce
Improve profiling for UI interactions. (#3437)
* Extends the instrumentation of the code base and upgrades some FRPs to the newer API macro.
* Extends the run-graph demo scene to specify a profile via URL without recompilation.
* Fixes labels in the flame graph demo scene.
* Fixes an issue with loading profiles that contains escaped characters.

# Important Notes
[ci no changelog needed]
2022-05-12 15:05:01 +00:00
Ilya Bogdanov
1c8aa26f90
Wide Componet Group List (#3409)
[ci no changelog needed]

[Task link](https://www.pivotaltracker.com/story/show/181414466)

This PR brings a new UI component: Wide Component Group. This is a three-column headerless container similar to Component Group. See the updated `component-group` demo scene:


https://user-images.githubusercontent.com/6566674/166933866-e5bee142-5176-4a02-bc18-a5bfd96ccbe2.mp4
2022-05-12 09:30:00 +00:00
Kaz Wesley
0e904b2256
Profiling batch mode (#3428)
Implement a command that launches the application, runs a series of steps (a "workflow"), writes a profile to a file, and exits.

See: [#181775808](https://www.pivotaltracker.com/story/show/181775808)

# Important Notes
- The command to capture run and profile is used like: `./run profile --workflow=new_project --save-profile=out.json`. Defining some more workflows (collapse nodes, create node and edit value) comes next; they are implemented with the same infrastructure as the integration-tests.
- The `--save-profile` option can also be used when profiling interactively; when the option is provided, capturing a profile with the hotkey will write a file instead of dumping the data to the devtools console.
- If the IDE panics, the error message is now printed to the console that invoked the process, as well as the devtools console. (If a batch workflow fails, this allows us to see why.)
- New functionality (writing profile files, quitting on command, logging to console) relies on Electron APIs. These APIs are implemented in `index.js`, bridged to the render process in `preload.js`, and wrapped for use in Rust in a `debug_api` crate.
2022-05-10 19:34:40 +00: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
Mateusz Czapliński
ffe6700901
Parametrize font in List View via styles (#3427)
Make it possible to parametrize the font in different instances of `ListView` via styles. This makes it possible for the Component Group view to use a `ListView` with `list_view::entry::Label` underneath with a different visual style than the default `ListView` used in other places in the IDE.

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

#### Visuals

This feature allows the Component Group visual component to use a proportional font for its entries, as seen in the `component_group` debug scene:

<img width="180" alt="Screenshot 2022-05-02 at 14 50 46" src="https://user-images.githubusercontent.com/273837/166236411-1d139114-b099-4a10-8d44-48713d155d1e.png">


The other instances of ListView still use a monospaced font as before:

<img width="152" alt="Screenshot 2022-04-29 at 14 45 57" src="https://user-images.githubusercontent.com/273837/165950535-6cffd0df-d84e-4f74-8d48-3114aea9fc68.png">

<img width="629" alt="Screenshot 2022-04-29 at 14 46 35" src="https://user-images.githubusercontent.com/273837/165950578-0439d078-0224-4138-b38f-4bb799b004aa.png">

The `text_area` debug scene works correctly:

<img width="340" alt="Screenshot 2022-04-29 at 14 46 12" src="https://user-images.githubusercontent.com/273837/165950564-fbbde201-c5ad-448e-af3d-8a7494757932.png">

# Important Notes
- Parsing `String` values into `style::Data` should now be done through the `FromStr` trait, instead of the `TryFrom<String>` trait as previously. (Note: the `String::parse` function in the Rust standard library uses the `FromStr` trait underneath.)

[ci no changelog needed]
2022-05-04 10:44:57 +00:00
Kaz Wesley
ce78f9825d
New profiling format (#3413)
* New JSON profile format.

* Use string-table optimization for labels in JSON format.

* Use TimeOffset header to render beanpoles

* Log RPC messages sent to the backend.

* Display RPC requests on graph

* Simplify metadata-logging interface.
2022-05-03 10:54:48 -07:00
Michael Mauderer
8f99014477
Implement multi-process message visualisation. (#3423)
Implements a visualization that is integrated with our GUI profiling visualization for the multiprocess data implemented in #3395

https://user-images.githubusercontent.com/1428930/165915395-c850c7b2-1cc5-4eb0-8f21-37565d113b1e.mp4

The visualization shows a horizontal line for Engine, Language Server and GUI and renders arrows for each message passed between them. Information about the message is revealed on hover.

# Important Notes
* this PR refactors the tooltip mechanism. Note that this has not been in active use anywhere else, as tooltips for node received a custom implementation and the tooltip that was previously implemented was used nowhere else yet.

[ci no changelog needed]
2022-05-03 09:40:27 +00:00
Adam Obuchowicz
8041fe0e49
Selectable Header in Component Group View. (#3418)
* The List View component was refactored: it allows for hiding the internal selection widget, and exposes information where the widget should be placed. This allows us to create selection widget in component list panel, so it can be animated between component groups and sections.
* Fixed some warnings when checking WASM code.
* Adjusted the style of Component Group View a little, so it better reflects the design doc. Still not ideal, because the list_view has some weird design regarding padding, but I don't want to stuck in some bigger refactoring.

I will add a video in a few minutes.

# Important Notes
https://user-images.githubusercontent.com/3919101/165507826-60329f9e-7de3-4eb2-9271-292e45568cb2.mov
2022-04-30 14:48:52 +00:00
Kaz Wesley
d59710c3cd
Multi-process profiles. (#3395)
See: [#181837344](https://www.pivotaltracker.com/story/show/181837344).

I've separated this PR from some deeper changes I'm making to the profile format, because the changeset was getting too complex. The new APIs and tools in this PR are fully-implemented, except the profile format is too simplistic--it doesn't currently support headers that are needed to determine the relative timings of events from different processes.

- Adds basic support for profile files containing data collected by multiple processes.
- Implements `api_events_to_profile`, a tool for converting backend message logs (#3392) to the `profiler` format so they can be merged with frontend profiles (currently they can be merged with `cat`, but the next PR will introduce a merge tool).
- Introduces `message_beanpoles`, a simple tool that diagrams timing relationships between frontend and backend messages.

### Important Notes
- All TODOs introduced here will be addressed in the next PR that defines the new format.
- Introduced a new crate, `enso_profiler_enso_data`, to be used by profile consumers that need to refer to Enso application datatypes to interpret metadata.
- Introduced a `ProfileBuilder` abstraction for writing the JSON profile format; partially decouples the runtime event log structures from the format definition.
- Introducing the conversion performed for `ProfilerBuilder` uncovered that the `.._with_same_start!` low-level `profiler` APIs don't currently work; they return `Started<_>` profilers, but that is inconsistent with the stricter data model that I introduced when I implemented `profiler_data`; they need to return profilers in a created, unstarted state. Low-level async profilers have not been a priority, but once #3382 merges we'll have a way to render their data, which will be really useful because async profilers capture *why* we're doing things. I'll bring up scheduling this in the next performance meeting.
2022-04-21 16:44:03 +02:00
Ilya Bogdanov
ea33387836
Update electron-builder to v23.0.6 (#3410)
[ci no changelog needed]

[Task link](https://www.pivotaltracker.com/story/show/181944234).

It fixes the build issue on Mac OS 12.3.1 that is caused by removed `/usr/bin/python` executable.

Also applied `enso-formatter` to the sources.

# Important Notes
We're basically updating for one major `electron-builder` release - from `v22` to `v23`. I didn't spot anything in the changelog that could affect us. See features + breaking changes excerpt:

```
Features:

- feat(msi): add fileAssociation support for MSI target (https://github.com/electron-userland/electron-builder/pull/6530)
- feat(mac): ElectronAsarIntegrity in electron@15 - See: https://github.com/electron/electron/pull/30667 (https://github.com/electron-userland/electron-builder/issues/6506 https://github.com/electron-userland/electron-builder/issues/6507)
- feat(snap): add lzo to Snap compression options (also as new default) (https://github.com/electron-userland/electron-builder/pull/6201) Upgraded app-builder-bin dependency required newer version of Go
- feat(msi): support assisted installer for MSI target (https://github.com/electron-userland/electron-builder/pull/6550)

Breaking changes:

- Removing Bintray support since it was sunset. Ref: https://jfrog.com/blog/into-the-sunset-bintray-jcenter-gocenter-and-chartcenter/
- Fail-fast for windows signature verification failures. Adding -LiteralPath to update file path to disregard injected wildcards
- Force strip path separators for backslashes on Windows during update process
- Authentication for local mac squirrel update server
- Disabled advertised shortcuts, since MSIs with advertised Start Menu shortcuts that have a
Shortcut Property fails to install when deployed machine-wide via GPO but works fine in all
other contexts. Admins using advertisement must apply an MST to re-enable it. See https://github.com/electron-userland/electron-builder/issues/6508.
- Removing optional NSIS icon ID from config and generating it automatically to synchronize IDs with Advertised Shortcuts and future features
```
2022-04-21 11:36:32 +00:00
Michael Mauderer
e8342b04c3
Integrate Ensogl stats with profiling framework (#3388)
Add logging of EnsoGL performance stats to the profiling framework. Also extends the visualization in the debug scene to show an overview of the performance stats. We now render a timeline of blocks that indicate by their colour the rough FPS range we are in:

https://user-images.githubusercontent.com/1428930/162433094-57fbb61a-b502-43bb-8815-b7fc992d3862.mp4

# Important Notes
[ci no changelog needed]

Needs to be merged after https://github.com/enso-org/enso/pull/3382 as it requires some changes about metadata logging from there. That is why this PR is currently still in draft mode and based on that branch.
2022-04-21 09:38:26 +00:00
Michael Mauderer
24e0f33d8e
Backend Communication Profiling (#3382) 2022-04-19 13:30:29 +02:00
Michał W. Urbańczyk
26a3c670a3 Fix prettier formatting. Also, a typo. 2022-04-19 08:05:30 +02:00
Wojciech Daniło
e8dfc6d270
Update Rust style guide (#3172) 2022-04-15 16:10:55 +02:00
Wojciech Daniło
7d1af95745
Fixing regression - mouse buttons were not distinguished properly. (#3401) 2022-04-15 16:08:30 +02:00
Wojciech Daniło
d5d5d3aac5
Render on demand. (#3397) 2022-04-14 22:28:38 +02:00
Mateusz Czapliński
e75df61b2c
Component Group View with static header and without icons (#3373)
Add an initial version of the visual component for displaying the Component Group View. The component contains a header (for displaying the Group Name) and a list of labels (for displaying the component names).

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


#### Visuals

A screenshot from a debug scene demonstrating the component:

<img width="251" alt="Screenshot 2022-04-13 at 20 07 56" src="https://user-images.githubusercontent.com/273837/163243304-21c3ad78-4813-4368-b3bb-844d979da699.png">



Screenshots from other debug scenes (`list_view` and `text_area`), demonstrating that the other components still display correctly:

<img width="202" alt="Screenshot 2022-04-13 at 20 08 56" src="https://user-images.githubusercontent.com/273837/163243428-de9dc1c7-5a9f-45e0-9325-db60cece9768.png">


<img width="403" alt="Screenshot 2022-04-13 at 20 08 48" src="https://user-images.githubusercontent.com/273837/163243432-895061d9-5bd9-4349-8679-eb63b0f6724d.png">


A screenshot of the Node Searcher's list, showing that long entries in a ListView are now truncated, and an ellipsis character is added in place of removed characters:


<img width="651" alt="Screenshot 2022-04-13 at 20 10 16" src="https://user-images.githubusercontent.com/273837/163243664-5b671969-7aa0-4bef-8fd2-825602d85848.png">

# Important Notes
- Adding support for the text truncation feature in `ListView` required some changes in the`list_view::Entry`-related APIs.
- An embedded font was added (DejaVuSans-Bold) for use in the Component Group View debug scene, and 5 unused embedded fonts were removed.
2022-04-14 10:37:40 +00:00
Wojciech Daniło
6b7622dd45
Multi-frame shader compilation (#3378) 2022-04-12 17:56:38 +02: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
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
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
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
Michael Mauderer
6ad3dd571c
Frp profiling stats (#3323) 2022-03-23 12:06:25 +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
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
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
Kaz Wesley
348abdb680
Generate reports about profiling results of top-level sections of the application. (#3306) 2022-03-15 03:12:39 +01:00
Dmitry Bushev
3ef18ab5b8
Update Electron (#3316)
PR fixes the issue when the user is unable to sign in with Google.

In the end, my assumption about the `User-Agent` header was correct and Google sign-in works with the recent Electron out of the box.
2022-03-10 07:44:19 +00:00
Wojciech Danilo
55dce7af65 Fixing build. 2022-03-10 06:21:57 +01:00
Wojciech Danilo
2accb722a8 Applying review 2022-03-10 05:57:59 +01:00
Wojciech Danilo
73f33d1c7f Linting codebase 2022-03-10 05:32:33 +01:00
Ilya Bogdanov
31be7c8b9a
Revert "Adding new node with (+) button" (#3328)
[ci no changelog needed]

This PR reverts commit [0836ce741d](0836ce741d) because of the spotted regression:

To reproduce:
1. Open a default project.
2. Without doing anything else, cmd + click on any node to edit it.
3. Abort editing by pressing escape.
4. Top-most node disappears (it is actually removed from scene)
If you start editing the bottom node - you will also see a visible regression in node searcher's position.

See thread https://discord.com/channels/401396655599124480/950730235719065620/950731247909478410 for details.
2022-03-09 11:44:39 +00:00
Mateusz Czapliński
e5af1c5da1
Fix the style of comments introduced in PR #3307. (#3313)
Fix comments introduced in commit 807506485d so that they're full English sentences (ending in a dot `.`). Also, fix them to avoid redundantly spelling "All" and "always" in the same sentences.

See a thread on Discord: https://discord.com/channels/401396655599124480/407883608204771338/948857557219418162

> Your commit is not following style guide (https://github.com/enso-org/enso/pull/3307). Please revert it and create a PR with comments that are correct English sentences (with dots at the end).
> Also, why some of the comments have ", always." ending and some not? I understand that "Modules should be documented" is applied always as well, isn't it?

# Important Notes
[ci no changelog needed]
2022-03-08 09:13:09 +00:00
Wojciech Daniło
f4d236fcd4
EnsoGL context abstraction (#3293) 2022-03-04 15:13:23 +01:00
Michael Mauderer
d3cc2c1025
Flame Graph for Profiling Data (#3297)
Add an API to create a flame graph from profiling data. Also adds a demo scene showcasing the functionality that generates some profiling data by measuring dummy function calls and rendering a flame graph for the dummy data (see video for the result).

Not that the functionality is not yet exposed user-facing in the GUI itself, but only as API and demo scene, therefore [ci no changelog needed]

https://user-images.githubusercontent.com/1428930/155118977-ecac0628-777c-48bd-9aa7-30ee6aef1976.mp4

# Important Notes
* Change from the initial design: labels are shown on the flame graph instead of as a tooltip. This is because tooltips are currently only implemented in the graph editor and would require some additional refactoring (probably taking the better part of a day).
* re-instated the behaviour that logs are shown in the JS console if development mode is active.
2022-03-03 22:23:27 +00:00
Mateusz Czapliński
807506485d
Remove mod-level "allow missing docs" in graph-editor; add entity-level FIXMEs. (#3307)
Remove a module-level `#![allow(missing_docs)]` attribute from 2 modules in `graph-editor` crate. Instead, add the same attribute with a `FIXME` comment to lower-level entities.

See discussion at: https://discord.com/channels/401396655599124480/947797676823560193

# Important Notes
There are still 37 module-level `allow(missing_docs)` attributes present in the codebase after this change:

```
$ git grep '^#!.allow.missing_docs.' | wc -l
22
$ git grep -A1 '^#.allow.missing_docs.' | grep -w mod | wc -l
15
```

[ci no changelog needed]
2022-03-01 13:59:36 +00:00
Ilya Bogdanov
abbb3a4679
Fix debug screen regression (#3300)
[ci no changelog needed]

Entry points links were not clickable if an empty entry name was provided, like `http://localhost:8080?entry=`

The reason was the loader div that covered the whole screen.
2022-02-24 21:55:41 +00:00
Adam Obuchowicz
0836ce741d
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

# Important Notes
* 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)
2022-02-24 16:01:54 +00:00
Adam Obuchowicz
9d6f9373f9
Add tests for debug mode and zoom restriction. (#3289)
This PR adds integration tests created during acceptance process of [181181159](https://www.pivotaltracker.com/story/show/181181159) and [181181203](https://www.pivotaltracker.com/story/show/181181203).

The PRs for those tasks were merged, because I hadn't realized they should not.

Additionally, as the `wasm-bindgen` version was bumped, I extended the timeout of integration tests and made them headless.
2022-02-22 16:43:37 +00:00
Ilya Bogdanov
67a1ae41a0
Restrict Graph Editor Zoom (#3295)
[Task link](#181181203).

This is a reincarnation of PR [3273](https://github.com/enso-org/enso/pull/3273).

The maximum zoom factor of Graph Editor is limited to 1.0x. It is not possible to zoom in from the default camera position.
Debug Mode (activated with `ctrl-shift-d` shortcut) allows to zoom up to 100.0x (the previous behavior of Graph Editor).

If you enable Debug Mode, then zoom in and disable Debug Mode - you won't see the immediate change of zoom factor back to 1.0x. But it will "jump" (with animation) back once you make a zoom in/out event with your controls.

Video:

https://user-images.githubusercontent.com/6566674/154037310-1d166737-353e-4ae6-aca1-f7840571ab16.mp4

# Important Notes
This is a reincarnation of PR [3273](https://github.com/enso-org/enso/pull/3273). There are two changes since that PR:
1. Fixed bug with GeoMap zooming described [here](https://github.com/enso-org/enso/pull/3290). This is done by restricting `ZoomEvent` API so that it will never contain `amount` which is equal to `0.0`.
2. A few refactoring changes from https://github.com/enso-org/enso/pull/3289 to simplify code a bit.
2022-02-22 11:23:59 +00:00
Mateusz Czapliński
b01217aa69
Allow collection of EnsoGL stats when Monitor panel is not visible (#3260)
This change makes EnsoGL runtime stats be always collected, even when EnsoGL `Monitor` panel is not visible. Those stats are intended to be used in the future by a profiling framework.

**Performance impact:** Continuous collection of stats introduces an overhead of two Web Performance API `now()` calls in each frame of the main rendering loop, plus a small number of simple arithmetic calculations. This is assumed to be a negligible and acceptable overhead.

#### Visuals



A screenshot of the Monitor panel in full `ide` after applying the PR, taken in IDE built with `./run dist`:


<img width="991" alt="Screenshot 2022-02-14 at 16 11 42" src="https://user-images.githubusercontent.com/273837/153891378-8a2fb333-34ce-46ce-99df-7d796817310c.png">

A recording, also in IDE built with `./run dist`; note that FPS is impacted by the act of recording itself:





https://user-images.githubusercontent.com/273837/154104016-49a12e23-1210-4477-9743-ec1611e5b4ed.mov




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

# Important Notes
- Responsibility for controlling how `Stats` gathering and calculation is performed at various points in the main rendering loop was removed from `Monitor` - the `Monitor`'s purpose is only to display existing data, it should not influence how the data is collected.
- Two previously existing distinct `Monitor` structs were merged into one, to avoid confusion; after previous refactorings, the remaining `stats::Monitor` did not have much useful code anyway.
- In `stats` package, refactoring was done, to make `StatsData` a "dumb", data-only type, and to move the logic related to stats collection and frame tracking to other helper types.


[ci no changelog needed]
2022-02-21 12:38:45 +00:00
Ilya Bogdanov
9ffeaf3e15
Revert "Restrict maximum zoom in Graph Editor (#3273)" (#3290)
This reverts commit dbcc2548df.
2022-02-21 09:26:12 +01:00
Ilya Bogdanov
dbcc2548df
Restrict maximum zoom in Graph Editor (#3273) 2022-02-16 20:13:39 +00:00
Michael Mauderer
32cfb0333a
Bump Rust toolchain to nightly-2022-01-20. (#3255) 2022-02-16 12:58:02 +00:00
Adam Obuchowicz
16a7ec7300
Quick fix initialization (#3274) 2022-02-14 19:04:31 +01:00
Ilya Bogdanov
03e105d42e
Debug Mode for Graph Editor (#3264) 2022-02-14 11:19:08 +01:00
Michał Wawrzyniec Urbańczyk
c268487ab6
Fix macOS icons generation. (#3267) 2022-02-11 19:01:16 +01:00
Adam Obuchowicz
c68ac5c0d6
Integration Test Framework (#3257) 2022-02-11 13:19:02 +01:00
Kaz Wesley
b0b035e73d
Profiling framework: core performance-logging implementation (#3238)
* profiling instrumentation

* Support native testing with mock impl of `mod js`

* Add benchmarks

* Wrapper: support methods.

* `#[profile]`: work in any context

* feature-gate lineno info that breaks IDE

* Support async; more docs; add perf analysis

* docs & formatting
2022-02-10 09:24:29 -08: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
Radosław Waśko
d3c0f968fa
Data analysts should be able to transform a Table using the remove_columns and reorder_columns functions (#3240) 2022-02-03 15:18:47 +01:00
Radosław Waśko
b5fc87e618
Data analysts should be able to transform a Table using the select_columns function (#3230)
* Utility for mapping errors and warnings
* Imlpement By_Index
* Expose select_columns in InMem and DB. Need testing
* checkpoint: writing tests
* Fix minor issues, mock warning mapping for testing purposes
* Improve By_Index error handling
* A helper for testing problem handling
* More error handling
* docs
* changelog
* Fix matching test
* Add SQLite tests
* cleanup after test
* Rework problem handling
* small refactor
* add examples
* Add more test cases for regex matching
* Fix Regex.Patter.matches to match full string
* "Fix" tests
2022-02-02 09:04:06 +00:00
Ilya Bogdanov
3905698b41
Implement creating nodes by dropping a connection (#3231) 2022-01-26 14:23:55 +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
66082ea554
The user should be able to remove duplicate elements from a Vector (#3224) 2022-01-17 12:51:56 +03:00
Michael Mauderer
5c525daefe Revert "Implement basic performance logging API. (#3169)"
This reverts commit 178cfb0404.
2022-01-14 12:40:28 +00:00
Ilya Bogdanov
bb86446003
Update JS deps on CI (#3218) 2022-01-13 12:44:16 +03:00
Ilya Bogdanov
1daf1db56e
Support source maps for JS-based visualizations (#3208) 2022-01-11 15:31:43 +03:00
Ilya Bogdanov
a4355876fa
Developers should be able to build and test desktop IDE on M1 Mac (#3194) 2022-01-10 12:18:34 +03:00
Michael Mauderer
178cfb0404
Implement basic performance logging API. (#3169) 2021-12-31 21:14:02 +01:00
Adam Obuchowicz
33f1c4bb19
Update the Documentation with the new directory structure. (#3212) 2021-12-30 10:29:20 +01:00
Adam Obuchowicz
e8077253c9
Finish integration refactoring (#3206)
All other things from the old integration layer were rewritten to some kind of presenter. The big integration module was removed.
2021-12-29 13:44:13 +01:00
Michał Wawrzyniec Urbańczyk
66c256a1f7
Self-hosted Engine CI for Windows and Linux (#3182) 2021-12-27 17:56:35 +01:00
Ilya Bogdanov
90ddba15dc
Add source maps for JS and TS files (#3204) 2021-12-27 09:32:23 +01:00
Ilya Bogdanov
fc953ec055
Fix regression in names of the template-based projects (#3201) 2021-12-24 11:29:06 +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
Adam Obuchowicz
567ddd701c
Developers should find the ide-gui controller codebase logical and easy to work with. (#3188) 2021-12-15 13:40:14 +03:00
Mateusz Czapliński
050e52bfcc
Fix some edits not being sent to LangServ (#3186)
Some edits were not being sent by IDE to Language Server, resulting in 3003 "Invalid version" errors being returned by LangServ, and forcing full invalidation (resynchronization) of text contents in LangServ.

This change fixes such errors observed when opening a new project, creating a new project, or adding a new node to a project. 

Fixes #3094

### Important Notes

The root cause showed up to be actually two separate issues, both of them reproduced by an "opening a new project" scenario:

 1. The automatic addition of `import Standard.Visualization` line, [done internally when opening a new project in `controller::Project::initialize()`](c14a2d8169/app/gui/src/controller/project.rs (L137-L141)), was not reaching the Language Server. The cause of it was a race condition with [`self.model.subscribe()` in `Module::runner()`](c14a2d8169/app/gui/src/model/module/synchronized.rs (L268)). In particular, the addition of the import was executed before the subscription, which resulted in an edition notification being lost and not sent to LangServer. The fix employed for this is to make the `subscribe()` call synchronous during the initialization of a project, instead of scheduling it for a non-deterministic later time.
 2. There was [a bug in `synchronized::Module::edit_for_snipped()`](7467efda59/app/gui/src/model/module/synchronized.rs (L362)), making it erroneously "optimize out" any code insertions detected by `TextEdit::from_prefix_postfix_differences()`. The fix employed for this was to improve the "optimizing out" condition, together with adding an accompanying test case verifying correct behavior (protecting against a future regression).

Additionally, as a drive-by improvement, some statements in `ParsedSourceFile<>::serialize()` were reordered, to make them better match how the actual contents of an .enso file are structured, and thus make it easier to read/analyze the code.
2021-12-13 18:18:20 +01:00
IsaacTell
10dac4fb21
Fix links to gui folder (#3190) 2021-12-12 23:43:25 +01:00
Ilya Bogdanov
81d6338cef
Finish up Rust Welcome Screen (#3167)
The old JS-based Welcome Screen was removed and replaced with the Rusty one.

Co-authored-by: Adam Obuchowicz <adam.obuchowicz@enso.org>
Co-authored-by: Adam Obuchowicz <adam.obuchowicz@luna-lang.org>
2021-12-11 00:01:45 +03:00
Mateusz Czapliński
5e5abac8ae
Register Views before creating them (#3181) 2021-12-08 10:11:58 +03:00
Mateusz Czapliński
a704baf91c
Minor CONTRIBUTING tweaks after onboarding (#3178) 2021-12-06 15:45:10 +03:00
Adam Obuchowicz
c4d22102cf
Switch to 2021 edition (#3173) 2021-12-01 16:06:57 +01:00
Adam Obuchowicz
215cd76bce
After creating a new project, nodes are not laid out. (#3174) 2021-12-01 14:25:48 +01:00