Commit Graph

658 Commits

Author SHA1 Message Date
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