Commit Graph

719 Commits

Author SHA1 Message Date
Hubert Plociniczak
3c93c25a5a
Reload project's config on rename (#7179)
Package's config information, once loaded, never changed. While there is typically no need for it, this was problematic when the config became out-of-sync with the filesystem, like in the case of project rename action.
In rename, the config's properties would be updated in the FS, but that would never be reflected in module's package. Therefore further compilations would continue to ask for the old namespace.

Most of the changes are cosmetic (s/`.config`/`.getConfig()`) except for the new `reloadConfig` method on `Package` that is being called in `RenameProjectCmd` handler.

Closes #7062.

# Important Notes
The reported `ExecutionFailed` error should have been mostly fixed already via #7143. This change makes sure that all the related warnings are gone as well and the compiler uses the updated namespace.
2023-07-03 09:36:19 +00:00
Hubert Plociniczak
b78a7e74e8
Provide human-readable error log during installation (#7159)
Windows insists on reporting cryptic error codes that are then hard to debug.
When identified, we can provide more cases.

As identified for #7150.
2023-07-03 08:58:23 +00:00
Paweł Grabarz
cb9d4c4607
move method icon definition to documentation tag (#7123) 2023-06-29 14:48:55 +00:00
Hubert Plociniczak
26bd95cf3d
Don't report EOFException on shutdown (#7157)
It's part of the normal shutdown workflow and confused users are reporting it as a failure.
2023-06-29 13:42:13 +00:00
Dmitry Bushev
22259e696d
Add method call info for infix operators (#7090)
close #6374

In order to provide the method pointer information, the `IrToTruffle` pass sets the module name and the type name of the builtin node.
2023-06-27 13:11:12 +00:00
Hubert Plociniczak
4e5cb9cca6
Consistent naming of visualization (#7124) 2023-06-26 17:04:35 +00:00
Jaroslav Tulach
c4f19e7d66
Vector.map & State (#7078) 2023-06-26 13:13:41 +02:00
Jaroslav Tulach
6abcbcb00c
Moving construction of IR into runtime parser project (#7096) 2023-06-24 06:34:21 +02:00
Hubert Plociniczak
7955bec129
Add retries to GraalVM updater commands (#7079)
The change adds logic that will attempt a few retries when executing `gu` (GraalVM updater) commands. Previously, if it failed, it failed. Retries should help with the most common case - occassional network hiccups.

Closes #6880.

# Important Notes
Note that I don't use an external library for retries on purpose. Didn't want to introduce a yet another dependency for this tiny functionality.
2023-06-23 18:25:06 +00:00
Kaz Wesley
9ae4b24d85
Fix startup performance bug (#7089)
Remove a leak detector added in #7038, that has a large (~10s) impact on startup performance. I missed the performance impact during QA, but noticed it after merge.
2023-06-22 08:31:47 +00:00
Michael Mauderer
0abc2d5023
Fix fast typing leading to wrong component browser selection. (#7032)
Fixes #6908

Fast typing leads to a race condition where the end of the node editing can happen where the state of the CB is not caught up yet. This leads to two issues:

1. The wrong selection is made, as the View of the Component Browser has not been updated yet, but the selection from there is used to determine how the node is created.
2. Processing of the keys is aborted early, while still waiting for additional key input.

This is now fixed.

https://github.com/enso-org/enso/assets/1428930/dce82bb3-1c25-4a67-988a-d74469dc8fcd
2023-06-22 07:50:18 +00:00
Paweł Grabarz
fcaa7510c5
Do not immediately modify code when disconnecting the edge at target side. (#7041)
Fixes #6772

When detaching an existing edge by grabbing by a source port, the node's code is no longer immediately modified. It is only changed once the edge has been either connected or destroyed. When grabbing on the source side, the existing behavior is preserved. That way, we always have guaranteed place to keep the edge connected to.

https://github.com/enso-org/enso/assets/919491/49e560cb-0a29-4c6a-97ec-4370185b8c89

In general, the detached edges are now more stable, resilient to all kinds of expression modifications during the drag.

https://github.com/enso-org/enso/assets/919491/e62450ff-46b2-466f-ac33-f4f19e66ee1d


In case there is a situation where the currently dragged edge's port is destroyed (e.g. by Undo/Redo), instead of showing glitched port position it is simply dropped.

https://github.com/enso-org/enso/assets/919491/8fb089aa-a4a5-4a8c-92eb-23aeff9867b8

# Important Notes

The whole edge connection and view handling at the graph-editor view level has been completely rewritten. The edge endpoints are now identified using new `PortId` structure, that is not dependant on the span-tree. This prepares us for eventual removal of the span-tree in favour of manipulating AST directly. Right now those `PortId`s are still stored within the span-tree nodes, but it will be easy to eventually generate them on the fly from the AST itself. The widget tree has also already been switched to that representation where appropriate.

Additionally, I have started splitting the graph editor FRP network into smaller methods. Due to its absolutely enormous size and complexity of it, I haven't finished the split completely, and mostly edge-related part is refactored. I don't want to block this PR on this any longer though, as the merge conflicts are getting a bit unwieldy to deal with.
2023-06-20 21:27:39 +00:00
Adam Obuchowicz
31956aa603
Fix leaks after calling wasm drop (#7038)
1. Fixed leaks of Scene. We were making several cycles of Rc references.
2. Fix removing event listeners: the remove listener option should take same options as those passed in addEventListener.

This should finally fix #6505
2023-06-20 16:55:23 +00:00
Jaroslav Tulach
5f572d0680
Avoid dependency on BindingsMap from IR (#7055) 2023-06-19 10:28:31 +02:00
Wojciech Daniło
5970ae5b42
Improved FRP implementation (#6944) 2023-06-17 16:14:19 +02:00
James Dunkerley
760fb71798
First part of AWS S3 API, various small fixes. (#6973)
- Add type detection for `Mixed` columns when calling column functions.
- Excel uses column name for missing headers.
- Add aliases for parse functions on text.
- Adjust `Date`, `Time_Of_Day` and `Date_Time` parse functions to not take `Nothing` anymore and provide dropdowns.
- Removed built-in parses.
- All support Locale.
- Add support for missing day or year for parsing a Date.
- All will trim values automatically.
- Added ability to list AWS profiles.
- Added ability to list S3 buckets.
- Workaround for Table.aggregate so default item added works.
2023-06-15 16:20:13 +00:00
somebody1234
7c6ddf4b19
Fix unclosed console.group and overhaul logging in loader.ts (#6979) 2023-06-15 16:41:11 +03:00
Kaz Wesley
5de0e6d0f3
Improve performance of graph changes (#6954)
Fixes performance problems observed when creating/resolving errors (#6674):

|before|after|
|---|---|
|![vokoscreenNG-2023-06-09_08-49-46.webm](https://github.com/enso-org/enso/assets/1047859/a0048b32-4906-41cd-8899-6e2543ef6942)|![vokoscreenNG-2023-06-09_08-50-54.webm](https://github.com/enso-org/enso/assets/1047859/fef81512-ad89-4418-ae10-d54de94d96ea)|

This also helps with #6637, although I haven't been able to reproduce the degree of slowness shown there so I can't confirm that this resolves that issue.

# Important Notes
- Disable visualizations until shown. [Faster startup, and all graph changes.]
- 6x faster message deserialization. [Saves 400ms when making a change with many visualizations open.]
- Fast edge recoloring. [Saves 100-150ms when disconnecting an edge in Orders.]
- Add a checked implementation of a `profiler` data structure, used instead of the fast `unsafe` version when `debug-assertions` are enabled.
2023-06-14 18:16:50 +00:00
Kaz Wesley
bf42ed482d
Fix dropdown laziness; also misc fixes (#6991)
Several small changes:
- Dropdowns: Populate `GridView` lazily (fixes #6865).
- Clear disconnected edges when editing node (fixes case 1 in #7018).
- Fix regression in node selection rendering (2nd bug in #6975).
- Update profiler docs. The hotkey to *prOfile without exiting* is now `Ctrl+Alt+O` (`Ctrl+Alt+P` has been requisitioned by the CB).

Node selection:
| Pre-`Rectangle` | This PR |
| --- | --- |
| ![image](https://github.com/enso-org/enso/assets/1047859/bec341c1-dbf8-404d-9f2a-5d070c80ff15) | ![image](https://github.com/enso-org/enso/assets/1047859/8161390c-f64b-4bb3-8b7a-b87b2f9b4cd3) |

# Important Notes
- `Rectangle`: When `inset > border`, the extra space is now between the body and the border, not outside the border.
- More robust node layering logic. Now an inconsistent layer order cannot occur, even if something strange happens (like editing an expression and an edge at the same time).
- The dynamic drop down in the `drop_down` example scene doesn't show any entries before (or after) this, so I can't test the dynamic case.
2023-06-14 17:58:03 +00:00
Dmitry Bushev
48f0c6f5e8
Scala 2.13.11 and libraries update (#7010)
Update Scala and libraries.
2023-06-14 13:15:57 +00:00
Stijn ("stain") Seghers
e9e90fe152
No rendering after drop (#6911) 2023-06-14 12:30:14 +00:00
Dmitry Bushev
6249c79ffd
Update sbt-java-formatter plugin (#7011)
Update java formatter plugin. The new version can remove unused imports.
2023-06-12 14:18:48 +00:00
Dmitry Bushev
6de2700209
Do not return getters from global completion response (#7007)
close #6936

Changelog:
- add: new suggestion type Getter that is not exposed to the api
- update: do not return suggestion of type getter when doing a global search (without specifying self types)

Private suggestions and modules mentioned in the issue will be filtered out after we finish the work on the new (refined) exports algorithm.

# Important Notes
![2023-06-09-205327_1088x612_scrot](https://github.com/enso-org/enso/assets/357683/c6b16894-ada0-4ea9-abe8-5efc41949787)
2023-06-12 12:28:35 +00:00
Michał Wawrzyniec Urbańczyk
a31c671524
Undo redo fixes and improvements (#6950)
This PR adds facilities for controllers to be aware of what shortcut command is currently being processed. This allows grouping consequences of single user action into a single transaction without hard-coding it separately for all the separate paths case-by-case, which turned out to be challenging and error-prone.

Additionally, a number of minor fixes were carried over from #6877:
* workaround for #6718;
* avoiding creating spurious transactions when dealing with node positions;
* dropping any non-user user-triggered transactions that occur during the IDE project initialization.
2023-06-12 10:32:35 +00:00
Adam Obuchowicz
174392d01c
Prevent default only of some shortcuts. (#6981)
Before, we prevented default on every keyboard event, making usage of HTML inputs impossible (both on the dashboard and inside visualizations).

# Important Notes
The list of shortcuts was based on comments in #6364 (where the `preventDefault` was introduced).
2023-06-12 08:07:18 +00:00
Kaz Wesley
ff513471e1
Reduce draw calls (#6707)
Implements #6544 (eliminates 10/42 of the constantly-displayed draw calls).
Fixes #6717. Improves startup CPU time by 5% (250ms, loading Orders on my dev box).

# Important Notes
- Edges: New implementation uses only Rectangle under most conditions.
- Node and action area: Replace some shapes with Rectangle.
- List view: Replace some shapes with Rectangle.
- Display object hierarchy: The lowest-level shape instance types no longer have their own display objects.
- Includes initial support for using `Rectangle` to display triangles.
2023-06-06 17:09:03 +00:00
Michael Mauderer
86724cb741
Show status mesage if a visualisation is closed due to engine error. (#6937)
* Adds a mechanism to propagate status messages through the app.
* Adds a status messages when a visualisation is closed through an engine error.

https://github.com/enso-org/enso/assets/1428930/6f2ab9ff-4cea-4740-a20a-1adf49c851f5
2023-06-06 12:44:52 +00:00
Adam Obuchowicz
06c8d2977d
Fix entering node failure handling (#6932)
Fixes #6763

The bug was caused by pushing stack frames in the engine first, then failing to get graph controller - in that case we didn't update graph, but kept the stack, so graph was not synchronized with stack.

This PR changes the approach: we try to open graph first, only then push frames to stack. If _any_ frame will fail, we try to pop those we pushed so far, to restore the previous state. The same fix was applied for leaving nodes.

Also, I realized, that running several "enter node" / "leave node" actions could mix push/pop operations, making a mess with our execution context state. I've added a mutex to ensure we won't do this: the contesting operation will simply fail.

# Important Notes
In case when _restoring_ state fails, I did not have any better idea than just trying until it succeed.
2023-06-06 10:41:30 +00:00
Michael Mauderer
72b202b7d0
Fix visualisation FRP bugs. (#6831)
Fixes
* Empty Visualization when opening a full-screen visualization directly without opening the visualization before. #6770

https://github.com/enso-org/enso/assets/1428930/5812ed03-652c-4a27-8e33-b85512ca11b6

* Empty visualization when opening the full-screen visualization before the data for the visualization has arrived. #6561

https://github.com/enso-org/enso/assets/1428930/d8e58f2d-f1b6-4b70-84fa-e917f6c0af1f

* Visualization is reset to default when reconnecting nodes #6673

https://github.com/enso-org/enso/assets/1428930/ac6cf79a-7147-4f13-9045-52599fb39900


* Redundant internal open/lose events caused by logic loops around the show/hide button, as well as many redundant layer setting/unsetting issues internal to the visualization code.

Generally improves the logic around the visualization API by avoiding decentralized logic in different places and removing old code that is no longer needed.
2023-06-05 16:01:06 +00:00
Dmitry Bushev
4e9f02258e
Suggestion should contain a list of annotations (#6924)
close #6847

Add annotation names to suggestions.
2023-06-02 07:26:01 +00:00
Ilya Bogdanov
bd3ba26fc1
Split CB documentation to smaller pages (#6893)
Now documentation for types, constructors and methods is displayed separately, with a links between pages.
It drastically improves the speed of documentation panel update (50-100x on my machine), and also provides more readable documentation.


https://github.com/enso-org/enso/assets/6566674/05c77560-162b-4396-bfa0-1e79eb6dcc5f

Before:

<img width="620" alt="Screenshot 2023-05-31 at 01 02 47" src="https://github.com/enso-org/enso/assets/6566674/045ad3fc-470b-44d6-b453-e63c06711d06">


After:

<img width="800" alt="Screenshot 2023-05-31 at 00 54 53" src="https://github.com/enso-org/enso/assets/6566674/cb76e757-66fa-4544-8ef9-80b0a54efe0b">
2023-06-02 07:14:50 +00:00
Wojciech Daniło
da0c88b89f
Fix GPU performance tool panic (#6916)
* Fix

* Adding docs
2023-06-01 13:02:48 +02:00
Adam Obuchowicz
2e39d7595f
Fix CB discarding changes if pressed Ctrl + Enter too quickly (#6875)
Now, quick typing in component browser and pressing "enter" should not cut off the last part typed. Fixes #6733

https://github.com/enso-org/enso/assets/3919101/3979ed5a-ba4e-4e25-93e6-672e731b7bd8

On this occasion, also fixed "go-to-dashboard" button and "Unsupported engine version" being over the full-screen visualization. Fixes #6722

# Important Notes
I did a significant refactoring of Project View:
1. The huge `frp::extend` block was split into multiple `init` methods.
2. Remaining of the "Old searcher" were removed.
3. The "Edited" event from node's input is emitted only when in edit mode (it's consistent with other API terminology, and makes FRP for showing CB much simpler.

The code was _mostly_ moved around, but the check is advised anyway, as there were small changes here and there.
2023-06-01 07:55:13 +00:00
Jaroslav Tulach
65958cba92
IGV Enso support recognizes lib/scala/pkg as project (#6904)
Addition to #4098 - make sure IGV Enso support can recognize `lib/scala/pkg` as a project.
2023-05-31 15:14:57 +00:00
Paweł Grabarz
8bc3ebd70a
Implement nested widget overrides (#6878)
Implements #6792
Fixes #6715
Fixes #6052
Fixes #5689

The dynamic dropdown widgets entries now can specify additional widget configuration as a list of `parameters` of the inner method call. That allows for creating smarter widgets within nested constructors, taking the outer widget's context into account.

<img width="772" alt="image" src="https://github.com/enso-org/enso/assets/919491/97c70654-9170-4cf0-ae4d-2c25c74caa96">

With the changes to the serialization logic, I have also adressed issues related to automatic label generation for both static and dynamic dropdown entries. For access chains (e.g. `Foo.Bar.Baz_Qux`), the label will now always contain only the last segment, and all underscores will be removed (e.g. `Baz Qux`). This also applies to dynamic entries where the label is not explicitly specified in method annotation.

<img width="265" alt="image" src="https://github.com/enso-org/enso/assets/919491/1abe6c77-010b-4622-b252-97cd1543cb48">

Additionaly, now the dynamic entries containing constructors will also be resolved within suggestion database, allowing us to automatically insert relevant import, shorten the actually used expression and wrap it with parentheses if required. That was required for nested widgets to show up, as we depend on properly resolved argument names to show them. The widget definitions in annotations no longer need to wrap the expressions manually. Instead, the constructors used in dropdown entries should be specified using fully qualified names, similarly to how we do it in tag values.

CC @jdunkerley - The dropdown entries containing just a constructor will no longer need added parentheses around them. Instead, the constructors should be specified using fully qualified names, similarly to how we do it in tag values.

<img width="389" alt="image" src="https://github.com/enso-org/enso/assets/919491/19944b5b-d0c7-43ac-bf17-ca1556e0b3f0">

Note that currently the import resolution is attempted even if the used constructor is is not specified using a fully qualified name. To accomplish that, the IDE is performing a more expensive search through whole suggestion database for matching type and module (e.g. in example above, we are searching for a match for `Aggregate_Column.First`). If there are multiple potential matches due to a name collision, it is undefined which one would be preferred. Effectively one will be picked at random. To avoid that, the libraries should over time transition to using fully qualified names wherever possible.

# Important Notes
I have removed the `payload` field from the span tree, and with it the generic argument on its nodes. This was already partially done on the branch with new design, on which I also had a few changes that turned out to be useful for this PR. So I pulled it in as well. It is a nice simplification that will ease our further work on removing the span-tree altogether. The biggest impact it had was on the node output port, where I had to store the port data outside of the span tree. This is the approach we would be taking when transitioning to AST anyway.
2023-05-30 17:45:31 +00:00
Hubert Plociniczak
efda2cdf31
Empty editions are not parsed as NaN (#6873)
Empty edition (null value) was parsed as NaN, which was confusing. This change correctly detects the case before trying different fallback mechanisms.

Addresses invalid warning mentioned in #6806.
2023-05-30 10:12:39 +00:00
Kaz Wesley
7e6a919737
Coalesce graph editor view invalidations (#6786)
Only invalidate the graph editor view at most once per frame. On develop, this saves about 70ms (2%). Testing a recent backend without #6755 as a stress-test, this saves about 5s (45%). This reflects better scalability to large numbers of `SuggestionUpdate` messages.

Fixes #6630.

# Important Notes
- Also fix intermittent profiling failures occurring since the introduction of microtasks.
2023-05-29 14:39:20 +00:00
Hubert Plociniczak
86432b5ca5
Detect and override hooks of the same kind (#6842)
This change ensures that we can have at most one hook of the same action during shutdown.
Verified the change on a real project.

Closes #6767.
2023-05-29 07:25:30 +00:00
Wojciech Daniło
6b7cf8e705
Dynamic app resampling and better performance measurements. (#6595) 2023-05-29 01:42:42 +02:00
Stijn ("stain") Seghers
0ed78f99af
Show spinner when opening/creating a project, take #2 (#6827)
* Remove unused code: project management in component browser

* Encapsulate internal FRP logic of project list

* Collapse some code paths

* Open project passed on command line through presenter

A project name or ID that is passed on the command line was initialised
in the controller setup, before the presenters and views are set up.
Now, we fully initialise the IDE before opening a project so we have
control over the view while a project is being opened.

* Show a spinner in all cases of opening a project

* Let root presenter open/close projects when switching projects

* Change spinner to make progress over a fixed period

* Resolve issues when Project Manager API isn't available

* Bump wasm size limit
2023-05-26 18:20:07 +02:00
somebody1234
079b1eed9d
Fix some dashboard issues (#6668)
Fixes some of #6662

Issues addressed:
- `ide watch` and `gui watch` should now use the desktop platform
- error screen should now be shown when passing invalid options
- password (both creating password when registering, and resetting password) should now warn on invalid input

# Important Notes
Instead of checking whether `location.hostname === 'localhost'`, I've opted to use a constant defined by the build tool instead. This is to make it easier to merge the cloud IDE and desktop IDE entrypoints in the future, since it would be able to simply set `platform: Platform.cloud` in the build config.
2023-05-26 10:17:03 +00:00
somebody1234
6693bdb5cd
Fallback to opened date when ordering projects (#6814)
Fixes #6787

# Important Notes
I can't get Project Manager compilation to work locally so I guess I'll be relying on CI to verify that it's working correctly?

Of course, QA should be able to catch any problems too - the websocket API hasn't been changed so it should work out of the box with the current dashboard.
2023-05-25 15:44:15 +00:00
Paweł Grabarz
4cbd5f45a1
Prevent incorrect application of list widget on incompatible expressions (#6771)
Refactored the logic behind selecting appropriate widgets for span tree nodes. Now the bulk of it is moved into widget methods. When a given widget type is reporting to be not compatible with the expression, it will not be used even if the configuration was overriden using an method argument annotation. In that case, the usual logic for automatically selecting the appropriate widget will kick in.

![image](https://github.com/enso-org/enso/assets/919491/6316e21e-c509-4cc4-a3a6-c482798894d0)
2023-05-24 12:30:40 +00:00
Pavel Marek
bd70ed6830
Update GraalVM to 22.3.1 JDK17 (#6750)
Upgrade GraalVM to 22.3.2 based on JDK17.

---------

Co-authored-by: somebody1234 <ehern.lee@gmail.com>
2023-05-24 10:39:08 +02:00
Dmitry Bushev
1ddd36308e
Filter suggestion constructors when searching by self type (#6813)
close #6627

Changelog:
- update: search method excludes constructors when searched by the self type

# Important Notes
Component Browser doesn't show the `Between` constructor when called on the `Range` node.

![2023-05-23-172446_1203x865_scrot](https://github.com/enso-org/enso/assets/357683/a2553c46-6a0e-4842-ba91-7c2b76c56c6d)
2023-05-23 16:14:41 +00:00
Stijn ("stain") Seghers
8e62ed60e9
Add dashboard button (#6474)
Closes #6399: Adding a button to the top bar in the project view to return to the dashboard.

Note that this just fires a DOM event (see #6399). To test it, you can add an event listener: `document.addEventListener('show-dashboard', console.log)`

https://user-images.githubusercontent.com/607786/235687669-ab04339f-0f07-439a-9cd3-59d96815edaa.mp4
2023-05-23 14:23:23 +00:00
somebody1234
efd33c0928
Run TypeScript typechecking and eslint on Lint CI (#6603)
* Run typecheck and eslint on Lint CI

* Address reviews; fix type errors in `.d.ts` files

* Remove unused parameter

* Run prettier

* Fix lint error

---------

Co-authored-by: Paweł Buchowski <pawel.buchowski@enso.org>
2023-05-23 12:22:53 +02:00
Dmitry Bushev
0318880990
Add project creation time to project metadata (#6780)
close #6686

Changelog:
- add: `created` field to the project metadata response
- update: project manager tests
2023-05-22 13:40:10 +00:00
Radosław Waśko
447786a304
Implement cast for Table and Column (#6711)
Closes #6112
2023-05-19 10:00:20 +00:00
Paweł Grabarz
dcdba8d1ac
Fix list editor panics during insertion (#6540)
# Important Notes
The mouse handling changes involve an unfortunate huge hack, where we enable mouse events on the mouse shape during box selection. That way we know for sure that no other shape will be able to receive mouse enter event. Then the list editor widget is modified to only actually respond to events when its background is hovered. We will definitely want a more proper way to handle mouse event contention, but it's definitely out of scope for current bugfixing.
2023-05-17 18:53:51 +00:00