Commit Graph

4389 Commits

Author SHA1 Message Date
Radosław Waśko
fc557f8fd2
Improve handling of File.parent and File.name (#9642)
- Closes #8906
2024-04-08 22:41:38 +00:00
GregoryTravis
ae91c5eee1
Decimal.abs, .negate, .signum (#9641) 2024-04-08 16:40:27 +00:00
Pavel Marek
7850312340
Do not disable BackgroundCompilation in benchmarks (#9646)
* Do not disable BackgroundCompilation in benchmarks

* Increase warmup for Table sorting benchmarks.

#9470
2024-04-08 16:49:57 +02:00
Dmitry Bushev
1c4a927701
Use autoscoping when constructing tag values of suggestion arguments (#9293) 2024-04-08 12:39:49 +01:00
Ilya Bogdanov
8aef2146db
Use predefined zoom levels (#9585)
Fixes one subtask of #9354

https://github.com/enso-org/enso/assets/6566674/3418d31e-2d80-48b2-ba8b-9e000b09cf14
2024-04-08 11:12:53 +00:00
Ilya Bogdanov
e174dee1bf
Fix documentation panel layout (#9615)
Fixes #9414

`.argument` class was not scoped and broke documentation panel.


<img width="439" alt="Screenshot 2024-04-03 at 3 06 43 PM" src="https://github.com/enso-org/enso/assets/6566674/fe94a668-8125-452c-b038-196e5a10657c">
2024-04-08 11:06:00 +00:00
Dmitry Bushev
ab552ab677
GUI project does not receive suggestion database (#9634)
close #9558

the `InvalidateModulesIndexCommand` may be waiting for the execution lock, while the handler times out.
2024-04-08 08:59:03 +00:00
somebody1234
07793f576b
Fix reloading when the saved project uses the Local Backend (#9627)
- Fix https://github.com/enso-org/cloud-v2/issues/1156
- Fix reloading when the saved project uses the Local Backend

# Important Notes
To reproduce the error:
- Open a project in the Local Backend
- Close and reopen the IDE, or refresh the IDE.
2024-04-08 04:37:52 +00:00
Sergei Garin
c182b303e4
Update organization body param location -> address (#9628)
- Fix https://github.com/enso-org/cloud-v2/issues/1152
2024-04-08 03:52:08 +00:00
somebody1234
0feb987930
Normalize windows paths (#9618)
- Fix #9619
- Fix issue causing the full path to be shown on Windows.

Additional changes:
- Add `npm run watch:windows` script to `lib/client` for developing on Electron.

# Important Notes
Testing instructions:
- Should ideally be tested on Windows. All the following should work:
- Creating, opening and deleting top-level projects
- Creating folders
- Creating, opening and deleting nested projects
- Uploading and deleting top level and nested files
- Moving folders, files and projects
2024-04-08 02:20:28 +00:00
Kaz Wesley
5f464389bc
Hide errors from input nodes (#9633)
When a node has an error/warning/panic that exactly matches one of its input nodes, hide the message until the node is interacted with, showing an icon.

https://github.com/enso-org/enso/assets/1047859/4b1b5e3d-c236-40d7-a3e7-e6ab8182ecd5

# Important Notes
- New icon is used for panics.
- Opening circular menu now shifts any message out of the way, not just warnings.
2024-04-05 18:07:32 +00:00
somebody1234
143665d944
Remove obsolete GUI arguments (#9466)
- Close #8610

# Important Notes
QA notes:
- The GUI2 warning screen should not show up - the arguments that GUI2 do not understand have been removed.
- However, it should be tested that the warnings screen should correctly work when invalid arguments really *are* passed in:
- Via URL query parameters (electron, might need to open the electron app then the browser, *or* do `location.href = ` in DevTools in Electron.)
- By editing `Editor.tsx` to inject invalid args to the big configuration object we pass to the GUI entrypoint.
2024-04-05 16:20:56 +00:00
GregoryTravis
6e1295379a
tests for floating point mod (#9636) 2024-04-05 09:52:55 -04:00
somebody1234
9cf4847a34
Keyboard navigation between components (#9499)
- Close https://github.com/enso-org/cloud-v2/issues/982
- Add keyboard navigation via arrows between different components
- This is achieved by a `Navigator2D` class which keeps track of the closest adjacent elements.

Other changes:
- Switch much of the codebase to use `react-aria-components`
- This *should* (but does not necessarily) give us improved accessibility for free.
- Refactor various common styles into styled components
- `FocusArea` to perform automatic registration with `Navigator2D`
- `Button` and `UnstyledButton` to let buttons participate in keyboard navigation
- `HorizontalMenuBar` - used for buttons below the titles in the Drive page, Keyboard Shortcuts settings page, and Members List settings page
- `SettingsPage` in the settings pages
- `SettingsSection` in the settings page to wrap around `FocusArea` and the heading for each section
- Add debugging utilities
- Add debugging when `body` has the `data-debug` attribute: `document.body.dataset.debug = ''`
- This adds rings around elements (all with different colors):
- That are `FocusArea`s. `FocusArea` is a wrapper component that makes an element participate in `Navigator2D`.
- That are `:focus`ed, and that are `:focus-visible`
- That are `.focus-child`. This is because keyboard navigation via arrows ***ignores*** all focusable elements that are not `.focus-child`.
- Debug `Navigator2D` neighbors when `body` has the `debug-navigator2d` attribute: `document.body.dataset.debugNavigator2d = ''`
- This highlights neighbors of the currently focused element. This is a separate debug option because computing neighbors is potentially quite expensive.

# Important Notes
- ⚠️ Modals and the authentication flow are not yet fully tested.
- Up+Down to navigate through suggestions has been disabled to improve UX when accidentally navigating upwards to the assets search bar.
- There are a number of *known* issues with keyboard navigation. For the most part it's because a proper solution will be quite difficult.
- Focus is lost when a column (from the extra columns selector) is toggled - because the button stops existing
- It's not possible to navigate to the icons on the assets table - so it's current not possible to *hide* columns via the keyboard
- Neighbors of the extra columns selector are not ideal (both when it is being navigated from, and when it is being navigated to)
- The suggestions in the `AssetSearchBar` aren't *quite* fully integrated with arrow keyboard navigation.
- This is *semi*-intentional. I think it makes a lot more sense to integrate them in, *however* it stays like this for now largely because I think pressing `ArrowUp` then `ArrowDown` from the assets table should return to the assets table
- Likewise for the assets table. The reason here, however, is because we want multi-select. While `react-aria-components` has lists which support multi-select, it doesn't allow programmatic focus control, making it not particularly ideal, as we want to focus the topmost element when navigating in from above.
- Clicking on the "New Folder" icon (and the like) do not focus on the newly created child. This one should be pretty easy to do, but I'm not sure whether it's the right thing to do.
2024-04-05 07:21:02 +00:00
GregoryTravis
973d2c6aea
Decimal arithmetic benchmarks (#9582) 2024-04-04 16:03:35 +00:00
GregoryTravis
c100a88ec3
Make the% consistent across both Integer sizes. (#9589) 2024-04-04 15:27:51 +00:00
Hubert Plociniczak
a82a429127
Improve perf of Graph.Scope.scopeFor hotspot (#9620)
`scopeFor` appears to be a hotspot of the compiler. By choosing a more suitable data structure that indexes on the occurrence's id we seem to gain about 25% on some benchmarks. Quick win.

Related to #9235.

# Important Notes
Local benchmark runs of `org.enso.compiler.benchmarks.module.ManyLocalVarsBenchmark.longMethodWithLotOfLocalVars
`
Before
```
[info] # Warmup Iteration   1: 61.638 ms/op
[info] # Warmup Iteration   2: 49.224 ms/op
[info] # Warmup Iteration   3: 47.341 ms/op
[info] # Warmup Iteration   4: 46.946 ms/op
[info] # Warmup Iteration   5: 46.901 ms/op
[info] # Warmup Iteration   6: 49.536 ms/op
[info] Iteration   1: 50.438 ms/op
[info] Iteration   2: 47.326 ms/op
[info] Iteration   3: 46.917 ms/op
[info] Iteration   4: 45.824 ms/op
```

After
```
[info] # Warmup Iteration   1: 86.493 ms/op
[info] # Warmup Iteration   2: 36.084 ms/op
[info] # Warmup Iteration   3: 32.588 ms/op
[info] # Warmup Iteration   4: 33.895 ms/op
[info] # Warmup Iteration   5: 31.986 ms/op
[info] # Warmup Iteration   6: 31.236 ms/op
[info] Iteration   1: 31.258 ms/op
[info] Iteration   2: 31.673 ms/op
[info] Iteration   3: 30.931 ms/op
[info] Iteration   4: 30.902 ms/op
```
2024-04-04 15:26:06 +00:00
Jaroslav Tulach
d9c7bf4138
Testing autoscoped constructors in a vector (#9630) 2024-04-04 17:13:33 +02:00
Michał Wawrzyniec Urbańczyk
2270005539
[CI] Adding assets.json file to the releases. (#9564)
This PR adds a new file to the release: `assets.json`, that offers information about the assets available in the release.

The purpose is to have one persistent link `https://github.com/enso-org/enso/releases/latest/download/assets.json` that has the current download links that can be consumed by the website.

Also, the release template has been updated to use the same assets information source, rather than duplicate the information about artifact names.

Additionally, additional step for release validation was added, so the CI can alert if one of the expected assets is missing.
2024-04-04 14:51:10 +00:00
Paweł Grabarz
9c2d25ea8d
Improve gui app disposal handling and close all network connections (#9579)
Fixes #8964

All GUI network connections are now closed after the application is unmounted.
2024-04-04 13:49:54 +00:00
GregoryTravis
67b5745806
Add range info to Out_Of_Range error (#9586) 2024-04-04 12:25:45 +00:00
Hubert Plociniczak
fdeaf31dd1
Follow up #9611 (#9629) 2024-04-04 11:27:51 +00:00
somebody1234
256b5b3068
Hide secret values by default (#9631)
- Hide secret values by default using `input type="password"`. They can be shown and hidden using the eye icon, just like regular password inputs.

# Important Notes
None
2024-04-04 11:03:53 +00:00
Michał Wawrzyniec Urbańczyk
50385821a2
[CI] Moved Oracle GraalVM checks to a new nightly checks workflow. (#9580)
This PR introduces [a new workflow — nightly checks](https://github.com/enso-org/enso/actions/workflows/nightly-tests.yml). It consists of the whole array of Backend checks:
* build check, Scala tests and Standard Library tests;
* covers both Community and Oracle (Enterprise) GraalVM editions (Linux-only);
* includes checks for Aarch64 macOS runner.

We do not want to run these checks on each PR due to limited runners capacity. By running them nightly, we can still catch any issues that might arise on `develop` branch.

# Important Notes
* [ ] Before merging, this requires updating the GH required checks list.
2024-04-03 21:59:37 +00:00
GregoryTravis
4971907914
Remove pending tests for hash consistency. (#9588) 2024-04-03 17:47:46 +00:00
Ilya Bogdanov
a474955e28
Fix dropdown item paddings (#9616)
Fixes a small issue with dropdown item alignment.

<img width="243" alt="Screenshot 2024-04-03 at 4 55 12 PM" src="https://github.com/enso-org/enso/assets/6566674/96803537-bc30-456c-b694-5fd7c70e21db">
2024-04-03 13:35:13 +00:00
Hubert Plociniczak
59379eaa4f
Manage analytics client to avoid leaks (#9611)
This change makes sure to close the Google Analytics client after usage. This will a) ensure that resources are released properly b) potentially fix the exception that is causing problems on some platforms

# Important Notes
After this change I no longer see in **my** logs:
```
io.grpc.internal.ManagedChannelOrphanWrapper$ManagedChannelReference cleanQueue
SEVERE: *~*~*~ Previous channel ManagedChannelImpl{logId=1, target=analyticsdata.googleapis.com:443} was not shutdown properly!!! ~*~*~*
Make sure to call shutdown()/shutdownNow() and wait until awaitTermination() returns true.
java.lang.RuntimeException: ManagedChannel allocation site
at io.grpc.internal.ManagedChannelOrphanWrapper$ManagedChannelReference.<init>(ManagedChannelOrphanWrapper.java:102)
at io.grpc.internal.ManagedChannelOrphanWrapper.<init>(ManagedChannelOrphanWrapper.java:60)
at io.grpc.internal.ManagedChannelOrphanWrapper.<init>(ManagedChannelOrphanWrapper.java:51)
at io.grpc.internal.ManagedChannelImplBuilder.build(ManagedChannelImplBuilder.java:668)
at io.grpc.ForwardingChannelBuilder2.build(ForwardingChannelBuilder2.java:260)
at com.google.api.gax.grpc.InstantiatingGrpcChannelProvider.createSingleChannel(InstantiatingGrpcChannelProvider.java:436)
at com.google.api.gax.grpc.ChannelPool.<init>(ChannelPool.java:107)
at com.google.api.gax.grpc.ChannelPool.create(ChannelPool.java:85)
at com.google.api.gax.grpc.InstantiatingGrpcChannelProvider.createChannel(InstantiatingGrpcChannelProvider.java:243)
at com.google.api.gax.grpc.InstantiatingGrpcChannelProvider.getTransportChannel(InstantiatingGrpcChannelProvider.java:237)
at com.google.api.gax.rpc.ClientContext.create(ClientContext.java:226)
at com.google.analytics.data.v1beta.stub.GrpcBetaAnalyticsDataStub.create(GrpcBetaAnalyticsDataStub.java:217)
at com.google.analytics.data.v1beta.stub.BetaAnalyticsDataStubSettings.createStub(BetaAnalyticsDataStubSettings.java:288)
at com.google.analytics.data.v1beta.BetaAnalyticsDataClient.<init>(BetaAnalyticsDataClient.java:376)
at com.google.analytics.data.v1beta.BetaAnalyticsDataClient.create(BetaAnalyticsDataClient.java:358)
at org.graalvm.truffle/com.oracle.truffle.host.HostMethodDesc$SingleMethod$MHBase.invokeHandle(HostMethodDesc.java:371)
```
It's important because apparently that's where it would get stuck when trying to log that message.
2024-04-03 13:33:58 +00:00
Ilya Bogdanov
44097508c7
Make color override stable (#9612)
Fixes #9610

I was wondering why we need this check, now I know.
2024-04-03 13:01:36 +00:00
Jaroslav Tulach
f8a546e85f
Instrumentation, visualization and autoscoped constructors (#9452)
So far reproduces and later will fix #9381.
2024-04-03 12:14:23 +00:00
Michał Wawrzyniec Urbańczyk
96d17d2f3f
Bump clap to v4 (#9595)
Now that the clap has fixed [issue](https://github.com/clap-rs/clap/issues/5407) that blocked us, we can bump it across all our crates.

Fixes #5168.
2024-04-03 11:32:03 +00:00
Paweł Grabarz
ef79474a74
Fix reported content-length in project manager shim. (#9604)
Fixes dashboard errors that prevented the project list from loading when using node shim implementation of project listing commands, such as:
```
Could not list root folder.: Unterminated string in JSON at position 10021 (line 1 column 10022)
```

The issue was caused by a cut-off JSON response, due to incorrect calculation of encoded response byte length.
2024-04-03 09:24:40 +00:00
Jaroslav Tulach
dcccad9f7b
Removing useless methods (#9590) 2024-04-03 05:34:51 +02:00
Hubert Plociniczak
a83c75f8ec
Add missing API for Jackson_Object (#9591)
`Jackson_Object` supported parsing but not creating JSON from text. With this change, `Jackson_Object` is on par with `JS_Object` API and replaces the latter.

The most visible differences come from more detailed parsing exception's messages. Had to add some special cases for corner cases like `NaN` or infinity.

Closes #9473.
2024-04-02 20:45:35 +00:00
Ilya Bogdanov
c37fffe33d
Fix numeric input widget (#9602)
Fixes the issue with numeric input being unclickable if the WidgetSelection is present. The issue was caused by double handling of the click event both in numeric input (it opened the dropdown) and in dropdown (it closed itself).
2024-04-02 20:36:12 +00:00
Sergei Garin
06b416d499
Context menu should have a Edit Description on files (#9530)
Closes: enso-org/cloud-v2#1083

Tl;dr: This PR introduces a new menu entry that allows to open edit description dialog from context menu in dashboard. This supposed to work only in cloud.
When you right-click on an item in Cloud Drive, you can choose "Edit description" option to change the description of the selected item.


https://github.com/enso-org/enso/assets/61194245/53e949df-8a31-401c-ba48-52eddad468fa



Context:
See enso-org/cloud-v2#1083 . I decided to open a dialog insted of the sidebar because latter takes to much time and effort to make it properly.


This Change:



Added new variants for button component(submit & cancel), also - loading state.Added a new dialog that opens when you select "Edit description" in context menu.


Test Plan:

1. We shouldn't allow users to change the description for local files
2. Changes in the Dialog(after save) should reflect in sidebar(Description should update in sidebar)
3. Loading state/Errors should be displayed in dialog.
2024-04-02 16:02:13 +00:00
Paweł Grabarz
84c8535587
Allow vector widget only on vector expressions. (#9596)
Fixes #9593

<img width="426" alt="image" src="https://github.com/enso-org/enso/assets/919491/a794a023-420d-4358-8068-252d8d136a57">
2024-04-02 13:41:58 +00:00
Ilya Bogdanov
9db264231e
Fix project edits (#9594)
Fixes the issue that prevents project edits from being committed.
2024-04-02 12:33:14 +00:00
Hubert Plociniczak
ab5fe1757e
Fix expectations in lock manager test (#9592)
The test optimistically assumed that threads will mostly execute in order, while ignoring all other possibilities.
Changes the order of the report so that we remove the potential non-determinism.

As discovered in https://github.com/enso-org/enso/actions/runs/8516468592/job/23325541262?pr=9584#step:8:1530
2024-04-02 11:46:44 +00:00
Ilya Bogdanov
bef6f3a4f9
Color picker (#9570)
Closes #8680

The color picker is triggered by new Circular menu item or by keyboard shortcut (set to `Mod+Shift+C` for **C**olor).
The color picker affects *selected* nodes, so it works nicely both in cases when we use Circular menu on a single node a shortcut with multiple selected nodes.

Color is only changed when the user selects a new one inside the color picker, but there is no specific way to reset default color (you would have to recreate the node).

https://github.com/enso-org/enso/assets/6566674/a4497bea-f432-486d-85f8-f2772ba5694f
2024-04-02 11:27:13 +00:00
somebody1234
4c7c20ad08
Send credentials on open_project (#9468)
- Close https://github.com/enso-org/cloud-v2/issues/1038
- Send credentials for libs to use, when opening projects against the Cloud (Remote) backend.

# Important Notes
None
2024-04-02 06:47:35 +00:00
Jaroslav Tulach
11e1e9efa0
Don't let the non-Enso types float around the Enso interpreter! (#9584) 2024-04-02 06:22:19 +02:00
Ilya Bogdanov
084f4ee033
Fix numeric widget slider (#9578)
Fixes #9574


https://github.com/enso-org/enso/assets/6566674/ac9c381f-b62f-43cf-8ad9-a71c75c9fbc3
2024-04-01 20:16:57 +00:00
somebody1234
5416462c3c
Fix dateTime.test.ts (#9587)
Fix an issue caused by `dateTime` tests not taking daylight savings into account.

# Important Notes
None
2024-04-01 19:15:49 +00:00
somebody1234
3c5e15bbbd
Prevent context menus from going off the left side of the screen (#9567)
- Occurs when right clicking near the left side of the screen.

# Important Notes
None
2024-04-01 09:05:49 +00:00
GregoryTravis
ff562cb454
Conversions from Decimal to Integer and Float. (#9462)
* wip

* wip

* Remove unnecessary conversion

* changelog

* also integer

* cleanup

* to_float inf

* review

* Using multiple simple if conditions

* review

* logging in conversions

* cleanup

* revert

* pending test

* truncation

* Use TypeOfNode instead of TypesLibrary in InvokeConversionNode

* combine cases

* rename typesLib

* String is not Enso type, return Text

---------

Co-authored-by: Jaroslav Tulach <jaroslav.tulach@enso.org>
2024-03-30 10:42:56 -04:00
Adam Obuchowicz
2384fe851d
Fix undoing node removal (#9561)
Fixes #9314

The node deletion does not remove AST node from the module, only unpin it from its parent; so undoing does not add this node, just modify it, and thus we weren't informed about metadata change.
2024-03-29 16:31:00 +00:00
Jaroslav Tulach
55dc7ecc84
Make sure import and FQN behave the same (#9539) 2024-03-29 16:34:52 +01:00
Pavel Marek
0b94493258
Equality does not swallow errors (#9560)
`42 == (Error.throw "foo")` now correctly returns an `Error` rather than False

# Important Notes
The error was in the wrong usage of the `org.enso.interpreter.dsl.AcceptsError` DSL annotation.
2024-03-29 04:11:16 +00:00
AdRiley
c725703f50
Add google analytics sample data (#9571)
* Stash

* Test

* Clean up
2024-03-28 20:49:49 +00:00
GregoryTravis
f80e3f3415
Decimal remainder, pow, div (#9566) 2024-03-28 20:20:29 +00:00