Commit Graph

4308 Commits

Author SHA1 Message Date
Jaroslav Tulach
ad2f5b031e
Chained if_then_else application change (#8671)
* Test describing the current behavior of chained if then else application

* Chained block should behave just like Group around if_then_else

* Finishing line on BlockStart fixes if_then_else_chained_block

* Only finish the line when there was not start of a macro segment

* Fix tests

* Refine else-body with macro patterns.

* Update test syntax to maintain original semantics

* Few additional tests

---------

Co-authored-by: Kaz Wesley <kaz@lambdaverse.org>
2024-02-22 09:17:25 -05:00
Pavel Marek
21e1284086
Enso tests can be run with filter from cmdline (#9065)
Simplify the `Test.Suite.run_with_filter` to accept a single filter parameter that searches for all the groups and specs that matches that filter. This filter can be a simple text provided from the command line.

# Important Notes
- Pending groups are now printed at the end of the run
- `Test.Suite.run_with_filter` is simplified to accept a single filter parameter that is either `Text` or `Nothing`. See the docs.
- Passing a filter from the command line is therefore straightforward, it is treated as a regex.
- For convenience, I have left all the `main` methods in all the test sources. I have just refactored them to accept the `filter` argument from the command line.
- For example, to run only a single spec from `Vector_Spec.enso`, invoke `enso --run test/Base_Tests/src/Data/Vector_Spec.enso "should allow vector creation with a programmatic constructor"`
- **Majority of the PR is a regex replace** of `^main =` for `main filter=Nothing =` and of `suite.run_with_filter` for `suite.run_with_filter filter`.
- **Fixed some internal engine bugs:**
- `AtomWithHole` allows to specify only one hole - https://github.com/enso-org/enso/pull/9065/files#diff-0f7bb7e85cf86a965de133aa7e6b5958ceb889bd1921c01e00d3a9ceb19626ef
- NaN keys in hash maps are handled in polyglot maps as well - c5257f6c2b78f893214ff67300893b593ea05e21..db4b3c0e9828ee79208d52e02586b24bb845b0d6
2024-02-22 12:31:44 +00:00
James Dunkerley
e50ded8b24
Rename new_name to as on Aggregate_Column. (#9135)
Small tweak renaming a property.
![image](https://github.com/enso-org/enso/assets/4699705/21f4ca29-2219-412b-a650-c900360f9dea)
2024-02-22 10:34:00 +00:00
Hubert Plociniczak
0133e9ef4f
Drop inefficient SemVer implementation (#9089)
`Bump` library uses parser combinators behind the scenes which are known to be good at expressing grammars but are not performance-oriented.

This change ditches the dependency in favour of an existing Java implementation. `jsemver` implements the full specification, which is probably an overkill in our case, but proved to be an almost drop-in replacement for the previous library.

Closes #8692

# Important Notes
Peformance improvements:
- roughly 50ms compared to the previous approach (from 80ms to 20-40ms)

I don't see any time spent in the new implementation during startup so it could be potentially aggressively inlined.
Further more, we could use a facade and offer our own strip down version of semver.
2024-02-22 09:59:09 +00:00
Radosław Waśko
d845e709a1
Refactor S3 path handling (#9092)
- Closes #9021
2024-02-22 09:15:34 +00:00
James Dunkerley
fa6fccb99e
Refactoring Table.set for GUI2 and other GUI fixes (#9128)
- Added `regex` function to `Standard.Base` as a way to easily and cleanly make regular expressions.
- Added `expr` and `Expression.Value` to distinguish expressions from text values.
- Fixed issues with `Table.join` widget so dropdown exists.
- Needed fully qualified name.
- Added default empty text values for right column to provided text input boxes.
- Deprecate `Table.filter_by_expression` and allow `Table.filter` to take an `Expression`.
- Added `Simple_Expression` and deprecated `Column_Operation`. Changes the order so takes a column then a calculation.
- Rename `column` to `value` and `new_name` to `as` on `Table.set`.
- Rename `name_column` to `names` on `Table.cross_tab`.
- Removed `Column_Ref.Expression` in favour of using `Expression.Value`.
2024-02-21 23:51:41 +00:00
Kaz Wesley
323d46ec4e
Add property test for textChangeToEdits and applyTextEdits. (#9131)
Add a test for some functionality introduced in #9055.
2024-02-21 21:48:37 +00:00
Kaz Wesley
fdec1d0671
Self-arrows: Distinguish self arguments (#9116)
Distinguish self arguments; render edges to them as arrows, and use icons for their widgets.
2024-02-21 08:40:08 -08:00
Jaroslav Tulach
2a42388905
Including missing Polyglot_Spec in all the tests (#9126) 2024-02-21 16:16:00 +01:00
Kaz Wesley
01fc65eec5
Self-argument arrows: New edge rendering mode (#9099)
Self-argument arrow rendering
2024-02-21 09:43:22 -05:00
somebody1234
c60d1ba36d
Fix bug in map visualization (#9119)
- Fix a bug where longitude was used as both latitude and longitude, due to a typo....

# Important Notes
- As our Mapbox token is no longer valid, the map visualization no longer works, even with this fix. As a result, this cannot be tested properly.
- However, this can still be tested somewhat, by seeing that the error is no longer present in the repro:
- Open the `Colorado COVID` template
- Open the viz on this node (at the bottom right of graph. it may help to zoom out using Ctrl+Shift+A.):
![image](https://github.com/enso-org/enso/assets/4046547/54849e5f-8a53-4f5b-8bdf-f08fe8ca51f0)
- Compare the errors logged in the console between `develop`, and this branch. This branch should not have the error about `lat` (latitude) being out of range.
2024-02-21 12:21:20 +00:00
Michael Mauderer
6c4c791d87
Display warnings on components (#9108)
Closes #8678

[Peek 2024-02-20 12-45.webm](https://github.com/enso-org/enso/assets/1428930/6bb6c4ad-5507-4b11-b2c9-b295bf10c745)
2024-02-21 11:40:07 +00:00
Pavel Marek
9daca288f4
Java and Graal versions are checked before the build starts (#9106)
Add checks of Java and GraalVM versions before the `sbt` project is fully loaded. This ensures that all the devs have exactly the version specified in our `build.sbt`.

# Important Notes
Trying to start `sbt` with a different java versions now results in:

```
$ java -version
openjdk version "21" 2023-09-19
OpenJDK Runtime Environment GraalVM CE 21+35.1 (build 21+35-jvmci-23.1-b15)
OpenJDK 64-Bit Server VM GraalVM CE 21+35.1 (build 21+35-jvmci-23.1-b15, mixed mode, sharing)
$ sbt
[info] welcome to sbt 1.9.7 (GraalVM Community Java 21)
[info] loading settings for project enso-build from plugins.sbt ...
[info] loading project definition from /home/pavel/dev/enso/project
[info] loading settings for project enso from build.sbt ...
[info] resolving key references (65272 settings) ...
[info] set current project to enso (in build file:/home/pavel/dev/enso/)
[error] Running on GraalVM version 21. Expected GraalVM version 21.0.2.
[error] Total time: 0 s, completed Feb 20, 2024, 1:06:18 PM
[warn] Project loading failed: (r)etry, (q)uit, (l)ast, or (i)gnore? (default: r)
```

```
$ java -version
openjdk version "17.0.10" 2024-01-16
OpenJDK Runtime Environment JBR-17.0.10+1-1087.17-jcef (build 17.0.10+1-b1087.17)
OpenJDK 64-Bit Server VM JBR-17.0.10+1-1087.17-jcef (build 17.0.10+1-b1087.17, mixed mode)
$ sbt
[info] welcome to sbt 1.9.7 (JetBrains s.r.o. Java 17.0.10)
[info] loading settings for project enso-build from plugins.sbt ...
[info] loading project definition from /home/pavel/dev/enso/project
[info] compiling 44 Scala sources to /home/pavel/dev/enso/project/target/scala-2.12/sbt-1.0/classes ...
[info] loading settings for project enso from build.sbt ...
[info] resolving key references (65272 settings) ...
[info] set current project to enso (in build file:/home/pavel/dev/enso/)
[warn] Running on non-GraalVM JVM (The actual java.vendor is JetBrains s.r.o.). Expected GraalVM Community java.vendor.
[error] Running on Java version 17. Expected Java version 21.
[error] Total time: 0 s, completed Feb 20, 2024, 1:07:40 PM
[warn] Project loading failed: (r)etry, (q)uit, (l)ast, or (i)gnore? (default: r)
```
2024-02-21 10:33:32 +00:00
Paweł Grabarz
d415d133bb
Fix node edits (#9111)
* Prevent duplication of external IDs in syncTree

* trim component browser accepted value

* use flush post for visualization data watcher

* do not create empty nodes when closing component browser

* Lint

---------

Co-authored-by: Kaz <kaz@lambdaverse.org>
2024-02-20 16:40:50 -05:00
Michał Wawrzyniec Urbańczyk
11a9e8d044
CI: Release links the new IDE (#9110)
This tweaks the release template to link to the new IDE builds.
2024-02-20 19:15:25 +00:00
Michael Mauderer
e264189f6a
New ... menu in the top bar with zoom controls (#9073)
Closes #8614

https://github.com/enso-org/enso/assets/1428930/8b5b47e4-5ce5-4bf0-a42f-0b6c3d7d9323
2024-02-20 15:44:49 +00:00
mwu
3a2ca2ae0f we don't need to hardcode version numbers probably 2024-02-20 16:32:04 +01:00
Jaroslav Tulach
462c96805b
Avoid excessive logging during development (#9101) 2024-02-20 13:49:54 +01:00
AdRiley
6eb3601e49
Rename node to component (#9102)
For our users "Nodes" are called "Components". Which the users selects using the component browser. This MR just sets the text in the default workflow.
2024-02-20 10:19:59 +00:00
AdRiley
4cbdc9dfb6
Remove table aliases (#9098)
Now Table and DB_Table have different names we can remove a lot of aliases. This closes #8981
2024-02-20 01:03:57 +00:00
Kaz Wesley
c811a5ae8b
Enable the Code Editor, with new apply-text-edits algo. (#9055)
- Fix the UI problems with our CodeMirror integration (Fixed view stability; Fixed a focus bug; Fixed errors caused by diagnostics range exceptions; Fixed linter invalidation--see https://discuss.codemirror.net/t/problem-trying-to-force-linting/5823; Implemented edit-coalescing for performance).
- Introduce an algorithm for applying text edits to an AST. Compared to the GUI1 approach, the new algorithm supports deeper identity-stability for expressions (which is important for subexpression metadata and Y.Js sync), as well as reordered-subtree identification.
- Enable the code editor.
2024-02-19 23:57:42 +00:00
Kaz Wesley
d75523b46f
Render target attachment bit as part of port. (#9068)
Fixes one issue from #8139.

Before:
![image](https://github.com/enso-org/enso/assets/1047859/1db71cda-7f9e-4d15-ac0f-14cb3c0b7c09)

After:
![image](https://github.com/enso-org/enso/assets/1047859/c5aafc56-d81d-447e-b725-fcb2e30b3c4e)
2024-02-19 20:02:29 +00:00
Radosław Waśko
167a91dab1
Updating Enso Cloud integration - cheaper Enso_Secret.create, introducing Enso_File.creation_time and last_modified_time (#9085)
- Closes #9047
2024-02-19 18:53:20 +00:00
AdRiley
27ec236c19
rename database Table to DB_Table (#9067)
Rename database.Table to database.DB_Table to avoid name collisions as part of https://github.com/enso-org/enso/issues/8981
2024-02-19 17:31:58 +00:00
James Dunkerley
ee66b9fb1d
Refactoring the Unary operations so uncoupled from Storage. (#9090)
In order to allow clever masking, slicing, filtering and arrow backing stores...

- Adding ColumnStorage interface with the base API a storage will need.
- Refactored each of the unary operations to a new `UnaryOperation` interface which makes them responsible for deciding if they can be executed.
2024-02-19 17:11:52 +00:00
Pavel Marek
96082c3bae
Remove akka from runtime (#8953)
There are two projects transitively required by `runtime`, that have akka dependencies:
- `downloader`
- `connected-lock-manager`

This PR replaces the `akka-http` dependency in `downloader` by HttpClient from JDK, and splits `connected-lock-manager` into two projects such that there are no akka classes in `runtime.jar`.

# Important Notes
- Simplify the `downloader` project - remove akka.
- Add HTTP tests to the `downloader` project that uses our `http-test-helper` that is normally used for stdlib tests.
- It required few tweaks so that we can embed that server in a unit test.
- Split `connected-lock-manager` project into two projects - remove akka from `runtime`.
- **Native image build fixes and quality of life improvements:**
- Output of `native-image` is captured 743e167aa4
- The output will no longer be intertwined with the output from other commands on the CI.
- Arguments to the `native-image` are passed via an argument file, not via command line - ba0a69de6e
- This resolves an issue on Windows with "Command line too long", for example in https://github.com/enso-org/enso/actions/runs/7934447148/job/21665456738?pr=8953#step:8:2269
2024-02-19 16:39:05 +00:00
Jaroslav Tulach
a664dd9d56
Equality with conversions (#9070) 2024-02-19 17:18:56 +01:00
Kaz Wesley
760afbc7f4
Render unconnected edges above nodes. (#9069)
Fixes one issue from #8139.

Before:
![image](https://github.com/enso-org/enso/assets/1047859/b6d05734-f186-4213-b943-81fd868cf565)

After:
![image](https://github.com/enso-org/enso/assets/1047859/4e42907f-8579-4869-99a3-74aac920e65b)
2024-02-19 15:12:15 +00:00
Jaroslav Tulach
f1d4e546d5
Upgrading to GraalVM 21.0.2 (#8883)
Upgrades to latest GraalVM 21.0.2
2024-02-19 12:08:59 +00:00
Radosław Waśko
cf71a05c3b
Refactor common context handling pattern (#9087) 2024-02-19 11:59:42 +00:00
somebody1234
50d5f32570
Fix dashboard tests (#9050)
Fixes issues that were causing CI to fail.

# Important Notes
None
2024-02-19 11:47:48 +00:00
Dmitry Bushev
a25d716932
Keep single execute expression job in the queue (#9077)
close #8965

Changelog:
- update: keep a single `ExecuteExpressionJob` in the queue
- update: make `ExecuteExpressionCommand` synchronous to preserve the order of commands
- refactor: separate data structures for `Visualization` and `OneshotExpression` to simplify the logic
2024-02-19 09:18:04 +00:00
Adam Obuchowicz
fddfa1150a
Fix for adding node in collapsed functions (#9060)
Fixes #9049

There were still some stubs left in node creation code.

# Important Notes
I haven't added any tests, as unit testing the graph store is very difficult - it has much tangled logic there. I'm going to try to untangle it a bit, but in a separate PR.
2024-02-19 09:14:46 +00:00
Michał Wawrzyniec Urbańczyk
2e06b4baa0
CI: disable sbt server autostart, but if it tries to start, force it (#9059) 2024-02-17 11:52:18 +01:00
Hubert Plociniczak
fe0f9046db
Introduce hash seed to invaldiate caches (#9082) 2024-02-16 23:43:30 +00:00
Radosław Waśko
642d5a691e
Implement copy_to and move_to for S3_File (#9054)
- Closes #8833
- Tests for copying between S3 and `Enso_File` will only be added once we implement Enso_File writing.
2024-02-16 10:42:28 +00:00
James Dunkerley
f2d2f73e89
Starting to refactor Storage and Operations (#9076)
Cleaning up some of the structures in Storage before working on UnaryOperations.

- Removed some legacy code: `countMask`, `Index` and `DefaultIndex`.
- Renamed `mask` to `applyFilter` on `Column` and `Storage`.
- Renamed `Table.mask` to `Table.filter`.
2024-02-15 18:21:07 +00:00
Hubert Plociniczak
d29c2cd66a
Serialize UUID for non-library modules (#9057)
Missing ID's in IR meant that instrumentation wouldn't be applied for loaded modules. This is the reason why after a restart engine wouldn't send **any** expression updates.

Closes #8689.

# Important Notes
After the change
[Kazam_screencast_00038.webm](https://github.com/enso-org/enso/assets/292128/4249287b-6c41-4c9d-b138-e7af59512566)

The video somehow doesn't show that all nodes are loaded after the restart, but once I moved the screen they are there. This appears to be a bug in the recording somehow.
2024-02-15 16:50:27 +00:00
Michael Mauderer
6746bdc148
Implement full wheel component menu (#9029)
Closes #8612.


[Peek 2024-02-12 14-11.webm](https://github.com/enso-org/enso/assets/1428930/504a0e17-9d75-46b2-b5e9-d23ec09d6613)

# Important Notes
The `...` menu was added at the top of the menu as there is less visual interference with an opened visualisation.
2024-02-15 14:01:38 +00:00
Hubert Plociniczak
5c624d21d7
Revert "Synchronize suggestions loading after the reconnect (#9043)" (#9072) 2024-02-15 13:39:56 +00:00
Michał Wawrzyniec Urbańczyk
06c8776099
CI: Fix macOS notarization (#9066) 2024-02-15 11:53:51 +01:00
Adam Obuchowicz
8489316d83
WidgetFunction: merge dynamic config for a call with inherited one (#9042)
Fixes #9008

Now, even if we inherit FunctionCall config from parent widget (e.g. drop down), we still ask for config of the current call and try to merge them (preferring the inherited parameters).
2024-02-14 23:05:45 +00:00
AdRiley
f4955815b2
Remove Column Aliases (#9056) 2024-02-14 19:06:29 +00:00
Kaz Wesley
cfe3d99da0
Fix Code Editor click (#9051)
Clearing the selection on mouseup breaks the CodeMirror integration. Adding this exception for contenteditable elements would fix it. Is this compatible with whatever this event handler is needed for?
2024-02-14 17:27:27 +00:00
Dmitry Bushev
702e6c1bb8
Set default timeouts in incremental updates test (#9053)
Fix random failures of `IncrementalUpdatesTest` on CI https://github.com/enso-org/enso/actions/runs/7885050954/job/21515333651#step:8:5274
2024-02-14 17:07:44 +00:00
James Dunkerley
08584b0423
Improving experience with format and parse. (#9045)
- Add format dropdown to `Number.format`.
![image](https://github.com/enso-org/enso/assets/4699705/8aa74910-c6ad-4480-a7f2-04dacd9686e8)

- Support case insensitive month names and abbreviations in dates.
https://github.com/enso-org/enso/assets/4699705/4dbd8755-e1c2-4207-a8a1-65b427ca4fab

- Improve locale dropdown for `parse_date` and `parse_date_time`.
![image](https://github.com/enso-org/enso/assets/4699705/5d605a2d-1248-46be-bc74-34a4afecf609)

- Added dropdown to `Table.parse` and amended so now doesn't accept `Nothing` (using empty string instead).
![image](https://github.com/enso-org/enso/assets/4699705/340dd093-77db-4685-a34b-45ce09e3c3b3)

- Added dropdown to `Table.format` and amended so now doesn't accept `Nothing` (using empty string instead).

- Altered `Column.parse` to not accept `Nothing` and added drop down for format.
- Altered `Column.format` to not accept `Nothing` and added drop down for format conditional on type.
- Improved the locale date/time format drop to have the suggested formats too.
2024-02-14 16:30:37 +00:00
Radosław Waśko
d45f0fe4df
Check type of self in static dispatch (#8867)
- Fixes #8805
- also btw. fixes #8706
2024-02-14 15:50:13 +00:00
Adam Obuchowicz
ee381369b0
Remove vite-plugin-top-level-await plugin (#9038)
We've used the vite-plugin-top-level-await to support top level await. But most of them were removed anyway, because the ide-desktop/lib/client is bundled as CJS and use some of gui2 code. And the plugin [is causing problems](https://github.com/Menci/vite-plugin-top-level-await/issues/25), [also in our CI](https://github.com/enso-org/enso/actions/runs/7842841953/job/21402194728?pr=9013#step:8:458)
2024-02-14 09:42:37 +00:00
AdRiley
5c7947ce60
Rename database column to DB_Column (#9046)
Rename database column to DB_Column to avoid name collisions as part of https://github.com/enso-org/enso/issues/8981
2024-02-14 09:11:52 +00:00
Dmitry Bushev
6efa26b48e
Add support for positionalArgumentsExpressions of text visualizations (#9052)
close #9028

Changelog:
- add: support `positionalArgumentsExpressions` parameter for visualization expressions represented as strings
- add: language server API tests
- add: runtime visualization tests

# Important Notes
https://github.com/enso-org/enso/assets/357683/4e6f207b-ed64-41b9-b94b-96fb9db63ce4
2024-02-13 23:08:30 +00:00