Commit Graph

3217 Commits

Author SHA1 Message Date
Jaroslav Tulach
e59513065d
Ascribed Type checks for a -> b function types (#7298) 2023-07-17 09:55:30 +01:00
Jaroslav Tulach
6864792653
Avoid Compiler compile time dependency on EnsoContext (#7299) 2023-07-17 09:24:22 +01:00
Pavel Marek
7264d81f2a
Builtin methods can support array-like arguments (#7235)
This PR modifies the builtin method processor such that it forbids arrays of non-primitive and non-guest objects in builtin methods. And provides a proper implementation for the builtin methods in `EnsoFile`.

- Remove last `to_array` calls from `File.enso`
2023-07-17 09:17:39 +02:00
Jaroslav Tulach
3d2c0c0154
Avoiding dependency on EnsoContext from Module and ModuleScope (#7277)
Less dependencies on `EnsoContext` - `Module` shall exist without it. `Module` is a result of a `Compiler` and shall be created before its execution - e.g. requiring `EnsoContext` (with all its runtime information) is a bit too _demanding_.

# Important Notes
The only reason why `Module` wanted `EnsoContext` was to create its (associated) `Type`. `Type`'s constructor needed a parent type and the code was asking for `Any` from the context. That's unnecessary at creation time - we can just use some constant (like `null`) and turning it into `Any` during execution. Benchmarks show that there is no slowdown doing so.
2023-07-15 09:11:28 +00:00
James Dunkerley
aaa235fbad
Add drop down for replace, remove Column_Selector (#7295)
- Add dropdowns for `replace` functions.
- Retire `Column_Selector` type.
- Add `select_blank_columns` and `remove_blank_columns` functions to table types.
- Allow Regex to be used to pick columns.
2023-07-14 17:30:52 +00:00
Ilya Bogdanov
3273ab654d
Hide error message on execution success (#7268)
Closes #7003

Hides annoying "Execution failed" message when the execution is fixed (when we receive ExecutionComplete message)

Also renamed `ExecutionFinished` notification to `ExecutionComplete`, to better reflect the new behavior.


https://github.com/enso-org/enso/assets/6566674/156e19f8-3cdd-4b60-98fb-565746650343
2023-07-14 16:35:07 +00:00
Ilya Bogdanov
383514ee97
Fix error visualization positioning (#7267)
Fixes #7256

Sadly no resizing for error vis yet, it is far too complicated and requires a separate task.


https://github.com/enso-org/enso/assets/6566674/77ddbe78-7f27-41d1-9f63-5dd1d717ecd3
2023-07-14 15:22:20 +00:00
Adam Obuchowicz
853dd2f455
Revert "Show spinner when opening/creating a project, take #2 (#6827)" (#7229) 2023-07-14 15:00:52 +00:00
Dmitry Bushev
f691713077
Add endpoint for downloading a project (#7291)
close #7194

Changelog:

- add: `/projects/{project_id}/enso_project` HTTP endpoint returning an `.enso-project` archive structure
- update: archive enso project to a `.enso-project` `.tar.gz` archive
- update: make project `path` a required field
2023-07-14 13:18:08 +00:00
Radosław Waśko
866283c0a8
Improve error message on Filter_Condition missing arguments in Table.filter (#7290)
In #7148 I improved the error message when a `Filter_Condition` constructor without arguments is provided to `Vector.filter` and its friends. This PR applies the same check to the `Table.filter`.

This is useful, because when we select a Filter_Condition from a widget, initially it does not have all its arguments applied. This used to lead to confusing errors being reported to the user, now, a much clearer error is shown:

![image](https://github.com/enso-org/enso/assets/1436948/19140a7b-d6fc-4292-81d3-dc6d61135cb9)
2023-07-14 08:00:13 +00:00
Dmitry Bushev
86b859bf94
Debug TextOperations test (#7292) 2023-07-13 18:13:38 +00:00
Pavel Marek
2b1c7c6818
Engine benchmarks download tool is able to plot multiple branches (#7257)
Engine benchmark downloader tool [bench_download.py](https://github.com/enso-org/enso/blob/develop/tools/performance/engine-benchmarks/bench_download.py) can now plot multiple branches in the same charts. The tooltips on the charts, displayed when you hover over some data point, are now broken for some branches. I have no idea why, it might be a technical limitation of the Google charts library. Nevertheless, I have also extended the *selection info* section, that is displayed under every chart, where one can see all the important information, once you click on some data point.

Options added:
- `--branches` specifies list of branches for which all the benchmark data points will be in the plots. The default is `develop` only.
- `--labels` that can limit the number of generated charts.

This PR also **deprecates** the `--compare` option. There is no reason to keep that option around since we can now plot all the branches in the same charts.

An example for plotting benchmarks for PR #7009 with
```
python bench_download.py -v --since 2023-07-01 --until 2023-07-11 --branches develop wip/jtulach/ArgumentConversion
```
is:
![image](https://github.com/enso-org/enso/assets/14013887/62010850-79d2-4c6c-92bc-9627bb4c6a0b)

# Important Notes
- Deprecate `--compare` option
- Add `--labels` option
- Add `--branches` option
2023-07-13 17:25:58 +00:00
Jaroslav Tulach
372c2eed66
No need to depend on EnsoContext when working with PackageRepository (#7276)
On a quest to avoid dependencies on `EnsoContext` from `Compiler`. Step one. The ultimate goal is to move `Compiler` and all its `IRPasses` into a dedicated `runtime/compiler` module that could be used from #7054.
2023-07-13 17:04:57 +00:00
Radosław Waśko
620cc361ce
Add date_diff, date_add and date_part to scalar Enso date-time values. (#7273)
Followup of #7221, adding `date_diff`, `date_add` and `date_part` to scalar Enso date-time values.
2023-07-13 15:17:21 +00:00
somebody1234
b042807790
Fix offline mode (#7250)
* Fix offline mode

* Remove `authentication=false` from URL when logging in

---------

Co-authored-by: Paweł Buchowski <pawel.buchowski@enso.org>
2023-07-13 15:35:30 +02:00
Radosław Waśko
ca68dd94da
Adding new Date/Time operations (-, date_add, date_diff, date_part) (#7221)
- Adds `Column.date_diff` for computing date/time difference as integer multiply of some unit.
- Adds `Column.date_add` for shifting date/time by a unit.
- Adds `Column.date_part` for extracting various parts of the date/time value as integer.
- Adds widgets for the 3 methods above whose content depends on the column value type.
- Adds shorthands: `Column.hour`, `Column.minute` and `Column.second` to extract these date parts.
- Extends `Time_Period` with support for milli-, micro- and nano- seconds; and adapts functions taking `Time_Period` to support these wherever possible.
2023-07-13 12:56:54 +00:00
Paweł Grabarz
4be2c7b65b
Fix node name visibility by removing remaining view-mode logic fron node output port (#7269)
Fixes #7259

Node label (and output port in general) used to depend on view-mode logic, which is currently not fully functional. Since we have removed profiling mode from the application, It's best to remove some remaining parts of it to avoid them from interfering.

Labels now work as they used to, being shown on hover or when ctrl is held down.

![image](https://github.com/enso-org/enso/assets/919491/5e6996a4-6d84-4d36-a624-03a53f7e6e8a)
2023-07-13 14:07:07 +02:00
Adam Obuchowicz
fe80ccecac
Single column in component browser (#7233)
This PR contains minimal changes to have a visual part of #7198. It updates the view of _component list only_ to the newest design. The CB panel was shrunk in process, and breadcrumbs are a bit obscured, but they will be moved around in the next few PRs.

![image](https://github.com/enso-org/enso/assets/3919101/a562e365-d512-4320-ae19-10701edaa9ac)


### Important Notes

* This does not touch proper entry ordering yet.
* The component browser background is not (yet) updated; as some colors have alphas in the design, this may affect them.
2023-07-13 12:58:58 +02:00
Jaroslav Tulach
724a788500
Convert vector elements when needed (#7271)
Adds a test case demonstrating the _use of automatic conversions_ when processing vector elements.
2023-07-12 13:05:33 +00:00
Paweł Buchowski
1d77f7cd8e
Add remoteLog function for gathering gui logs (#6582)
Co-authored-by: Michał W. Urbańczyk <mwu-tow@gazeta.pl>
Co-authored-by: Nikita Pekin <nikita@frecency.com>
2023-07-12 12:22:07 +02:00
somebody1234
af03938305
"Share with" button (#7100)
* Add backend endpoints for "share with" button

* wip

* Fix bugs

* Invite user to organization if email is not found

* Minor fix for error message

* Address review

* Address issues

* Fix React error about identical keys

* Fix "share with" modal z-index; filter out users with permissions on asset

* Fix errors; address comment

* Fix

* Change submit button text to "Already has access" when appropriate

* Address review

* Show email on hover

* Finish renaming "share with" modal

* Select multiple for "share with" modal

* Minor style changes

* Deselect other permissions when "own" permission is selected

* Fix deselecting permissions

* Remove unused svg

---------

Co-authored-by: Paweł Buchowski <pawel.buchowski@enso.org>
2023-07-12 10:12:39 +02:00
somebody1234
b586e32f10
Show spinner on templates when creating project (#7225)
* Show spinner on templates when creating project

* Immediately show project as loading

* Fix infinite spinner bug

* Fix bugs

---------

Co-authored-by: Paweł Buchowski <pawel.buchowski@enso.org>
2023-07-11 11:46:26 +02:00
somebody1234
57b9f59f3f
Fix improperly scoped styles in visualizations (#7211)
* Add `.vis-histogram` to histogram styles

* Add `.vis-scatterplot` to scatter plot styles

---------

Co-authored-by: Paweł Buchowski <pawel.buchowski@enso.org>
2023-07-11 09:13:13 +02:00
Jaroslav Tulach
2aeef4d844
Automatically apply from conversion when runtime argument check fails (#7009) 2023-07-11 07:23:25 +01:00
James Dunkerley
0adab6c68c
Round on a column was always adding a warning (#7246)
- Only warn if outside allowed range.
- Added `is_infinite` to In-Memory column.
- Allow integer value type for `is_nan` and `is_infinite`.
2023-07-10 17:35:23 +00:00
Dmitry Bushev
4864e5b51d
Add fileModifiedOnDisk notification (#7239)
part of #7178

Changelog:
- add: `text/fileModifiedOnDisk` notification
- update: during the auto-save, check if the file is modified on disk and send the notification. I.e. auto-save does not overwrite the file if it was changed on disk (but the save command does)
- update: IDE handles the file-modified-on-disk notification and reloads the module from disk

# Important Notes
Currently, the auto-save (and the check that the file is modified on disk) is triggered only after the file was edited. The proper check (using the file-watcher service) will be added in the next PR

https://github.com/enso-org/enso/assets/357683/ff91f3e6-2f7a-4c01-a745-98cb140e1964
2023-07-10 16:50:14 +00:00
GregoryTravis
345d6b9cb1
Add cross_join support to Database Table (#7234) 2023-07-10 16:29:37 +00:00
Adam Obuchowicz
72ec775d8c
Skip local engine version check (#7230) 2023-07-10 15:10:48 +02:00
somebody1234
b8b2f39270
Fix right click (#7237)
Fixes #7236

# Important Notes
This was caused by `userMenu` having an effect that depends on `setModal` and `unsetModal`, which were not memoized - so they would be a different value every time.
2023-07-10 09:59:57 +00:00
Michał Wawrzyniec Urbańczyk
8c2ff5ddb7
Fix Undo/Redo for visualization toggling (#7209) 2023-07-10 11:17:53 +02:00
James Dunkerley
1fb60df61b
Fixes from the live demo. (#7243)
- Removed defaults from `cross_tab`. It caused an out-of-heap space error when it attempted to build a 205k x 205k table. Now has a hard limit of 10,000 columns - we can increase this once we have more concrete test data.
![image](https://github.com/enso-org/enso/assets/4699705/bc38d41c-56dc-41bd-8a7c-fa89ecfa7f79)

- Adjusted the dropdowns on `Aggregate_Column` for `columns` and `order_by` to be dropdowns as nested Vector editors are not supported.
![image](https://github.com/enso-org/enso/assets/4699705/f4a7c7cc-6a21-462c-a39e-65fbab82c367)

- Altered `Aggregate_Column` so `new_name` now `new_name:Text=""` and not taking `Nothing` anymore. Makes it appear correctly in IDE.
![image](https://github.com/enso-org/enso/assets/4699705/196a49ba-4274-44bb-b876-0372c8f62746)

- Added dropdowns for `fill_empty`, `fill_nothing` and `replace` on `Table`.
![image](https://github.com/enso-org/enso/assets/4699705/9ee5cec2-82d5-4452-b650-67015ac9fee5)

- Added `replace` to Database table throwing `Unsupport_Database_Operation`.
2023-07-09 18:03:05 +00:00
Ilya Bogdanov
8020916f58
Resizing visualizations (#7164)
Closes #7047

Adds an ability to resize visualizations by dragging a special (invisible) shape along the bottom and right borders of visualizations.

- Visualizations are aligned to the left border of the node now.
- Default visualization width now equals to the node's width (default height is the same)
- Changing the width of the node also changes visualization width, but only if no manual drag-resizing was applied
- Visualization size is preserved when reopening visualization (but it is not saved in project metadata)
- No visual indication that resizing is possible exist, it will be implemented in #7049



https://github.com/enso-org/enso/assets/6566674/2f2525e8-cf10-4c92-953a-b69eb97a954a
2023-07-09 15:18:45 +00:00
Hubert Plociniczak
9dcf48a3e0
Cache dataflow errors (#7193)
The logic in instrumentation specifically prohibited caching of panics (added in https://github.com/enso-org/enso/pull/1611).
Except it seems that the restriction was too aggressive because dataflow errors could be cached.
This indirectly fixes the problem with dataflow error in the context of a (temporary) change in execution context, which should keep around the old value.

Closes #7140.

After the fix:
[fix_7140.webm](https://github.com/enso-org/enso/assets/292128/b8d522db-985a-4e57-bbf1-a075d14d39a2)
2023-07-09 14:45:22 +00:00
Michael Mauderer
66201dc94c
New Prototype AI Searcher (#7146)
Adds a new bare-bones AI searcher that can be triggered with `cmd+tab`. It will interpret the searcher input as a prompt to an AI model and replace the created node with the suggestion that was computed.

https://github.com/enso-org/enso/assets/1428930/f8403533-54ba-4ea5-9d3c-6bdf3cf336b5

Implements the first step of #7099.

# Important Notes
Contains some refactoring that allows us to have multiple controllers side by side. So QA testing should make sure that the Component Browser Searcher is still working as before.
2023-07-07 12:47:10 +00:00
Hubert Plociniczak
dd06c59380
Initialize Language Server's JSON RPC protocol asynchronously (#7232)
As discovered in #7224, Json RPC protocol was added to the asynchronous resource initialization stage, as part of #6306, but was not in fact initialized at that point.
Instead it was initialized when the server was started to be able to serve correctly the initialization messages. A classic Catch-22. It was really hard to discover this just by looking at the code, but the profiling clearly showed where the time was spent.

This change splits Language Server's protocol into two:
- the first one accepts `heartbeat/init` and `session/initProtocolConnection`
- the second one enriches it with the full set of supported messages

This shifts the initialization from blocking for 0.5 sec to only ~30ms, and performing the second stage asynchronously.

Closes #7224.

# Important Notes
Before the change (blocking server startup):
![Screenshot from 2023-07-05 18-53-24](https://github.com/enso-org/enso/assets/292128/bcfa9043-d00a-4b36-a44c-782a388a16b9)
![Screenshot from 2023-07-05 18-53-10](https://github.com/enso-org/enso/assets/292128/54927787-4c95-46db-bd68-f3a3b82367d5)

After the change (1st stage):
![Screenshot from 2023-07-06 14-02-34](https://github.com/enso-org/enso/assets/292128/d7a7bc34-39dc-46f1-9e64-6d350697c30b)

After the change (2nd, asynchronous initialization, stage):
![Screenshot from 2023-07-06 14-21-17](https://github.com/enso-org/enso/assets/292128/def8c0a1-f211-4fc0-9df0-7c1634312166)
2023-07-07 11:49:23 +00:00
GregoryTravis
bd26e95fd6
Add Table.replace; Change Text.replace to take a Text|Pattern, and remove the use_regex param. (#7223) 2023-07-06 16:13:11 +00:00
James Dunkerley
7749286c69
Tidy up the imports using script (#7220)
Ordering the imports to test a script.
2023-07-06 14:22:50 +00:00
Dmitry Bushev
e7a0312298
Reload externally changed file on a keypress (#7217)
part of #7178

Changelog:
- add: `cmd+alt+y` keybinding that re-opens the file, applies new content, and re-executes the program

This is the first part of the task to support the external edits. The next step will be to reload the module contents by the notification from the language server.

# Important Notes
https://github.com/enso-org/enso/assets/357683/79917e22-b846-4bd9-b03a-33a48d5f75b9
2023-07-06 13:27:47 +00:00
Adam Obuchowicz
70f79b1df4
Fix mouse hover events. (#7177)
* Special noncapturable-nonbubbleable events

* A prototype of hover handling

* Revert "Special noncapturable-nonbubbleable events"

This reverts commit abdc0cf7eff9aba44656d959f6736250c69bf206.

* Make it consistent with docs

* Update app/gui/view/graph-editor/src/component/node/output/port.rs

Co-authored-by: Kaz Wesley <kaz@lambdaverse.org>

* Optimize a bit

* Extends docs

---------

Co-authored-by: Kaz Wesley <kaz@lambdaverse.org>
2023-07-06 15:00:25 +02:00
somebody1234
c276bc035c
Enable React and strict-boolean-expressions lints (#7023)
* QoL improvements

* Enable react lints and `strict-boolean-expressions`

* Address review

* Minor bugfixes

---------

Co-authored-by: Paweł Buchowski <pawel.buchowski@enso.org>
2023-07-06 13:52:32 +02:00
Paweł Grabarz
d11f09c192
add support for bidirectional rectangle border and inset (#7188)
Extend rectangle shape to allow for both inner and outer borders, at any distance from the main shape body.

No additional instance parameters has been added. Instead, the negative values of both border and inset values are used to allow extra capabilities. Additionally, the small (<1px) gap between border and body caused by anti-aliasing has been fixed.

https://github.com/enso-org/enso/assets/919491/0ae709f2-db7b-4a45-a9d3-7fbb8802dc8c


<img width="657" alt="image" src="https://github.com/enso-org/enso/assets/919491/40e5963d-0717-4662-abf4-b9687aa921ed">
2023-07-05 19:10:57 +00:00
GregoryTravis
6eb46afb40
Do not rename column on fill_nothing and add version to the Table allowing filling multiple (include fill_empty as well). (#7166)
Updated Column.fill_nothing and .fill_empty, and added the same to Table. (Both in-memory and db.)
2023-07-05 17:20:23 +00:00
Michael Mauderer
cd7f17a0e4
Remove connections for a node that is being deleted. (#7185)
Fixes https://github.com/enso-org/enso/issues/7135

https://github.com/enso-org/enso/assets/1428930/85433a69-03dc-4ad9-9563-717a78ff6ff8
2023-07-05 15:28:20 +00:00
Radosław Waśko
78545b4402
Add safepoints to standard libraries Java polyglot helpers (#7183)
Closes #7129
2023-07-05 14:12:13 +00:00
GregoryTravis
966f8b773a
Combine Regex and Pattern (#7172)
Merge Pattern into Regex.
2023-07-05 13:51:53 +00:00
Hubert Plociniczak
72a6c54dfc
Update context on timeout retry (#7207)
Minor follow up on #7173. Noticed while testing nightly on Windows machine.
2023-07-05 12:22:55 +00:00
Hubert Plociniczak
a140a04689
A dataflow error with warnings reports the former (#7205)
A dataflow error resulting from calling a value with warnings now
reports only the error rather than the warning.

Closes #7141.
2023-07-05 14:18:36 +02:00
Radosław Waśko
2d73277238
Fix a bug that somehow went under CI (#7204) 2023-07-05 08:54:27 +00:00
somebody1234
b243a5f529
Support signing up to an existing organization (#7145)
* wip

* wip. includes broken code

* Pass organization id when user is created

* Make backend endpoints properly error

The "set username" screen currently returns 500 server error
2023-07-04 11:13:53 +02:00
somebody1234
80f370c3a9
Fix dashboard React errors (#7128)
* Fix dashboard React errors

* Stop trying to load Project Manager on cloud dashboard
2023-07-04 10:34:13 +02:00