Commit Graph

757 Commits

Author SHA1 Message Date
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
Paweł Buchowski
10eeed1944
Revert "Show spinner when opening/creating a project (#6321)" (#6712)
This reverts commit 341f1275e0.
2023-05-16 22:53:59 +02:00
Stijn ("stain") Seghers
341f1275e0
Show spinner when opening/creating a project (#6321)
Closes #5505: A spinner with the Enso logo is now shown for most of the duration when opening and creating a project.

https://user-images.githubusercontent.com/607786/234019207-e34096c7-2cb3-4ae3-abd3-291fcaf43084.mp4

# Important Notes
There's still a tiny bit of lag between the end of the spinner and when the nodes pop up, but that seemed less trivial to me to work around.
2023-05-15 14:08:56 +00:00
Dmitry Bushev
b7d51ed5c6
Create unique atom getter suggestions (#6694)
related #6611

Prevent creating atom getters with the same name.
2023-05-15 14:03:18 +00:00
Hubert Plociniczak
06624f34a8
Ensure slow shutdown of LS always kicks off hooks (#6665)
This change fixes the rather elusive bug where shutdown hooks could not be fired when shutdown was taking too long and termination was forced.

Under the circumstances described in detail in ticket #6515 there was a small chance that we could have a shutdown race condition. Essentially the messages received when client was disconnected and language server forced the termination could lead to language server not sending the public `ProjectClosed` message which triggers shutdown hook. Now we always do.

Also made sure that multiple `ProjectClosed` messages don't lead to firing multiple shutdown hooks, which was another possibility.

No tests as one would have to be able to introduce different delays in various message handlers to simulate the problem.
Having ability to do such chaos testing would be nice but it is beyond the scope of this ticket.
I was able to reproduce the problem 100% with my specially crafted setup so I'm fairly confident about the change.

Closes #6515.
2023-05-15 12:15:37 +00:00
Michał Wawrzyniec Urbańczyk
7748289873
Force newDashboard default on the CI-built packages. (#6680) 2023-05-15 04:03:09 +02:00
Dmitry Bushev
706791779b
SuggestionBuilder needs to send ascribedType of constructor parameters (#6655)
close #6611

Changelog:
- update: run compiler passes on the `ascribedType` field of the constructor arguments
- update: suggestion builder uses the type information attached to `ascribedType`
- feat: resolve qualified names in type signatures
2023-05-13 18:33:03 +00:00
Wojciech Daniło
32fd228c12
Removing flush (#6670) 2023-05-12 18:10:13 +02:00
Michael Mauderer
9e71fea844
Implement loading spinner for visualisations. (#6512)
Fixes #5088. Adds a ensoGL spinner for visualizations waiting on data.

https://user-images.githubusercontent.com/1428930/236801655-67a0ffed-da5d-4e27-8797-cd8126cb86d9.mp4

# Important Notes
This spinner will not show up for the duration where visualizations are processing data on the frontend. If this is a concern, visualization need to implement heir own loading spinner, or we need to provide a unified API for them to keep the spinner visible.
2023-05-12 04:41:55 +00:00
Jaroslav Tulach
1302b693d8
All Vector operations shall be applicable on java.util.ArrayList (#6642)
Fixes #6609 by
- e380e647af - running whole `Vector_Spec` on `java.util.ArrayList`
- 9b1229fe20 - introducing a node to handle interop values

# Important Notes
Contains additional DSL processor fix:
- 415623dcb9 - to not crash the compiler, but to properly report compiler error
2023-05-11 15:29:47 +00:00
Dmitry Bushev
3dd05c2359
Automatic type based dropdown does not include singleton in a union type (#6629)
close #6532

Set tag values to display `Auto` type in dropdowns correctly.

# Important Notes
![2023-05-10-141458_969x566_scrot](https://github.com/enso-org/enso/assets/357683/9a048b3c-d192-4382-bf76-9cbe6c9556d1)
![2023-05-10-141513_991x232_scrot](https://github.com/enso-org/enso/assets/357683/c50e1e73-23a6-4b32-90bf-f849a127c85d)
2023-05-10 16:55:16 +00:00
Hubert Plociniczak
cf3624c463
Limit the number of reported warnings (#6577)
Artifically limiting the number of reported warnings to 100. Also added benchmarks with random Ints to investigate perf issues when dealing with warnings (future task).
Ideally we would have a custom set-like collection that allows us internally to specify a maximal number of elements. But `EnsoHashMap` (and potentially `EnsoSet`) are still WIP when it comes to being PE-friendly.

The change also allows for checking if the limit for the number of reported warnings has been reached. It will visualize by adding an additional "Warnings limit reached." to the visualization.

The limit is configurable via `--warnings-limit` parameter to `run`.

Closes #6283.
2023-05-10 11:48:31 +00:00
Michał Wawrzyniec Urbańczyk
ee8e9e5c60
Fix the Engine version check in GUI (#6570)
This PR fixes #6560.

The fix has a few elements:
1) Bumps the Engine requirement to the latest release, namely `2023.1.1`.
2) Changed the logic of checking whether a given version matches the requirement. Previously, we relied on `VersionReq` from `semver` crate which did not behave intuitively when the required version had a prerelease suffix. Now we rely directly on Semantic Versioning rules of precedence.
3) Code cleanups, including deduplicating 3 copies of the version-checking code, and moving some tests to more sensible places.
2023-05-08 14:13:53 +00:00
Kaz Wesley
3a832d3e53
Fix default dynamic-asssets directory (#6537)
Set the default value correctly, and use it. Fixes #6475.
2023-05-05 05:48:24 +00:00
Kaz Wesley
402c95b181
Apply screen size to screen-size-independent passes (#6569)
It is needed to restore the viewport. Fixes #6500.
2023-05-04 14:09:00 -07:00
Radosław Waśko
41a8257e8d
Separating Redshift connector from Database library into a new AWS library (#6550)
Related to #5777
2023-05-04 17:36:51 +00:00
Hubert Plociniczak
b93edb050b
Force pending saves if client closes abruptly (#6514)
Force pending saves when JsonSession is terminated for the client.

Potentially closes #6395.
2023-05-03 23:30:20 +00:00
Dmitry Bushev
38212786a3
Fix application config (#6513)
Related #6482
2023-05-02 17:59:44 +00:00
somebody1234
a1d48e7d0c
Cloud/desktop mode switcher (#6448)
This is a re-creation of #6308.
Creates buttons to switch between cloud and local backends for listing directories, opening projects etc.

# Important Notes
The desktop backend currently uses a hardcoded list of templates, mostly because they look better because they have background images. However, it can easily be changed to use `listSamples` endpoint and switched to the default grey background.
2023-05-02 17:48:07 +00:00
Pavel Marek
3a42d0ce76
Reimplement enso_project as a proper builtin (#6352)
Remove the magical code generation of `enso_project` method from codegen phase and reimplement it as a proper builtin method.

The old behavior of `enso_project` was special, and violated the language semantics (regarding the `self` argument):
- It was implicitly declared in every module, so it could be called without a self argument.
- It can be called with explicit module as self argument, e.g. `Base.enso_project`, or `Visualizations.enso_project`.

Let's avoid implicit methods on modules and let's be explicit. Let's reimplement the `enso_project` as a builtin method. To comply with the language semantics, we will have to change the signature a bit:
- `enso_project` is a static method in the `Standard.Base.Meta.Enso_Project` module.
- It takes an optional `project` argument (instead of taking it as an explicit self argument).

Having the `enso_project` defined as a (shadowed) builtin method, we will automatically have suggestions created for it.

# Important Notes
- Truffle nodes are no longer generated in codegen phase for the `enso_project` method. It is a standard builtin now.
- The minimal import to use `enso_project` is now `from Standard.Base.Meta.Enso_Project import enso_project`.
- Tested implicitly by `org.enso.compiler.ExecCompilerTest#testInvalidEnsoProjectRef`.
2023-05-02 16:40:58 +00:00
Michael Mauderer
6dee75554b
Fix layer ordering between dropdown and breadcrumbs backgrounds. (#6483)
This PR fixes #6371.

# Important Notes
@kazcw @wdanilo I don't particularly like this solution, but I don't see any other good way to define the relationship between two instances of the same shape (`Rectangle`) used in different UI elements. If you are aware of a more elegant solution, I’d be happy to hear any suggestions.
2023-05-02 16:32:21 +00:00
Kaz Wesley
a15086fe54
Multiflavor layers (#6477)
Support rendering multiple flavors of a shape system in the same layer. Fixes bugs seen as text disappearing when multiple fonts are used together (#6460 and issue discussed in #6366).
2023-05-02 15:08:13 +00:00
Hubert Plociniczak
ce4ecc6706
Limit Dead Letter logging (#6482)
Dead Letter logging is occasionally flooding our logs which is confusing to users reporting bugs. Left the possibility of a single report so that we know that something is happening.
2023-05-02 14:00:50 +00:00
Adam Obuchowicz
d6fa36d793
Finishing Vector Editor (#6470) 2023-05-02 11:24:20 +02:00
Wojciech Daniło
cd92d90f9f
Proper handling of multiple list views. (#6461) 2023-05-01 18:11:05 +02:00
Kaz Wesley
a83954571a
Fix disappearing cached shapes (#6458)
* Fix GL parameter
* Don't leak GL Framebuffers
* Resize: Don't rebuild screen-size-independent passes
* Don't drop Texture while in use
* Fix concurrency bug
2023-05-01 07:29:59 -07:00
Jaroslav Tulach
efe904cd9f
Introducing @BuiltinMethod.needsFrame and InlineableNode (#6442)
Fixes #6416 by introducing `InlineableNode`. It runs fast even on GraalVM CE, fixes ([forever broken](https://github.com/enso-org/enso/pull/6442#discussion_r1178782635)) `Debug.eval` with `<|` and [removes discouraged subclassing](https://github.com/enso-org/enso/pull/6442#discussion_r1178778968) of `DirectCallNode`. Introduces `@BuiltinMethod.needsFrame` - something that was requested by #6293. Just in this PR the attribute is optional - its implicit value continues to be derived from `VirtualFrame` presence/absence in the builtin method argument list. A lot of methods had to be modified to pass the `VirtualFrame` parameter along to propagate it where needed.
2023-04-28 15:32:13 +00:00
Hubert Plociniczak
c6790f1e9c
Report only unique warnings (#6372)
This change makes sure that reported warnings are unique, based on the value of internal clock tick and ignoring differences in reassignments.

Before:
![Screenshot from 2023-04-20 15-42-55](https://user-images.githubusercontent.com/292128/233415710-925c1045-37c7-49f5-9bc3-bfbfd30270a3.png)
After:
![Screenshot from 2023-04-20 15-27-27](https://user-images.githubusercontent.com/292128/233415807-8cb67bc2-ac37-4db7-924e-ae7619074b5b.png)

On the positive side, no further changes, like in LS, have to be done.


Closes #6257.
2023-04-28 07:16:00 +00:00
Michael Mauderer
233bf86d2f
Execution environment integration fixes. (#6434)
Follow up to  https://github.com/enso-org/enso/pull/6341#issuecomment-1522341055 . Contains some refactoring and solves some left over to-dos in the code.
2023-04-27 17:30:26 +00:00
Hubert Plociniczak
376415ab17
Mark some tests as (unconditonally) flaky (#6453)
Too many spurious failures on CI now. Will need to be tackled at some
point.
2023-04-27 17:09:46 +02:00
Wojciech Daniło
ae94a9f40d
Passing events to sub-widgets in List Editor and refactoring of the slider component. (#6433) 2023-04-27 04:42:42 +02:00
Paweł Grabarz
a00efb28f3
Widgets integrated with graph nodes (#6347)
Rewrites node input component. Now the input is composed of multiple widget components arranged in a tree of views with automatic layout. That allows creating complex UI elements on top of the node itself, and further widget positions will be automatically adapted to that. The tree roughly follow the span tree, as it is built by consuming its nodes and eagerly creating widgets from them. The tree is rebuilt every time the expression changes, but that rebuild process reuses as much previously created widgets as possible, and only updates their configuration as needed. Each widget type can have its own configuration options that can be passed to it from the parent, or assigned based on configuration received from the language server.

<img width="773" alt="image" src="https://user-images.githubusercontent.com/919491/233439310-9c39ea88-19bc-43da-9baf-1bb176e2724e.png">

# Important Notes
For now, all span-tree updates are sent over to the shared Frp endpoint of the whole tree, so there is no mechanism for intercepting them by the parent widgets. One idea would be to use existing bubbling/capturing events on widget display objects for that purpose, but I think existing implementation is simpler and more convenient, and we can always easily change that if we have a use for it.

There are some issues with performance due to much more display objects being created on the graph. Expect it to be a little worse, especially at initialization time.
2023-04-26 19:37:54 +00:00
Ilya Bogdanov
72f83c2dd5
Rollback event handling changes for the mouse (#6396)
Fixes #6385

Partial rollback of #6364

It turns out that preventing default for mouse events is a bad idea in general. It shouldn't affect other fixed bugs because (afaik) all of them were caused by keyboard events.

We're still preventing default for keyboard events.
2023-04-26 12:26:51 +00:00
Michael Mauderer
0d84a601dd
Ability to change the execution environment between design and live. (#6341)
Integrate the UI for electing the Execution Environment with the Language Server and unify existing uses. Implements  #5930 + actual integration instead of just mocking it.

https://user-images.githubusercontent.com/1428930/232919438-6e1e295a-34fe-4756-86a4-5f5d8f718fa0.mp4

# Important Notes
The console output is only emitted as part of the `INFO` level. A better check would be to look at the messages sent to the backend in the developer console.
2023-04-25 20:28:15 +00:00
Wojciech Daniło
115e9b4ffd
Implementation of elements adding to List Editor and a lot of internal API (#6390) 2023-04-25 18:06:11 +02:00
Adam Obuchowicz
952de24e79
Drop method exported from WASM + removing leaks. (#6365)
Fixes #6317

The `drop` method is available in the WASM object. This can be tested by typing `ensoglApp.wasm.drop()` in the dev console - all objects should be removed and all connections closed.

# Important Notes
* This PR fixed serveral leaks by this occasion
* A new tool for tracking leaks was added to prelude's `debug` module.
2023-04-25 15:38:29 +00:00
Kaz Wesley
d6828b5219
Exclude comparison operators from modifier logic (#6370)
* Exclude comparison operators from modifier logic

* CLI for SpanTree debug_print
2023-04-24 06:52:42 -07:00
Dmitry Bushev
2d168308af
Better cleanup of project management test suite (#6392)
Address some arbitrary failures of the `ProjectManagementApiSpec` test suite.
2023-04-24 13:11:27 +00:00
Adam Obuchowicz
8b62deba7d
Vector Editor with List Editor and adding elements. (#6363)
Vector Editor widget is improved: replaced old simple widget with List Editor, and added integration for adding elements.

# Important Notes
The widget is still under feature flag: `--feature-preview.vector-editor`.
2023-04-24 09:17:25 +00:00
Ilya Bogdanov
719bd8cfa1
Forbid edits in read-only mode (#6342)
Closes #6182 

Implements read-only mode for relevant components of the IDE.

- [x]  Project Name renaming
- [x]  Nodes editing
- [x]  Editing code in the code editor
- [x]  Creating nodes
- [x]  Removing nodes
- [x]  Entering and leaving nodes
- [x]  Creating, dropping, and changing connections between nodes
- [x]  Buttons on nodes (except for visualization toggle button)
- [x]  Widgets on nodes


https://user-images.githubusercontent.com/6566674/232824737-bdd6f676-b20d-4218-af7d-4373e00cbe3e.mp4
2023-04-24 10:01:30 +02:00
Dmitry Bushev
74c0718604
Project folder not renamed after project name change (#6369)
close #6254

Changelog:
- fix: race when the actor system may be stopped before the shutdown hooks are executed
- fix: project management spec
- fix: recover from `readLine` failure during the shutdown
2023-04-20 16:57:37 +00:00
Ilya Bogdanov
68119ad6bb
Prevent default for all events, fixing multiple IDE bugs (#6364) 2023-04-20 15:58:26 +02:00
Kaz Wesley
824d18ddc1
Fix render issues, re-enable buffer compaction (#6358) 2023-04-20 13:41:08 +02:00
Kaz Wesley
dd4dce2c3f
Reduce borrow scope (#6359)
Reduce the scope of a borrow, to prevent `BorrowError`s.
2023-04-19 22:33:46 +02:00
Kaz Wesley
bc4ed96d71
Layer/Rectangle improvements (#6247)
* Use Rectangle for breadcrumbs background.

* Use Rectangle for status bar bg.

* Use Rectangle for dropdown bg.

* Dirty global_element_depth_order invalidates sublayers

* Setting new parent may invalidate depth order

* Support per-instance pointer_events_enabled

* Remove workaround for #6241
2023-04-19 09:06:20 -07:00
Stijn ("stain") Seghers
9ae77f4b6f
Make play button clickable and hide it when irrelevant (#6302) 2023-04-19 14:51:12 +02:00
Hubert Plociniczak
4c1e73c864
Don't propagate warnings on suspended arguments (#6345)
* Don't propagate warnings on suspended arguments

In the current implementation, application of arguments with warnings
first extracts warnings, does the application and appends the warnings
to the result.
This process was however too eager if the suspended argument was a
literal (we don't know if it will be executed after all).

The change modifies method processor to take into account the
`@Suspend` annotation and not gather warnings before the application
takes place.

* PR review
2023-04-19 11:55:23 +02:00
Wojciech Daniło
fa995dd765
Vector Editor first visual implementation (#6245) 2023-04-19 04:26:01 +02:00
Kaz Wesley
912556853f
Disable buffer compaction (#6339)
Fixes #6320.
2023-04-18 15:17:17 +00:00
Ilya Bogdanov
84f64bec65
Use red color for context switch button (#6266) 2023-04-18 17:00:57 +02:00
Michael Mauderer
64043323e8
A drop-down that allows changing the execution mode. (#6130)
Implements https://github.com/enso-org/enso/issues/5931.

https://user-images.githubusercontent.com/1428930/228532453-2032b376-1aa5-4140-8331-be37e4e675d4.mp4

# Important Notes
Not functional yet, as it needs integration with the engine.
2023-04-18 10:26:17 +00:00
Jaroslav Tulach
e5a96b9782
Avoid NullPointerException in --dumpGraphs & test & docs (#6304) 2023-04-18 06:58:06 +02:00
Dmitry Bushev
93b9ca7789
Update the default project template (#6310)
close #6307

Changelog:
- update: the default project template

# Important Notes
[6307-update-the-default-project-template.webm](https://user-images.githubusercontent.com/357683/232487322-8aebc709-30aa-48f3-b86b-f868c83a6e21.webm)
2023-04-17 14:09:08 +00:00
Kaz Wesley
92ce47016a
Test, fix, re-enable buffer compaction. (#6202)
* Test, fix, re-enable buffer compaction.

- Fix a bug involving trying to move tombstones after multiple GCs (#6197).
- Refactor allocator for more testability.
- Add tests with extensive sequence of allocator operations.

* fmt

* Fix.

* Fix #6011. Don't use debug-assertion; fix sanity check that wasn't usually being run.

* Lint.

* Revert "Fix #6011. Don't use debug-assertion; fix sanity check that wasn't usually being run."

This reverts commit 47b9100c2b.

* Fix accidentally committed line

---------

Co-authored-by: Adam Obuchowicz <adam.obuchowicz@enso.org>
2023-04-14 07:04:37 -07:00
Jaroslav Tulach
a74933d10f
Speed cascade of if statements up (#6255)
Fixes #5709. We have a test and a generic fix that improves inlining of every builtin. Everything seems to be faster.
2023-04-14 13:27:23 +00:00
Dmitry Bushev
b97fc39214
Remove SQL versions repo (#6242)
close #6232

Changelog:
- remove: `SqlVersionsRepo`
- update: `SuggestionsDatabaseModuleUpdateNotification` message removing the version
- update: cleanup versions repo usages in the language server
2023-04-11 19:22:30 +00:00
Kaz Wesley
7ad09f4e40
Fix #6011. Don't use debug-assertion; fix sanity check that wasn't being run. (#6187)
Fix an assertion that wasn't being run. Debug assertions are only enabled in `--wasm-profile=dev` builds, better to use `error!`.
2023-04-10 06:41:37 +00:00
Michał Wawrzyniec Urbańczyk
e7668ebc3a
Project Sharing (#6077)
Enso will now associate with two file extensions:
* `.enso` — Enso source file.
  * If the source file belongs to a project under the Project Manager-managed directory, it will be opened.
  * If the source file belongs to a project located elsewhere, it will be imported into the PM-managed directory and opened;
  * Otherwise, opening the `.enseo` file will fail. (e.g., loose source file without any project)
* `.enso-project` — Enso project bundle, i.e., `tar.gz` archive containing a compressed Enso project directory.
  * it will be imported under the PM-managed directory; a unique directory name shall be generated if needed.

### Important Notes
On Windows, the NSIS installer is expected to handle the file associations.
On macOS, the file associations are expected to be set up after the first time Enso is started,
On Linux, the file associations are not supported yet.
2023-04-06 15:26:37 +02:00
Dmitry Bushev
df4491de50
Batch insert suggestions (#6189)
close #6080

Changelog
- add: implement `SuggestionsRepo.insertAll` as a batch SQL insert
- update: `search/getSuggestionsDatabase` returns empty suggestions. Currently, the method is only used at startup and returns the empty response anyway because the libs are not loaded at that point.
- update: serialize only global (defined in the module scope) suggestions during the distribution building. There's no sense in storing the local library suggestions.
- update: sqlite dependency
- remove: unused methods from `SuggestionsRepo`
- remove: Arguments table

# Important Notes
Speeds up libraries loading by ~1 second.

![2023-04-03-173423_2086x324_scrot](https://user-images.githubusercontent.com/357683/229597470-19dcc010-2a34-43e1-87be-60af99afd275.png)
![2023-04-03-173514_2083x321_scrot](https://user-images.githubusercontent.com/357683/229597476-bf5b3c33-6321-4ac9-a0ca-2fb57d257857.png)
2023-04-06 07:47:23 +00:00
Jaroslav Tulach
4805193428
Text.to_display_text is (shortened) identity (#6174)
Fixes #5971.
2023-04-05 19:53:07 +00:00
Kaz Wesley
2e08f734d7
Disable buffer compaction (#6199) 2023-04-04 18:16:50 +02:00
Kaz Wesley
b3e54aeb54
Instance ordering (#6140) 2023-04-04 12:35:00 +02:00
Kaz Wesley
17152e4e00
Hotkey to display GPU debug info (#6188) 2023-04-04 12:32:16 +02:00