Commit Graph

3489 Commits

Author SHA1 Message Date
somebody1234
f7e079aa43
Fix Esc not closing CB (#7800)
- Fixes #7799

The PR that introduced this bug stopped event propagation in certain cases, in order to fix another issue.
This PR introduces a way to run an event handler, but indicate failure so further handlers (if any) are run, otherwise the event will be propagated all the way to the document root.

# Important Notes
None
2023-09-15 15:04:45 +00:00
Jaroslav Tulach
af8a2c39d8
Throw UnsupportedMessageException when loosing BigInteger precision (#7817) 2023-09-15 17:00:09 +02:00
Jaroslav Tulach
4caee1b00f
Cleanup code in IdExecutionInstrument (#7811)
As part of investigation of #7683, let's make `IdExecutionEventNode` smaller by having a reference to factory and its fields.
2023-09-15 10:09:42 +00:00
Dmitry Bushev
bbf96f0d16
expressionUpdates do not contain Method Pointer of operators (#7659)
close #7520

Changelog:
- update: SectionsToBinOp compiler pass produces function application for left sections
- refactor: simplify the registration of builtin methods
2023-09-15 08:01:21 +00:00
Dmitry Bushev
5eb4944ccf
Send suggestions database on request (#7812)
close #7765

Changelog:
- update: instead of relying on the connection closed events, the `sendSuggestionsDatabase` request initiates the suggestions database re-indexing
2023-09-14 17:31:37 +00:00
Hubert Plociniczak
1ee3d8f4f0
Rename Decimal to Float (#7807)
Implements #6889.
2023-09-14 15:01:30 +00:00
Kaz Wesley
b9ec6d4ec3
Context restoration (#7662)
Add support for recovering from GL context loss. When the context is restored, the loading spinner is shown until shaders finish recompiling.

[vokoscreenNG-2023-08-25_09-39-11.webm](https://github.com/enso-org/enso/assets/1047859/cfa90ec5-72a1-41e6-bafa-177fa5e85fb2)

*While the context is missing, the loading spinner is rendered in the 0% state. (This condition will not normally be observed, except momentarily, as the browser should restore the context immediately if it is lost while the page is visible.) When we receive a new context, the spinner switches to the 90% state until restoration completes. Restoration is fast, as we don't need to do much work except recompiling shaders.*

# Important Notes
- A new debug hotkey, Ctrl+Alt+Shift+X, causes context loss for testing. Pressing it a second time causes context restoration.
- `Texture` is still a CPU-bound texture. It now uses the "immutable" `texStorage/texSubImage` API, which is a ["preferred alternative"](https://registry.khronos.org/webgl/specs/latest/2.0/#3.7.6) to the `texImage` API because it can be more efficient.
- The type for texture uniforms is now `Uniform<Option<Texture>>`. Texture uniforms are decoupled from the context.
- A new `ContextLost` error type can be returned by functions that cannot complete if the context is lost.
- Fix some crashes that could occur when context was lost.
- Clarify ownership of some rendering-related types: Externalize, and where possible eliminate, `Rc/RefCell`s.
2023-09-14 14:40:28 +00:00
Jaroslav Tulach
30a62b97bb
Runtime checking of ascribed expression types (#7796) 2023-09-14 14:09:41 +02:00
Jaroslav Tulach
a5094225cf
Moving numpy check into test/Examples_Tests (#7808) 2023-09-14 13:13:40 +02:00
Ilya Bogdanov
51491c1fa1
Fix visualization closing when cmd shortcut is pressed (#7798)
Fixes #7457

The issue was caused by the FRP logic that assumed we wanted to close the preview even if it wasn't opened in the first place.

https://github.com/enso-org/enso/assets/6566674/ceb4996b-c878-4ff1-8bca-7d2a0b817769
2023-09-13 21:52:26 +00:00
Hubert Plociniczak
9fdcfc0105
Fix log output for suggestions' tests (#7803)
Very verbose log output discovered by @4e6.
Needed an explicit log setup call, similar to other language server's tests.


Before (tons of):
```
...
23:04:42.319 [TestSystem-akka.actor.default-dispatcher-6] DEBUG slick.compiler.CodeGen -- Compiled server-side to:
| CompiledStatement "select "id" from "suggestions_version"" : Vector[t10<(Long')>]
23:04:42.320 [TestSystem-akka.actor.default-dispatcher-6] DEBUG slick.compiler.QueryCompiler -- After phase codeGen:
| ResultSetMapping : Vector[Mapped[Option[Long']]]
|   from s8: CompiledStatement "select "id" from "suggestions_version"" : Vector[t10<(Long')>]
|   map: CompiledMapping : Mapped[Option[Long']]
|     converter: TypeMappingResultConverter
|       child: OptionResultConverter$mcJ$sp idx=1 : Long'

23:04:42.320 [TestSystem-akka.actor.default-dispatcher-6] DEBUG slick.compiler.QueryCompilerBenchmark -- ------------------- Phase: Time ---------
23:04:42.320 [TestSystem-akka.actor.default-dispatcher-6] DEBUG slick.compiler.QueryCompilerBenchmark --       assignUniqueSymbols:    0.101991 ms
23:04:42.320 [TestSystem-akka.actor.default-dispatcher-6] DEBUG slick.compiler.QueryCompilerBenchmark --           unrollTailBinds:    0.015431 ms
...
```
Now: Gone.
2023-09-13 16:34:04 +00:00
somebody1234
e875781e29
Vue widgets (#7728)
Adds widgets:
- Checkbox (with sorting)
- Numeric slider
- Dropdown (accepting a list of strings)
- Closes #7731
- Placeholder (underscore - has no actions)

# Important Notes
The widgets are currently added to every node, but are not synced with the yjs representation. This is intentional, as (afaict) the format for the AST representation is not yet finalized.

There are a number of design differences, for practical reasons:
- The dropdown now has a scrollbar.
- As a side effect, the sort button needed to be moved left, to avoid overlapping with the scrollbar.
- Note that it is *not* centered in the 8px horizontal padding. It is 4px wide, and has 1px left and 3px right padding: `.||||...`. (Note that the 8px horizontal padding from the design is retained.
- 4px of vertical padding has been inserted, so that there is *some* padding between the bubble for the selected item, and the outer dropdown container, when the first item is selected. Note that this is different to the 8px
- 16px of right margin has been inserted after every item. This is the same amount of padding that is added by the bubble. This means that the dropdown does not change in width when a long item is selected.

Design issues:
- The sort button for the dropdown overlaps the text
2023-09-13 10:06:24 +00:00
Dmitry Bushev
e5425d35a0
Log visualization expressions generated by IDE (#7756)
close #7608

Changelog:
- update: log separately the evaluation of visualization expression and its arguments
- update: add visualization expression, its arguments, and the value type to the log

# Important Notes
Example

```
[TRACE] [2023-09-06T20:41:45+03:00] [enso] Executing visualization [VisualizationConfiguration(d195fdd8-d4e8-400f-a0d4-e50417eddd0a,ModuleMethod(MethodPointer(Standard.Visualization.Table.Visualization,Standard.Visualization.Table.Visualization,prepare_visualization),Vector(1000)),local.New_Project_1.Main)] on expression [ddc060df-9b59-48e5-bc61-aca849347343] of [class org.enso.interpreter.runtime.data.vector.Vector$Generic]...
```
2023-09-12 17:27:37 +00:00
Radosław Waśko
8b6e70b155
Support for BigInteger values in Table (#7715)
- Fixes #7354
- And also closes #7712
- Refactors how we handle numeric ops - ensuring that the 'kernels' are placed all in one place and selected based on storage types.
2023-09-12 13:18:04 +00:00
Dmitry Bushev
a7fc333ff0
Fix flaky project rename test (#7794)
Fixes the _RefactoringTests - rename project_ part of the #7775


Changelog:
- update: send the ok response before the notification to fix the order of events in tests
2023-09-12 12:24:12 +00:00
Ilya Bogdanov
6fd2295cc6
Do not lose focus when clicking fullscreen visualization (#7782)
Fixes #7524

The issue was caused by the fact that fullscreen visualization does not have hover area, so clicking anywhere was deactivating it because we used `deselect_click = scene.on_event::<mouse::Down>();`


https://github.com/enso-org/enso/assets/6566674/08a463f3-764f-4b2c-b41f-13521f5cfc56
2023-09-12 10:28:13 +00:00
Hubert Plociniczak
3445327581
Cleanup serialization config (#7748)
Makes it clear that those IR entries are not needed for executing native runner.

# Important Notes
Follow up on #7017
2023-09-12 08:28:06 +00:00
Hubert Plociniczak
ea5096a288
Workaround crashes during regular execution (#7778)
This PR addresses two problems mentioned in #7766:
1. A random integer overflow, likely caused by a bug in Rust parser
2. A concurrent access to a methods' map

Re 1: Unable to reproduce but it doesn't mean it won't happen again. Added a try/catch to get in the logs source code that caused it **and** not crash hard when it occurs.

Re 2: Changing methods map from `HashMap` to `ConcurrentHashMap`. Due to a poor design we leaked the underlying structure in a number of places, unnecessairly. `ConcurrentHashMap` does not accept `null` keys therefore due to leaking implementation had to ensure that `methods` of `ModuleScope` never escapes as-is.

Both workarounds should ensure that we don't crash hard when they appear.

Closes #7766
2023-09-11 13:45:31 +00:00
Jaroslav Tulach
50124704c8
Support runtime checks of intersection types (#7769) 2023-09-11 14:05:20 +02:00
Jaroslav Tulach
a42850f980
Benchmark shall loop correctly (#7781) 2023-09-11 14:04:10 +02:00
Pavel Marek
1be9ba615a
Fix implicit conversion of foreign JS object to Text (#7774)
Fixes implicit conversion of foreign JS object to Text.
2023-09-11 10:21:33 +02:00
Ilya Bogdanov
f6693a844c
Forbid node pasting when editing (#7768)
Closes #7759. The reason was a missing condition in the shortcut setup.

https://github.com/enso-org/enso/assets/6566674/d4475d48-f459-4dd9-ba9b-42e8110b541c
2023-09-11 08:18:29 +00:00
Pavel Marek
294ee46af4
Fix query parameters in bench_download.py tool (#7772)
URL query parameter construction in the `bench_donwload.py` tool uses `urllib` to properly quote, e.g., complex branch names.

# Important Notes
Fixes queries with complicated branch names, like `./bench_download.py -v -s stdlib --use-cache true -b develop wip/akirathan/6959-Integer.+-cannot-be-invoked-statically`
2023-09-08 15:33:23 +00:00
Pavel Marek
e0ee8fdda7
Merge Small_Integer and Big_Integer types (#7636)
Merge Small_Integer and Big_Integer types into a single Integer type
2023-09-08 16:04:39 +02:00
Adam Obuchowicz
3c00cb400e
First iteration of Component Browser Panel in Vue (#7718)
Updated the Component Browser stub from @Frizi's branch. Filled with some mocked data and implemented highlight and navigation.

https://github.com/enso-org/enso/assets/3919101/6af57413-bcb6-4402-9a4a-a992d58504ba

# Important Notes
Still missing the input panel, and obviously, the integration with anything will be a part of another task.
2023-09-08 09:57:02 +00:00
Michał Wawrzyniec Urbańczyk
03aebc136e
wip (#7745) 2023-09-08 11:26:39 +02:00
James Dunkerley
f0ae9bf9c5
Fixes issue writing to a dry run Excel File (#7763)
- Adds `size` to `File`.
- If file is empty, then create a new Excel file.
- Fixes dry run Excel write issue.
2023-09-08 08:52:00 +00:00
Pavel Marek
687686773e
Fix on argument for Vector.sort (#7751)
Fix treatment of the `on` argument of `Vector.sort`.
2023-09-07 17:32:08 +00:00
somebody1234
5ab74b5218
Vue project title, execution mode selector, and breadcrumbs (#7726)
- Closes #7730. Adds top bar containing:
- Project title
- Execution mode selector (design/live)
- Navbar containing:
- Navigation previous/next button
- Breadcrumbs

# Important Notes
Icons are currently all separate files. This may need to be changed to a single svg containing individual icons in `defs` if(/when) that is merged into `develop`.
2023-09-07 15:02:55 +00:00
somebody1234
db425e7a77
Rename trash to delete; fix search bar autofocus (#7710)
- Renames "Move To Trash" to "Delete" on local backend
- This is because the local backend does not have a trash category (or categories at all)
- Fix search bar autofocus
- The "delete" hotkey was focusing the search bar - this was because the shortcuts handler, and the autofocus handler, were both registered on the same `EventTarget`. The fix is to do `stopImmediatePropagation()` to stop running any other event handler, even ones on the same `EventTarget`.

# Important Notes
None
2023-09-07 13:06:54 +00:00
somebody1234
2155daa935
Fix unnecessary /versions calls (#7747)
- Fixes https://github.com/enso-org/cloud-v2/issues/659

`getProjectDetails` was calling `listVersions` to get a fallback IDE version, creating a lot of unnecessary requests to the backend, *especially* because `getProjectDetails` is called periodically when a project is opening.

In this PR, the implementation has been changed to cache the fallback version for one day, meaning the extra `listVersions` calls should now only ever happen once per client per day.

# Important Notes
None
2023-09-07 12:59:02 +00:00
Paweł Grabarz
9b0f551881
Gui2: integrate rust Enso parser (#7753) 2023-09-07 12:54:01 +00:00
Ilya Bogdanov
66bd08ccea
Use only a single node color (blue) (#7764)
Closes #7456 by using a *completely random* color for all nodes.

Proof of randomness, ensured with modern LLM:

<img width="720" alt="Screenshot 2023-09-07 at 1 46 41 PM" src="https://github.com/enso-org/enso/assets/6566674/fc3fecd8-c5f6-4167-a646-973c4efedc18">


<img width="1380" alt="Screenshot 2023-09-07 at 1 43 44 PM" src="https://github.com/enso-org/enso/assets/6566674/0b4a91c7-fac2-4bab-921f-39861f891898">

# Important Notes
We can peek any other color if you'd like.
2023-09-07 12:50:12 +00:00
somebody1234
58fbd8e9e8
Async execution controls (#7592)
- Closes https://github.com/enso-org/cloud-v2/issues/619
- Async execution controls

# Important Notes
There is no design for this, as such, implementation details use placeholder designs.

- The context menu uses a play icon. An icon similar in style to the "copy" icon *may* work to represent "run in background", but it may be difficult to visually represent that it is being run in the background, without obstructing it with a foreground window
- The icon for projects being run in the background have a green tint, to distinguish them from projects that will be (or are currently) opened in the editor.
- this will ***almost certainly*** need to be replaced with a proper design
- This *may* also make sense for the local backend, *however* as I don't know whether there is a way to access the completion progress of execution from the PM API, local backend support is currently *not* implemented in this PR.
- On a related note: as far as I am aware, there is also no such endpoint for the cloud backend. However, support for async execution was recently added, so I am adding the basic functionality corresponding to the `executeAsync` project state.
- Whether a project is being run in the background is currently lost on refresh. This is because the async execution state is currently not sent by the backend.
- Placeholder shortcuts have been added (Shift+Enter - Cmd+Enter is already taken by the "share" action, and shift+double click). These are totally optional, and can easily be removed.
2023-09-07 12:36:03 +00:00
Jaroslav Tulach
4213bf9983
Display overriden non-default values (#7762) 2023-09-07 13:31:51 +02:00
Radosław Waśko
7d424bf8a2
Implement Table.delete_rows. (#7709)
- Closes #7238
- Aligns `update_database_table` to a more consistent and clearer API - `update_rows`.
- Adds a `truncate_table` helper function, to pair up with `drop_table`. Both are `PRIVATE` for now.
- Adds tests for NULLs in keys in `update_rows` and `delete_rows`.
- The behaviour is sometimes unexpected, so instead these fail with `Null_Values_In_Key_Columns`.
- Adds a workaround for https://github.com/oracle/graal/issues/7359
- Adds a workaround for a related bug where a stack frame has no name (its `rootNode.getName() == null`).
- I could not track down this bug to provide a neat repro.
2023-09-07 11:07:53 +00:00
Pavel Marek
50a9b39c24
Collect stdlib benchmarks results (#7599) 2023-09-06 14:30:52 +00:00
Ilya Bogdanov
fff1386c6d
Fix new node position (#7680)
Closes: #7309

The changed origin of the visualization container caused the issue. Now, the origin is at the top left corner of the visualization, and bounding box abstraction expects the origin at the bottom left. Despite the comments in the code, the bounding box is designed to work with bottom-left origin only.


https://github.com/enso-org/enso/assets/6566674/273abfaa-45b6-4374-8d4c-3b8c4e2c1fc2
2023-09-06 14:20:45 +00:00
Adam Obuchowicz
e91633b2e7
Bump electron version (#7707)
Again I hit the problem with shader compilation failing with no apparent reason, and again bumping electron version helped me.

# Important Notes
I bumped to latest `25.x` version as I haven't dared to change major version expecting breaking changes.
2023-09-06 12:02:16 +00:00
Hubert Plociniczak
ceb6084be9
Fix sbt task that creates GraalVM package (#7721)
While looking into #7698 discovered that the `buildGraalDistribution`
task would fail to use the old (pre-23.0) GraalVM naming of artifacts.
This has changed since #7176.

The fix does not attempt to fix a problem of packaged GraalVM name in
`runtime`. That, as the ticket mentiones it, is the role of rust build
script that creates the correct bundle.
2023-09-06 13:58:10 +02:00
Dmitry Bushev
a1f2560491
Fix re-exports of type constructors (#7724)
close #7674

Changelog:
- fix: setting reexport field when serializing the library
2023-09-06 11:02:21 +00:00
Hubert Plociniczak
ddbccd8764
Fix console output for native image (#7744)
* Add serialization config to fix native image

Discovered when switching to console output.

* Add more documentation
2023-09-06 12:12:52 +02:00
Jaroslav Tulach
ab1c1a4c12
Delay check of suspended arguments until they are about to be computed (#7727) 2023-09-06 09:34:12 +02:00
Ilya Bogdanov
1f8675a031
Fix atom types in dropdowns. (#7670)
Fixes #7468

The fix is pretty simple: we reuse the existing functionality for importing stuff and generating expressions. It fixes issues with `Nothing` or `Report_Unmatched` types.


https://github.com/enso-org/enso/assets/6566674/4e7addf9-2175-4f2a-a571-4ef823de5cb0

While debugging, I found it easier to work with a suggestion database when exported to some external format. Hence, I implemented serde serialization support for database entries and also a new debug shortcut <kbd>ctrl</kbd>+<kbd>shift</kbd>+<kbd>u</kbd> to dump all entries to the console.
2023-09-05 14:51:33 +00:00
somebody1234
abdbcfcdb1
Fix double clicking projects to open them (#7690)
- Fixes #7689
- Fix double clicking projects to open them

# Important Notes
None
2023-09-05 09:16:28 +00:00
Paweł Grabarz
82f634b7f8
Add Vue gui project (#7696)
Add a separate `gui2` project with Vue application. Does not modify any existing project files.

![image](https://github.com/enso-org/enso/assets/919491/c7a83521-bf83-4c6a-8d17-91c5eab1f827)

# Important Notes
Currently not integrated with existing build and testing system.
2023-09-04 22:27:33 +00:00
Hubert Plociniczak
8a60bc6dcd
Replace a custom logger with off the shelf implementation (#7559)
This change replaces Enso's custom logger with an existing, mostly off the shelf logging implementation. The change attempts to provide a 1:1 replacement for the existing solution while requiring only a minimal logic for the initialization.

Loggers are configured completely via `logging-server` section in `application.conf` HOCON file, all initial logback configuration has been removed. This opens up a lot of interesting opportunities because we can benefit from all the well maintained slf4j implementations without being to them in terms of functionality.

Most important differences have been outlined in `docs/infrastructure/logging.md`.

# Important Notes
Addresses:
- #7253
- #6739
2023-09-04 09:40:16 +00:00
Radosław Waśko
87ce78615a
Change layout of local library search path in order to be able to move Round_Spec.enso back to Tests (#7634)
- Closes #7633
- Moves `Round_Spec.enso` from published `Standard.Test` into our `test/Tests` project; the `Table_Tests` that depend on it, simply `import enso_dev.Tests`.
- Changes the layout of the local libraries directory:
- It used to be `root/<namespace>/<name>`.
- Now it is `root/<dir>` - the namespace and name are now read from `package.yaml` instead.
- Adds the parent directory of the current project to the default `ENSO_LIBRARY_PATH`.
- It is treated as a secondary path, so the default `ENSO_HOME/lib` still takes precedence.
- This allows projects to reference and load 'sibling' projects easily - the only requirement is for the project to enable `prefer-local-libraries: true` or add the other local project to its edition. The edition resolution logic is **not changed**.
2023-09-01 20:20:04 +00:00
Jaroslav Tulach
6deaf80a87
Standardization of Vector.sort array access (#7697)
Inspired by #6361 - let's use `ArrayLikeXyzNode` instead of `InteropLibrary`.
2023-09-01 08:07:41 +00:00
Jaroslav Tulach
1437a671e1
Introducing generic Any.to type conversion method (#7704) 2023-09-01 08:05:48 +02:00