Commit Graph

2946 Commits

Author SHA1 Message Date
Radosław Waśko
d8b926922a
Improve Non_Unique_Primary_Key error, split file format detection into read/write, improve SQLite format detection (#6604)
Closes #6437
Related to #6410

- Add example duplicate row to `Non_Unique_Primary_Key`.
- Ensure `File.read` fails if the file does not exist, always.
- Ensure SQLite fails if file is empty or nonexistent or malformed.
- Split file format detection into read and write modes, so that the read mode can depend on actual file _contents_.
2023-05-09 17:15:44 +00:00
GregoryTravis
d6f7cea923
tokenize_to_columns or parse_to_columns results in a single column we shouldn't add the 1 (#6607)
When generating new column names in tokenize/split_to_columns, if there's only one new column, use the deleted input column name and don't add disambiguating integers after it.
2023-05-09 15:56:33 +00:00
Ilya Bogdanov
b0ce2a8d29
Fix node editing race condition (#6594)
Fixes #6411

The issue was quite popular `map2` instead of `all_with`. I also updated the code to use the modern `debounce` API instead of a hacky 0-millisecond timer.

The FRP of the project view is extremely complicated in this place, and similar race conditions can appear out of nowhere. We must consider refactoring the current implementation (everything connected to the CB).
2023-05-09 11:18:56 +00:00
GregoryTravis
4ba8409def
Add format to the in-memory Column (#6538)
Add format to the in-memory Column

# Important Notes
Also updates .format in date types.
Some rearrangement of date formatting builtins / Java libraries.
2023-05-09 08:47:40 +00:00
somebody1234
4e7f757f53
Fix dashboard issues (part 2) (#6511)
* Fix cloud-v2/#411

* Fix cloud-v2/#412

* Fix cloud-v2/#415

* Fix cloud-v2/#414

* Run prettier

* Fix cloud-v2/#417

---------

Co-authored-by: Paweł Buchowski <pawel.buchowski@enso.org>
2023-05-09 10:33:11 +02:00
Michael Mauderer
5b0af105c1
Fix visualisation type selector artifacts rendered after node preview visualisation was closed. (#6575)
Fixes #6501.

There appears to be an issue with the children of an unlinked display object still receiving FRP mouse events. In this case, they show/hide the unlinked child, leading to it appearing again. This is mitigated by unlinking the affected element directly.

Note that while investigating this, I found that there is an untreated issue with the display object hierarchy, which cause failing tests. The failing test case has been disabled, but the linked issue ([#1405](https://github.com/enso-org/ide/issues/1405)) was closed when migrating tickets. I have re-opened it for triage.
2023-05-09 07:56:18 +00:00
somebody1234
05404300c2
Revert typescript CI Lint changes (#6602)
* Revert "Fix lint CI (#6567)"

This reverts commit 0a8f80959f.

* Revert "Run typecheck and eslint on `./run lint` (#6314)"

This reverts commit 7885145b6e.
2023-05-08 19:09:13 +02:00
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
Stijn ("stain") Seghers
069fcf3928
Show error pop-up when failing to rename a project (#6366)
Closes #5065: when a project can't be renamed, it now shows an error pop-up and stays in edit mode.

https://user-images.githubusercontent.com/607786/234025360-6761f7d6-c13c-479c-a0ba-8af5d81f6e87.mp4
2023-05-08 10:12:26 +00:00
James Dunkerley
bc0db18a6e
Small changes from Book Club issues (#6533)
- Add dropdown to tokenize and split `column`.
- Remove the custom `Join_Kind` dropdown.
- Adjust split and tokenize names to start numbering from 1, not 0.
- Add JS_Object serialization for Period.
- Add `days_until` and `until` to `Date`.
- Add `Date_Period.Day` and create `next` and `previous` on `Date`.
- Use simple names with `File_Format` dropdown.
- Avoid using `Main.enso` based imports in `Standard.Base.Data.Map` and `Standard.Base.Data.Text.Helpers`.
- Remove an incorrect import from `Standard.Database.Data.Table`.

From #6587:

A few small changes, lots of lines because this affected lots of tests:
- `Table.join` now defaults to `Join_Kind.Left_Outer`, to avoid losing rows in the left table unexpectedly. If the user really wants to have an Inner join, they can switch to it.
- `Table.join` now defaults to joining columns by name not by index - it looks in the right table for a column with the same name as the first column in left table.
- Missing Input Column errors now specify which table they refer to in the join.
- The unique name suffix in column renaming / default column names when loading from file is now a space instead of underscore.
2023-05-06 10:10:24 +00:00
GregoryTravis
f7282b7cff
"at_least_one" flag for tokenize_to_rows (#6539)
Add "at_least_one" flag for tokenize_to_rows.
2023-05-06 06:22:09 +00:00
Pavel Marek
608c5d8945
Benchmark Engine job runs only engine, not Enso benchmarks (#6534)
Engine Benchmark job runs only engine benchmarks, not Enso benchmarks.

Enso benchmarks do not report their output anywhere, and take more than 5 hours to run nowadays.
We might define a new job in the future and probably rename it to "Library benchmarks".
But that is the responsibility of the lib team.
2023-05-05 21:24:19 +02:00
Kaz Wesley
c957581978
Catch 5813 and avoid crash (#6585) 2023-05-05 19:53:24 +02:00
somebody1234
e1b4019b45
Fix opening links in desktop IDE (#6507)
* Fix opening links

* Address review

---------

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2023-05-05 15:49:34 +02:00
Jaroslav Tulach
b5578ec2c9
Identify SyntaxError exception and avoid printing a stack trace (#6574) 2023-05-05 15:30:06 +02:00
somebody1234
30f27be219
Fix dashboard issues (#6502)
* Fix cloud-v2/#406

* Fix cloud-v2/#408

* Fix cloud-v2/#405

* Fix cloud-v2/#404

* More fixes for cloud-v2/#406

* Fix cloud-v2/#410

* Remove unused variable

* Fix template names; fix template creation
2023-05-05 12:50:44 +02:00
Jaroslav Tulach
a842130ff3
Let ChangesetBuilder.invalidated search even container elements (#6548) 2023-05-05 11:46:00 +02:00
Stijn ("stain") Seghers
0578196623
Fix #5075: stop panning on full-screen visualisation (#6530)
Closes #5075: dragging or scrolling while a visualisation is in full screen caused the camera to move in the graph editor.

The problem was that clicking on the visualisation triggered some FRP node that indicated that the project list should be closed, which then indicated that the navigator shouldn't be disabled. However, the FRP code in the graph editor interpreted "shouldn't be disabled" as "should be enabled", ignoring the fact that there's also a full-screen visualisation, which should always disable the navigator.

https://user-images.githubusercontent.com/607786/235908932-0b579d69-5fd8-438e-a82b-02678d8e6156.mp4
2023-05-05 09:04:07 +00:00
Radosław Waśko
0be572af6a
Only Join_Kind.Inner removes the common-named columns (#6564)
As requested by @jdunkerley
2023-05-05 08:12:07 +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
somebody1234
fcfc44c3e7
Run prettier on CHANGELOG.md; bump prettier (#6571) 2023-05-05 06:52:22 +02: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
Michael Mauderer
1817da799c
Disregard visualisation for selection of nodes. (#6487) 2023-05-04 20:43:08 +02:00
somebody1234
0a8f80959f
Fix lint CI (#6567) 2023-05-04 20:39:22 +02: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
Michał Wawrzyniec Urbańczyk
a832c5e2bb
Build nightly 3 hours earlier. (#6551) 2023-05-04 15:48:33 +02:00
Hubert Plociniczak
6527312486
Cache result of slow function resolution on Any that is present on a hot path (#6536)
Otherwise things can go horribly slow.
Closes #6523. Follow up on https://github.com/enso-org/enso/pull/6441.
2023-05-04 12:54:28 +00:00
Stijn ("stain") Seghers
7f9ed71ad9
Fix cut-off in text visualisations (#6421)
Closes #6196.

Three things were going wrong:
- Not directly contributing, but adding confusion was the fact that padding of 5px was added in two different places. Since the 10px we've had up until now looked better, especially given the size of the rounded corners, I've kept it at 10px, but only applied in one place.
- The main issue was that the length the scrollbars scroll over didn't take padding into account. At the same time, I changed the `max` and `thumb_size` variables to the coordinate system of the content. This is also how they're being used in `ScrollArea`, which is the only other place where `Scrollbar`s are being used.
- The line height of text grid entries was set to the default of 1.2. That's the default line height in browsers, which is great for multi-line text and elements whose height is greater than the line height. In this case, however, where the height and the font size are set to the same value, the default setting of 1.2 pushes the text below the allotted space.

https://user-images.githubusercontent.com/607786/234297411-8c0b3851-5977-4ca5-b3b4-5b0782510e14.mp4
2023-05-04 08:11:18 +00:00
Hubert Plociniczak
4097800f7a
Infer correct synthetic name for nested modules (#6525)
Deeply nested modules (of depth at least 3) would have the incorrect name inferred for synthetic modules. This also became apparent in a much bigger rewrite.

Instead of having module `A.B.C`, as described in the test, it would infer the name to be `B.A.C`, which would break when trying to reference symbols from `C`.

# Important Notes
No ticket reference, as this was something that @radeusgd discovered while working on another component.
The PR includes a minimal example that would previously fail to compile.
2023-05-04 08:05:28 +00:00
Stijn ("stain") Seghers
cbda170126
Delete unused websocket dependency (#6535)
This unused crate is super old and has some old dependencies. Its old dependencies of `parking_lot` or `parking_lot_core` might be causing a wasm compilation bug we've been having (#6091), but it's not clear.
2023-05-04 07:34:51 +00:00
somebody1234
7885145b6e
Run typecheck and eslint on ./run lint (#6314) 2023-05-04 06:00:42 +02: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
James Dunkerley
bb8f910be9
Continued Execution Context work and some little fixes (#6506)
- Add `with_disabled` shortcut for `Context`.
- Protect `Image.write` behind `Context.Output`.
- Correct text on the `Forbidden_Operation` error message.
- Remove context overrides from tests.
- Add `File` operations tests with `Context.Output` disabled.
- Add tests for `Text.write` operations with `Context.Output` disabled.
- Use a better method to make `File_Format` dropdown widget.
- Fix bug in `Invalid_Format.to_display_text`.
2023-05-03 08:01:16 +00:00
Michał Wawrzyniec Urbańczyk
6ce0b4daa1
IDE's logging to a file (#6478)
This PR makes the IDE main process to write its logs to a file.

This is meant to allow debugging in cases where stdout logs would be otherwise unobservable, like when IDE is spawned by the OS as a handle for a given file extension or URL protocol.

This is not integrated in any way with the renderer's process logs, or anything that is printed within the content's dev console. This can be provided in the future if deemed useful.
2023-05-03 03:30:13 +02: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
Ilya Bogdanov
42cc42c878
Fix doubled named arguments bug (#6422)
Fixes #6228

An annoying issue was hidden deep in the code for updating named arguments after input port disconnection.

Kudos to @Frizi for help with investigating it and the initial implementation of the fix.
2023-05-02 17:21:03 +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
Dmitry Bushev
84e59f1403
DataflowAnalysis preserves dependencies order (#6493)
close #6324

Changelog
- feat: DataflowAnalysis compiler pass preserves the order of dependencies. This way when attaching the visualization to the sub-expression, the engine can find the first cached parent node, and properly invalidate it.
- update: runtime visualization test is updated to reproduce the issue

# Important Notes
The dropdown for the column `"LOCATION"` is available right after the Restaurants project startup.

![2023-05-01-171700_1386x975_scrot](https://user-images.githubusercontent.com/357683/235466166-9d25cfa5-0e39-49a3-9c41-93cda59edb81.png)
2023-05-02 14:22:06 +00:00
Radosław Waśko
5eb9c3a843
Implement create_database_table for Database Table (#6467)
Closes #6327
2023-05-02 14:01:44 +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
Jaroslav Tulach
c626543d02
More reliable shutdown of the EnsoContext to save resources (#6468)
There is 572 threads during `RuntimeServerTest` execution create. They stay around because the context isn't closed after each test finishes. Adding `afterEach` cleanup sequence to `runtime-with-instruments` tests. Improving robustness of overall `EnsoContext` [shutdown](https://github.com/enso-org/enso/pull/6468#discussion_r1180348303).
2023-05-02 11:55:02 +00:00
Hubert Plociniczak
7e33300013
Make execution mode live default for CLI (#6496)
As requested in the design doc and in the ticket.

Closes #6495.
2023-05-02 09:58:41 +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
James Dunkerley
6b0c682b08
Add Execution Context control to Text.write (#6459)
- Adjusted `Context.is_enabled` to support default argument (moved built in so can have defaults).
- Made `environment` case-insensitive.
- Bug fix for play button.
- Short hand to execute within an enabled context.
- Forbid file writing if the Output context is disabled with a `Forbidden_Operation` error.
- Add temporary file support via `File.create_temporary_file` which is deleted on exit of JVM.
- Execution Context first pass in `Text.write`.
- Added dry run warning.
- Writes to a temporary file if disabled.
- Created a `DryRunFileManager` which will create and manage the temporary files.
- Added `format` dropdown to `File.read` and `Data.read`.
- Renamed `JSON_File` to `JSON_Format` to be consistent.

(still to unit test).
2023-04-29 08:39:18 +00:00
Radosław Waśko
cdd0065800
Change defaults for Connection.tables and ensure that Connection.query recognizes all available tables (#6443)
Closes #6398
2023-04-29 00:13:29 +00:00