Commit Graph

4197 Commits

Author SHA1 Message Date
Adam Riley
2e2db37b48 Update widget visibility 2024-03-07 11:00:21 +00:00
Michael Mauderer
7c68bf170d
Remove gui1 codebase (#9242)
Removes the old GUI1 code base and reduces the Rust code footprint by removing unused code.

# Important Notes
Updates build scripts and reformats part of the codebase with the autoformatter.
2024-03-07 02:20:21 +00:00
Kaz Wesley
79a6a6a1c0
Pan to CB (#9273)
When the CB is opened, pan to show it.

Large screen:
<video src="https://github.com/enso-org/enso/assets/1047859/1a07c8cc-5818-420a-9fb3-1d1cb308cb87">

Small screen:
<video src="https://github.com/enso-org/enso/assets/1047859/a9f18df5-c0ca-426c-959a-bda5cd077541">

# Important Notes
A prioritized-coordinates approach is used to adjust panning goals based on screen space:
- Fitting the input area is highest-priority.
- If possible, the whole component panel area will be fit.
- If possible, the visualization preview will be fit.
- If there's extra room, margins will be included; the top and left are prioritized because those margins prevent overlap with fixed UI elements.
2024-03-06 20:09:56 +00:00
Michał Wawrzyniec Urbańczyk
e930738e02
[CI] Engine CI Rework, Part 1 (#9295)
I have created PR with the first set of changes for the Engine CI. The changes are small and effectively consist of:
1. Spltting the `verifyLicensePackages`. It is now run only on Linux. There are hardly any time benefits, as the actual job cost is dominated by the overhead of spinning a new job — but it is not expensive in the big picture.
2. Splitting the Scala Tests into separate job. This is probably the biggest "atomic" piece of work we have.
3. Splitting the Standard Library Tests into a separate job.

The time is nicely split across the jobs now. The last run has:
* 27 min for Scala tests;
* 25 min for Standard Library tests;
* 24 min for the "rest": the old job containing everything that has not been split.

While total CPU time has increased (as jobs are not effectively reusing the same build context), the wall time has decreased significantly. Previously we had ~1 hour of wall time for the old monolithic job, so we are getting more than 2x speedup.

The now-slowest Scala tests job is currently comparable with the native Rust tests (and they should improve when the old gui is gone) — which are the slowest job across all CI checks.

The PR is pretty minimal. Several future improvements can be made:
* Reorganizing and splitting other "heavy" jobs, like the native image generation.
* Reusing the built Engine distribution. However, this is probably a lower priority than I initially thought.
* Building package takes several minutes, so duplicating this job is not that expensive.
* The package is OS-specific.
* Scala tests don't really benefit from it, they'd need way more compilation artifacts.
It'd make sense to reuse the distribution if we, for example, decided to split more jobs that actually benefit from it, like Standard Library tests.
* Reusing the Rust build script binary.
* As our self-hosted runners reuse environment, we effectively get this for free. Especially when Rust part of codebase is less frequently changed.
* This is however significant cost for the GitHub-hosted runners, affecting our macOS runners. Reusing the binary does not save wall time for jobs that are run in parallel (as we have enough runners), but if we introduce job dependencies that'd force sequential execution of jobs on macOS, this would be a significant need.
2024-03-06 18:56:13 +00:00
AdRiley
3ebf1340e8
Add write to xml document (#9299)
* First commit

* Add xml.write

* Add comment

* Changelog.md

* Code review changes

* Code review changes

* Update import
2024-03-06 17:13:28 +00:00
Dmitry Bushev
acf124e089
Visualization tests maintenance (#9294)
Adjusted a couple of flaky tests reported by @mwu-tow
2024-03-06 15:48:56 +00:00
Paweł Grabarz
b7a8909818
Vue dependency update, better selection performance, visible quotes in text inputs (#9204)
- Improved performance by batching simulatenous node edits, including metadata updates when dragging many selected nodes together.
- Updated Vue to new version, allowing us to use `defineModel`.
- Fixed #9161
- Unified all handling of auto-blur by making `useAutoBlur` cheap to register - all logic goes through a single window event handler.
- Combined all `ResizeObserver`s into one.
- Fixed the behaviour of repeated toast messages. Now only the latest compilation status is visible at any given time, and the errors disappear once compilation passes.
- Actually fixed broken interaction of node and visualization widths. There no longer is a style feedback loop and the visible node backdrop width no longer jumps or randomly fails to update.
2024-03-06 15:34:07 +00:00
James Dunkerley
d4b2390fc1
Small change limiting the number of decimal places to 12 digits. (#9298)
Format numbers in the ag-grid so we don't get loads on pointless digits.
![image](https://github.com/enso-org/enso/assets/4699705/0731af47-1e7e-46f5-8bf3-5503ab74a8e3)
2024-03-06 14:08:43 +00:00
Jaroslav Tulach
c5e4173934
Show progress of buildNativeImage (#9276)
Printing out `buildNativeImage` progress as soon as possible. In case of failure dumping it again as a whole.

- [x] All code follows the
[Scala](https://github.com/enso-org/enso/blob/develop/docs/style-guide/scala.md),
style guides.
- All code has been tested:
- [x] Manually verified the log is printed
2024-03-06 12:19:31 +00:00
Radosław Waśko
e37862b09d
Implement a Data Link for Postgres (#9269)
- Closes #9124
2024-03-06 11:57:12 +00:00
Adam Obuchowicz
d2a0bdd9cd
Restore whenReady, as I do not see the freeze (#9262)
When cleaning up board, I stumbled upon https://github.com/enso-org/enso/issues/5851 I tried to replace whenReady, and it just worked. Perhaps the freeze was fixed during some electron version bump.

Tests on other platforms (I'm using Garuda Linux) advised.

Fixes #5851
2024-03-06 11:04:54 +00:00
somebody1234
d481ccac94
Extract tests to their own files (#9229)
Move tests to their own files, for consistency

# Important Notes
None
2024-03-06 09:53:12 +00:00
Jaroslav Tulach
6acec1b30b
Use .. to identify autoscoped constructors (#9285) 2024-03-06 10:28:15 +01:00
somebody1234
1cc7ca1338
Fix typechecking (#9279)
- Fix issue where `playwright-report/` is being typechecked by `npm run typecheck` in the dashboard, causing CI to fail
- Attempt to fix flaky dashboard test

# Important Notes
To test that typechecking isn't completely broken, it's recommended to intentionally create a type error in the dashboard code base.
2024-03-06 08:20:08 +00:00
Sergei Garin
d9293e4011
Add @MrFlashAccount as a codeowner of ide-desktop (#9280)
This PR add @MrFlashAccount (me) as a code owner for ide part
2024-03-06 08:19:05 +00:00
somebody1234
618080b803
Hard delete of items in Trash (#9091)
- Close https://github.com/enso-org/cloud-v2/issues/698
- Requires https://github.com/enso-org/cloud-v2/pull/905

# Important Notes
None
2024-03-06 03:12:14 +00:00
Michał Wawrzyniec Urbańczyk
1a76f6383d
[CI] Checkbox for requesting a clean build when manually dispatching a workflow (#9270)
This PR allows requesting a clean build when triggering the workflow through the manual dispatch.
Previously it was possible only by creating PR and adding the label to it.
2024-03-05 15:40:46 +00:00
Kaz Wesley
b0842feea2
Hide placeholders (#9246)
* New menuVisible logic

* Hide placeholders unless sole selected node, required argument, or requested by dynamic config
2024-03-05 09:16:38 -05:00
Pavel Marek
f02213ae2b
Enable splitting for EqualsSimpleNode (#9268)
Fixes the regression introduced by #9070 in `org.enso.benchmarks.generated.Collections.list_meta_fold` benchmark.

# Important Notes
As can be seen on the graph in IGV:
![image](https://github.com/enso-org/enso/assets/14013887/31b6ceca-4909-4a8f-987f-b456b3fb0a1b)
For some reason, `EqualsSimpleNode` is POLYMORPHIC. That seems to be the most visible performance problem.

First, I tried to introduce `ConditionProfile` with:
```diff
diff --git a/engine/runtime/src/main/java/org/enso/interpreter/node/expression/builtin/meta/EqualsNode.java b/engine/runtime/src/main/java/org/enso/interpreter/node/expression/builtin/meta/EqualsNode.java
index b368fb7fe..57274b37e 100644
--- a/engine/runtime/src/main/java/org/enso/interpreter/node/expression/builtin/meta/EqualsNode.java
+++ b/engine/runtime/src/main/java/org/enso/interpreter/node/expression/builtin/meta/EqualsNode.java
@@ -9,6 +9,7 @@ import com.oracle.truffle.api.dsl.Specialization;
import com.oracle.truffle.api.frame.VirtualFrame;
import com.oracle.truffle.api.interop.ArityException;
import com.oracle.truffle.api.nodes.Node;
+import com.oracle.truffle.api.profiles.ConditionProfile;
import org.enso.interpreter.dsl.AcceptsError;
import org.enso.interpreter.dsl.BuiltinMethod;
import org.enso.interpreter.node.EnsoRootNode;
@@ -46,6 +47,7 @@ public final class EqualsNode extends Node {
@Child private EqualsSimpleNode node;
@Child private TypeOfNode types;
@Child private WithConversionNode convert;
+  private final ConditionProfile equalsProfile = ConditionProfile.create();

private static final EqualsNode UNCACHED =
new EqualsNode(EqualsSimpleNodeGen.getUncached(), TypeOfNode.getUncached(), true);
@@ -85,7 +87,7 @@ public final class EqualsNode extends Node {
public boolean execute(
VirtualFrame frame, @AcceptsError Object self, @AcceptsError Object other) {
var areEqual = node.execute(frame, self, other);
-    if (!areEqual) {
+    if (!equalsProfile.profile(areEqual)) {
var selfType = types.execute(self);
var otherType = types.execute(other);
if (selfType != otherType) {

```
But that did not resolve the issue.

My second attempt was to enable splitting for `EqualsSimpleNode` with `@com.oracle.truffle.api.dsl.ReportPolymorphism` annotation, which seems to resolve the issue. The benchmark is back to its original score, and `EqualsSimpleNode` is no longer POLYMORPHIC.
2024-03-05 11:00:16 +00:00
Dmitry Bushev
02bd863c29
Add ascription type information to suggestions database (#9267)
close #9258

Changelog:
- fix: add information about the type descriptions to the suggestion database
2024-03-05 09:02:41 +00:00
Adam Obuchowicz
ba9b7f199a
E2E test fixing and bring back reports (#9238)
After investigating some errors, I found another two missing awaits in our tests. Because those are so easy to overlook, I added a lint rule which makes failure on unhandled promise (for e2e tests only).

Also, enabled HTML reports again, with traces this time, to enable closer investigation of any failure in the future. @mwu-tow added code for uploading them in GH.
2024-03-05 07:06:11 +00:00
Radosław Waśko
5d00a6110d
Fix cleanup of secrets in tests (#9254)
- Adds a missing finalizer to a test
- Adds a workaround for #9251 bug
2024-03-04 17:44:31 +00:00
James Dunkerley
7f6d10a9e0
Some minor improvements suggested from Ned's use (#9249)
- Adjusted `AWS_Credential` to have a `Default` and removed support for `Nothing` from functions.
- Renamed `Response_Body.to_file` to `Response_Body.write`.
- Add `write` to `Response`.
- Add `Table.get_value` and `DB_Table.get_value` allowing getting a single value from a table.
- Added `Data.download` allowing downloading from a URL to a file.
- Added text widget as input widget for `Data` methods.

![image](https://github.com/enso-org/enso/assets/4699705/fcfc8b1e-1197-4106-b8a7-43b1435327c0)
2024-03-04 16:33:31 +00:00
Ilya Bogdanov
9ee4348ee5
Add delete node icon to circular menu (#9264)
Closes #9168, also adds `Show full menu` icon back and hides `edit comment`.

https://github.com/enso-org/enso/assets/6566674/43af88a7-2b08-4f7d-8f4a-f47b41e51b2e
2024-03-04 16:05:56 +00:00
AdRiley
8b889f0977
Make Table.To_Xml return a XML_Document (#9263)
As part of the XML improvements it makes more sense for Table.To_Xml to return a XML_Document.
2024-03-04 15:19:20 +00:00
Ilya Bogdanov
6f4963d7d1
Add imports on editing nodes (#9253)
Closes #9241

Demonstration with import conflict resolution:


https://github.com/enso-org/enso/assets/6566674/2397ecf1-7d77-4fa9-93bc-15b81d7fd042
2024-03-04 14:43:15 +00:00
Michael Mauderer
94666e6727
Dropdown widget improvements. (#9186)
Closes  #8995

[Peek 2024-03-01 16-06.webm](https://github.com/enso-org/enso/assets/1428930/3f62aad8-8426-4f8f-b49e-57769b22bfb4)
2024-03-04 12:54:38 +00:00
Jaroslav Tulach
5676618bad
Autoscoped constructors (#9190)
Fixes #8645 by recognizing `~` prefix to constructor names.
2024-03-04 11:41:02 +00:00
Ilya Bogdanov
3be5e585f2
Imports conflict resolution (#9093)
Closes #5353


When name conflict is detected, we use fully qualified name instead of the usual one.

https://github.com/enso-org/enso/assets/6566674/2dab40ce-b925-4443-ab37-acd0a8968e47
2024-03-04 11:17:53 +00:00
somebody1234
b4cea527db
Add Warning indicator. (#9160)
- Close #9125
- Display the new warning icon to the left of the node, when the node is not being hovered over.

# Important Notes
None
2024-03-04 10:16:08 +00:00
Radosław Waśko
39af372bcd
Allow resolving enso:// URIs in Data.read and other places (#9225)
- Implements the core parts of #9048
- Currently the path resolution is done by resolving each segment, one by one - requiring as many API calls as there are segments in the path.
- This should be replaced in a followup PR, once https://github.com/enso-org/cloud-v2/issues/899 is implemented.
2024-03-02 16:04:30 +00:00
Radosław Waśko
ade7d42da4
Fix termination of http-test-helper on Ctrl-C (#9243)
After some recent changes, the HTTP server helper would no longer stop when Ctrl-C was issued. That is because the semaphore was being used in the wrong way: it was released on the same thread that was supposed to acquire it - but the acquire never returned as it would be waiting for the release, so the release could also never happen. Thus the main thread was in a constant dead-lock.
2024-03-02 15:06:25 +00:00
Dmitry Bushev
fad1b45bcf
Fix attaching generic annotations (#9234)
Fixes the issue with attaching generic annotations in complex types.

Annotations in the type body could be lost during the compilation if its constructor was defined at the end of the type definition.
2024-03-01 18:01:50 +00:00
Kaz Wesley
44a1d9138b
Create and edit comments (#9230)
* CodeEditor: Fix dynamic imports

* Doc editing: AST support

* Doc editing

* Button and comment creation

* Fix concrete syntax edge case

* Remove testing code

* Fix
2024-03-01 12:56:18 -05:00
Kaz Wesley
ac4bbd89c7
Close dropdowns (#9206)
Fixes #7562. Close a dropdown when:
- A click outside the dropdown occurs
- `Esc` is pressed
- Any other `Interaction` is started (i.e. using a shortcut)

# Important Notes
- Simplifies `Interaction` API and uses it for closing/canceling CB as well as dropdowns.
- Adjusted some event handlers so that handled clicks don't also register as GraphEditor background clicks.
- Introduces a CSS approach to prevent unwanted text-selections; we were doing it with JS until my previous PR, and the JS solution was breaking things.
2024-03-01 17:49:23 +00:00
James Dunkerley
964fdfd7ea
Align XML_Document and XML_Element APIs more. (#9233)
- Added `to_table` extensions on some core types.
- Added ICON to `Any.to`.
- Added ICON to `Column.info`, `Table.info`, `DB_Column.info` and `DB_Table.info`.
- Added defaults to `Table.cross_tab` and `DB_Table.cross_tab`.
- Added `name`, `get`, `at`, `inner_xml` and `outer_xml` to `XML_Document`.
- Added constants into left hand side of simple expressions.
- Added widget to `get` and `at` on `XML_Document` and `XML_Element`. (Some bug in annotation code with Dmitry)
- Altered `get` and `at` to not allow XPath and just get direct child/attribute values.
- Added `get_xpath` to `XML_Document`.
- Renamed `get_elements_by_tag_name` to `get_descendants_by_tag_name` and added new `get_children_by_tag_name`.
- Added `child_names` and `attribute_names` to `XML_Document` and `XML_Element`.
2024-03-01 17:42:44 +00:00
Adam Obuchowicz
55f3820cf9
Fix selection tests (#9240)
Sometimes our test realizes, that `currentTarget` of `MouseEvent` is a read-only property. I have no idea why it does not do it every time, but this fix should work.
2024-03-01 15:51:33 +00:00
Radosław Waśko
4316709379
Implementing reading Data Links (#9215)
- Close #9123
2024-03-01 15:33:21 +00:00
Pavel Marek
96bfcb3e63
Add compiler benchmarks (#9158)
Add compiler benchmarks to `engine/runtime-benchmarks`. All the benchmarks generate source code on the fly into `engine/runtime-benchmarks/target/bench-data` directory. Random data generators are set with the same seed. For the convenience of reviewers, I am attaching the benchmark sources in [bench-data.zip](https://github.com/enso-org/enso/files/14423372/bench-data.zip).

I have created benchmarks that measure the performance of a whole module compilation, and benchmarks that measure the performance of inline compilation. They directly call `run` and `runInline` methods on `org.enso.compiler.Compiler`.

# Important Notes
- The results will be available in https://enso-org.github.io/engine-benchmark-results/engine-benchs.html in a few days after the merge of this PR.
- The benchmark parameters are tweaked so that an average iteration takes less than 400 ms and more than 30 ms.
- Ensured that the benchmarks measure performance of the compiler, for example:
![image](https://github.com/enso-org/enso/assets/14013887/c870f4ad-1418-4812-85f2-ca9664711163)
2024-03-01 13:37:18 +00:00
Adam Obuchowicz
cabd3ac072
Turn off flaky test (#9232) 2024-03-01 13:37:46 +01:00
Radosław Waśko
b33802a1d1
Start using pre-signed URLs for Enso Files (#9227)
Since the cloud finally gives us the pre-signed URLs, we can start using that.
2024-03-01 01:01:21 +00:00
GregoryTravis
54675b1e4d
Implement Table.replace for the database backend (#8986) 2024-02-29 18:36:42 +00:00
Pavel Marek
53c1b3f48b
PathProgressBodyHandler does not return immediately (#9222)
Fixes downloading of files. It used to fail because it returned almost immediately. Also fixes progress reporting when fetching a String.

# Important Notes
Tested by removing appropriate engine and runtime from `$HOME/.local/share/enso` and with manually running:
```
java -jar launcher.jar --launcher-log-level trace install engine 2024.1.1-nightly.2024.2.29
```
2024-02-29 16:42:33 +00:00
Ilya Bogdanov
c44b7f2c2d
Small visualization fixes (#9130)
Closes #9009

- [x] Fixed big white space above full screen viz.
- [x] Escape closes the full screen visualization.
- [x] Viz shortcuts (Shift-Space for toggling fullscreen vis, Ctrl-Space for switching vis type) are implemented.
- [x] The width of visualizations is preserved across project reopens (do we need height as well?)

New video:


https://github.com/enso-org/enso/assets/6566674/d9036ce9-57a4-429b-9bd9-6392782136ea

Older videos:

https://github.com/enso-org/enso/assets/6566674/d7129307-0626-4343-8a76-b9bf764c6a5b


https://github.com/enso-org/enso/assets/6566674/0518d3d8-9ed1-4e6c-bbe0-b7ed00bf7db3

# Important Notes
- Metadata format changed in backward-compatible way
2024-02-29 16:37:40 +00:00
Kaz Wesley
d7e8f271eb
Ensure objects obtained from Y.Js are not modified (#9217)
Y.Js caches values it returns from getters, so they must not be modified. Use `DeepReadonly` to protect values returned from `Y.Map`s in AST logic.
2024-02-29 16:22:33 +00:00
Kaz Wesley
b027a7ee92
Display comments (#9218)
Introduce basic display of node documentation-comments.

![image](https://github.com/enso-org/enso/assets/1047859/b1960097-d265-4d77-a924-fd3c309dc3fd)

Part of #9162.

# Important Notes
- Add synchronization of `documentation` updates to the GraphDB; add a type assertion that ensures `Node` synchronization is updated when new fields are added to `Node`.
- Introduce read-only comment rendering.
2024-02-29 15:42:11 +00:00
Radosław Waśko
386132cdab
Fix matching JS strings (#9203)
- Fixes #9202
2024-02-29 15:07:29 +00:00
Adam Obuchowicz
874e9efe74
Add workaround for huge idmap diffs (#9207)
Fixes probably #9198 See [this comment](https://github.com/enso-org/enso/issues/9198#issuecomment-1968484269) for justification. TLDR: the diff algorithm is too slow for our huge idmap.

The proper fix would be to reduce idmap size. Expect tasks for that soon.
2024-02-29 14:42:59 +00:00
Pavel Marek
c2842df8d8
Fix benchmark run build (#9220) 2024-02-29 14:03:13 +01:00
somebody1234
0a28d91d35
Switch to AJV for validating JSON Schema (#9191)
As ~~requested~~ suggested by @radeusgd

# Important Notes
None
2024-02-29 10:36:47 +00:00