Commit Graph

5440 Commits

Author SHA1 Message Date
Kaz Wesley
70253e73ed
Render tables in documentation. (#11564)
* Render tables in documentation.

Also:
- Separate parser for our flavor of Markdown from the CodeMirror integration;
  move the parser into ydoc-shared and use for Markdown line-wrapping.
- Introduce our own version of yCollab extension; initially just the upstream
  version translated to Typescript and our code style.
- Refactor CodeEditor.

* CHANGELOG, prettier

* Apply @farmaazon review.

* Fix

* Lint

* Cleanup

* Integration tests for GraphNodeComment

Also a little refactoring in preparation for new implementation.

* Workaround stuck CI

* Revert "Workaround stuck CI"

This reverts commit 74313842ba.

* Fix merge

---------

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2024-11-20 10:40:24 +00:00
Ilya Bogdanov
d71781f9bd
New node colors (#11578)
* Show halo only on hover

* Fix numeric input widget. (#11561)

* Invert node colors, make edited widgets more prominent

---------

Co-authored-by: Paweł Grabarz <frizi09@gmail.com>

Skipping failing test in GUI packaging.
Nothing changes in Microsoft space.
2024-11-20 10:38:10 +00:00
Ilya Bogdanov
21cbf25067
Edges always end with arrows (#11590)
Bypassing the failing test.
2024-11-20 09:54:20 +00:00
Jaroslav Tulach
d862a3cf08
HostValueToEnsoNode is not a builtin (#11593)
Bypassing failing check.
2024-11-20 08:15:36 +00:00
Jaroslav Tulach
ad9d0e5ab5
Allow (42 : Text & Integer) at the end of function (#11588)
Bypassing failing check.
2024-11-20 08:14:38 +00:00
somebody1234
bab9addeb4
Bump Node version in Nix flake (#11580)
- Bump Node.JS version to match `.node-version`:

6b810ee1e6/.node-version (L1)
2024-11-19 17:44:58 +00:00
Jaroslav Tulach
3d8a0e1b90
Multi value Complex test and robustness refactoring (#11525)
While working on #11482 and enhancing the tests suite with more tests based on `type Complex` a [getRootNode() did not terminate in 100000 iterations](https://github.com/enso-org/enso/pull/11525#issuecomment-2476171597) problem was discovered. Detailed investigation revealed that the existing `ReadArgumentCheckNode` infrastructure was able to create a **cycle** of parent pointers in the Truffle AST.

The problem was in intricate manipulation of the AST while rewriting internals in `ReadArgumentCheckNode`. This PR avoids such manipulation by _refactoring the type checking code_. `ReadArgumentNode` knows nothing about types anymore. When a type check is needed, `IrToTruffle` adds additional `TypeCheckValueNode.wrap` around the `ReadArgumentNode` - that breaks the **vicious circle**.

All the _type checks_ nodes are moved to its own package. All but one of the classes are made package private. The external API for doing _type checking_ is concentrated into `TypeCheckValueNode`.
2024-11-19 17:04:42 +00:00
Adam Obuchowicz
af39e0ec50
Pasting image in Documentation Editor (#11547)
Fixes #10059

https://github.com/user-attachments/assets/a528e26a-b388-4a2a-9bf4-3ccc734373f6

# Important Notes
* I put the logic for project's files management to a single composable "projectFiles"
2024-11-19 15:47:46 +00:00
Ilya Bogdanov
c52b8f9455
Disable EditContext API (#11554)
Fixes #11239

https://github.com/user-attachments/assets/eb57fb34-11f4-489b-9849-c93c7aa5e870
2024-11-19 11:36:59 +00:00
Pavel Marek
9a49a02e3f
--jvm tries to find Java executable system-wide. (#11500)
Fixes `--jvm` option, given to the native image. This was failing on my machine, because when given `--jvm` option, the runner was trying to find the `java` executable from the distribution manager's runtime (on my system located in `~/.local/share/enso/runtime`) and it used the first runtime found. But the first runtime on my system is JDK 17.

The `--jvm` option now tries to:
- Find a JDK from the distribution manager that has the same version as the JDK used for building the engine.
- If there is not an exact version match, it tries to find a runtime from distribution manager that is *newer*.
- If none, fallback to system-wide search
- System-wide search tries to find `java` from `$JAVA_HOME` and from `$PATH`. But this is just a fallback.

# Important Notes
- Added test to Engine CI jobs that pass `--jvm` argument to a native image of engine-runner
- ea3af5ffbc
- `runtime-version-manager` sbt project migrated to a JPMS module
- `engine-runner` now depends on `runtime-version-manager`.
- Removed unnecessary stuff in `runtime-version-manager` dealing with outdated `gu` Graal Updater utility.
- Extracted [GraalVersionManager](1455b025cb/lib/scala/runtime-version-manager/src/main/java/org/enso/runtimeversionmanager/components/GraalVersionManager.java) from [RuntimeVersionManager](d2e8994700/lib/scala/runtime-version-manager/src/main/scala/org/enso/runtimeversionmanager/components/RuntimeVersionManager.scala)
2024-11-18 22:44:54 +00:00
James Dunkerley
d5f0e9ed8c
Fixes a few bits... (#11581)
- Minor fixes from past PR.
- Always use Table viz for Table.
- Fix display to `Always`  for any AWS required parameters.
- Add widget for `Redshift` credentials and alter `Username_And_Password` to require arguments.
- Fix display in `Data` module methods for required parameters.
- Fix `Statistic.bulk_widget`.
- Alter `Google_Analytics` so credentials the first parameter.
- Add support for storing the credential file in Enso cloud in `Google_Analytics`.

![image](https://github.com/user-attachments/assets/f34c4231-9f9f-468b-90e9-bbc7f2374d22)
2024-11-18 22:29:34 +00:00
Dmitry Bushev
6b810ee1e6
Rename unqualified method calls (#11556)
close #11281

Changelog:
- update: `refactoring/renameSymbol` can rename unqualified method calls

# Important Notes
https://github.com/user-attachments/assets/e03c4ec7-7620-4ce4-8eab-86b95f308be2
2024-11-15 13:10:57 +00:00
Sergei Garin
58512e701e
Show docs on Dashboard (#11391)
Closes: https://github.com/enso-org/cloud-v2/issues/1445

PR is more or less ready for feedback,CR, and QA.

# Read before looking into:

**Known issues:**
- [x] Need to adjust timings for the animations (they're a bit out of sync).
- [x] After the latest rebase, the side panel might expand while clicking on the sidebar toggle.
- [ ] Images no longer display. 🤦
- [x] Need to restore the functionality around spotlighting a component


Demo:

https://github.com/user-attachments/assets/8cec9ec0-4753-482e-8637-f3857b4396a5
2024-11-15 12:12:55 +00:00
James Dunkerley
0543cfaec5
New Table.input function (#11562)
* New Table.input function for GUI allowing auto parsing and type control

* CHANGELOG.

* Missing import.

* Char not Text.

* Fix imports.
2024-11-15 10:50:21 +00:00
Sergei Garin
9dc4e9b090
Redesign versions checker dialog (#11540)
* fix versions checker dialog

* Adress the issues

* Fixes

* Fix integration tests

* fix prettier

* Fix dialog

---------

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2024-11-15 10:49:30 +03:00
Paweł Grabarz
008aa19530
Fix numeric input widget. (#11561) 2024-11-14 20:35:57 +00:00
Gregory Michael Travis
159a7a32c8
Add Warnings whenever a floating-point value is used as a Dictionary key (#11417) 2024-11-14 19:57:48 +00:00
James Dunkerley
d0f3d7f098
skip_rows for Excel_Workbook.read. (#11560)
- Adds `skip_rows` to `Excel_Workbook.read`.
- Support for read by index.
2024-11-14 19:31:47 +00:00
Dmitry Bushev
19f4242272
Update ydoc-server build (#11550)
Changelog:
- update: Ydoc build inputs
- update: respect `pnpm` exit codes
2024-11-14 15:25:15 +00:00
James Dunkerley
7363377331
Linting and Widgets (#11551)
- Fix any issues identified by the doc writer.
- Alter all `default_widget` functions: all now take display and all use the type check signature.
- Review widgets on AWS APIs and make sure display is correct.
2024-11-14 12:01:04 +00:00
marthasharkey
5b79f6729c
Table viz column header tooltip extended to add data quality stats (#11520) 2024-11-14 10:46:24 +00:00
dependabot[bot]
bbf28115dc
Bump cookie and express in /tools/simple-library-server (#11552)
Bumps [cookie](https://github.com/jshttp/cookie) to 0.7.1 and updates ancestor dependency [express](https://github.com/expressjs/express). These dependencies need to be updated together.


Updates `cookie` from 0.6.0 to 0.7.1
- [Release notes](https://github.com/jshttp/cookie/releases)
- [Commits](https://github.com/jshttp/cookie/compare/v0.6.0...v0.7.1)

Updates `express` from 4.21.0 to 4.21.1
- [Release notes](https://github.com/expressjs/express/releases)
- [Changelog](https://github.com/expressjs/express/blob/4.21.1/History.md)
- [Commits](https://github.com/expressjs/express/compare/4.21.0...4.21.1)

---
updated-dependencies:
- dependency-name: cookie
  dependency-type: indirect
- dependency-name: express
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-11-14 10:36:33 +00:00
Jaroslav Tulach
0a9478c967
Errors and completions in NetBeans 24+ (#11531) 2024-11-14 06:47:29 +01:00
somebody1234
af0b95b1d9
Animated resizing for dialogs (#11466)
- Cherry-picked out of #10827
- Add `framer-motion` to dialog to animate between dialog sizes.
- Currently visible when switching between types in the Datalink modal.
- Will also be visible when switching between types in the Schedule modal.

# Important Notes
None
2024-11-13 20:12:21 +00:00
Ilya Bogdanov
3d38b7174f
Add Write button to component menu (#11523)
Closes #10486

https://github.com/user-attachments/assets/df492946-0c54-481e-8499-992b3ae9e35d
2024-11-13 19:45:32 +00:00
James Dunkerley
6b544650b3
New NumberParser for Table parsing (#11499)
Replaces the Regex based number parser with a new parser which works out the same by working out each part as it sees and example of it.

Close #7398 - performance of reading the large CSV now about 2s (down from 15-20s).
2024-11-13 19:08:23 +00:00
Gregory Michael Travis
fb50a8f24f
HTTP cache size limit environment variables (#11530) 2024-11-13 13:40:54 -05:00
Dmitry Bushev
03dc77006b
Add healthcheck route to Ydoc (#11545)
close #10299

Changelog:
- add: `/_health` route
2024-11-13 15:43:58 +00:00
dependabot[bot]
3181374392
Bump cookie and express in /tools/legal-review-helper (#11280)
Bumps [cookie](https://github.com/jshttp/cookie) to 0.7.1 and updates ancestor dependency [express](https://github.com/expressjs/express). These dependencies need to be updated together.


Updates `cookie` from 0.6.0 to 0.7.1
- [Release notes](https://github.com/jshttp/cookie/releases)
- [Commits](https://github.com/jshttp/cookie/compare/v0.6.0...v0.7.1)

Updates `express` from 4.21.0 to 4.21.1
- [Release notes](https://github.com/expressjs/express/releases)
- [Changelog](https://github.com/expressjs/express/blob/4.21.1/History.md)
- [Commits](https://github.com/expressjs/express/compare/4.21.0...4.21.1)

---
updated-dependencies:
- dependency-name: cookie
  dependency-type: indirect
- dependency-name: express
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-11-13 15:21:27 +00:00
Hubert Plociniczak
e325e65524
Revert disabling of polyglot Ydoc (#11544)
This reverts commit e6a6308145.
This reverts commit f27e757e53.
This reverts commit 9b4134240a.
2024-11-13 16:04:13 +01:00
Ilya Bogdanov
dd95eb2cf5
Reconnect visualizations when switching their types (#11494)
Fixes #11426

Now, visualizations should no longer receive stale data props cached from previous visualizations opened on the same node. We do so by changing the visualization ID (reattaching the visualization).

This does not protect from unhandled exceptions happening inside visualizations, though, so a bigger fix will be provided separately.

https://github.com/user-attachments/assets/821b3c11-818e-403b-812d-b3768399b3a4
2024-11-13 10:56:34 +00:00
Hubert Plociniczak
2f2eeafceb
Fix Logger's name in stdlib (#11519)
* Fix Logger's name in stdlib

Somehow SLF4J is able to recognize correctly the provided Logger's name
and print it to the user. Java's Logger is
not.
In addition, we setup SLF4J's configuration, meaning that log-levels are
correctly respected.

For a simple project:
```
from Standard.Base import all
from Standard.Base.Logging import all

type Foo

main =
    IO.println "Hello World!"
    Foo.log_message level=..Warning "I should warn you about something..."
    Foo.log_message level=..Info "Should be seen? By default we only show up-to warnings level"
    Foo.log_message level=..Severe "Something went really bad!"
```

This change demonstrates the fix.

Before:
```
> enso --run simple-logging.enso
Hello World!
Nov 08, 2024 6:08:07 PM com.oracle.truffle.host.HostMethodDesc$SingleMethod$MHBase invokeHandle
WARNING: I should warn you about something...
Nov 08, 2024 6:08:07 PM com.oracle.truffle.host.HostMethodDesc$SingleMethod$MHBase invokeHandle
INFO: Should be seen? By default we only show up-to warnings level
Nov 08, 2024 6:08:07 PM com.oracle.truffle.host.HostMethodDesc$SingleMethod$MHBase invokeHandle
SEVERE: Something went really bad!
Foo
```

After:
```
> enso --run simple-logging.enso
Hello World!
[WARN] [2024-11-08T18:03:37+01:00] [simple-logging.Foo] I should warn you about something...
[ERROR] [2024-11-08T18:03:37+01:00] [simple-logging.Foo] Something went really bad!
Foo
```

* Update distribution/lib/Standard/Base/0.0.0-dev/src/Logging.enso

Co-authored-by: Radosław Waśko <radoslaw.wasko@enso.org>

* Test stdlib logs by using MemoryAppender

Added `getEvents` member to `MemoryAppender` so that it is possible to
retrieve individual log messages from tests and test their presence.
Required opening up to some modules to retrieve internals of loggers.

* nit

* small tweaks to eliminate module warnings

---------

Co-authored-by: Radosław Waśko <radoslaw.wasko@enso.org>
2024-11-13 10:20:41 +01:00
Ilya Bogdanov
75733c55aa
Accept input when clicking off the component (#11541)
Closes #11360

https://github.com/user-attachments/assets/f030ddc0-e084-43de-8ed7-fcac21a740a5
2024-11-13 00:38:42 +00:00
Gregory Michael Travis
c23ff074e4
Make round_integer work for positive decimal places (#11457) 2024-11-12 23:29:25 +00:00
Gregory Michael Travis
978a009133
Create Regex benchmarks (#11504) 2024-11-12 22:43:28 +00:00
Dmitry Bushev
67f075b10d
Optimize runtime Docker image size (#11529)
Reduce the size of the runtime Docker image from `3.04GB` to `1.41GB`.

```
$ docker images
REPOSITORY                   TAG       IMAGE ID       CREATED         SIZE
runtime                      latest    ab76231c78c5   9 minutes ago   1.41GB
<none>                       <none>    c8f70807b04f   4 hours ago     3.04GB
```

The image was bloated because of `RUN chmod` and `RUN chown` commands. When the `RUN` command modifies the file, it copies it to a new layer, resulting in a final image with multiple layers containing the same files.

# Important Notes
Note that copying directories with `COPY --chmod=5xx` sets the executable flag to both files and directories. While it is suboptimal (we only need the executable attribute for directories), having executable files in `/opt/enso` should not be an issue. Permissions can be narrowed further when the new Dockerfile `COPY` syntax is stabilized.
2024-11-12 22:04:46 +00:00
Paweł Grabarz
a83297b7db
Drop git dependency on enso-bot repository (#11539) 2024-11-12 18:25:19 +00:00
Adam Obuchowicz
d02f7e21df
Restore pnpm-lock (#11514)
Bypassing issue with CI
2024-11-12 10:05:07 +00:00
Radosław Waśko
e76fe907d3
Initial implementation of Data.read_many (#11490)
- Part of #11311
- Adds ability to read a list of files (Vector, Column, Table) into a Vector.
- Reading into a Table of objects or merged will come in a next PR.
2024-11-08 19:03:47 +00:00
Jaroslav Tulach
67db825587
MetadataStorage is mutable - structural equals in copy isn't enough (#11513)
`MetadataStorage` is mutable. Using `Object.equals` in `IR.copy` methods to check whether a _copy is needed_ isn't enough. The fact that two storages are `Object.equal` may be just temporary. Replacing the checks in 69 `IR.copy` methods with identity check - e.g. `ne` in Scala which is `==` in Java.

Using proper structural check inside of `MetadataStorage` fixes #11171.

# Important Notes
I [used this regex](https://github.com/enso-org/enso/issues/11171#issuecomment-2463908932) to find out 69 instances of `IR.copy`:

![69 copy methods](https://github.com/user-attachments/assets/257580b9-54fc-4199-88ad-a22103b0041f)

and I modified all 69 of them.
2024-11-08 17:29:41 +00:00
marthasharkey
f2037ee9d0
Add data quality indicators to table Viz (#11307) 2024-11-08 16:59:09 +00:00
marthasharkey
8b5cd9bbfc
Extend Selection Menu to allow text selection (#11352) 2024-11-08 16:36:45 +00:00
AdRiley
29faf201fc
Make SQLServer join work (#11511)
* Make join work

* Code Review Changes
2024-11-08 15:48:55 +00:00
Jaroslav Tulach
a6460c17b2
Implement proper hash and equals for FrameVariableNames (#11512) 2024-11-08 16:25:28 +01:00
Adam Obuchowicz
86c59469d0
Increase timeout and vite version (#11492)
1. The electron test hit timeouts from time to time, probably because of slow response from the engine: increased timeout.
2. Unify vite version across packages.
2024-11-08 08:43:02 +00:00
AdRiley
014a2a7e6b
Refactor (#11506) 2024-11-07 16:02:54 +00:00
AdRiley
676a7d4256
SQLServer enable filter (#11471)
* checkpoint

* Passing by.integer.comparisons

* More passing tests

* by empty text

* Add flag

* 2 more green

* Back to 6 red

* 5 red

* 2 red

* 1 red

* Green

* Refactor

* refactor

* Refactor

* refactor

* Refactor

* clean up

* Green

* Refactor

* Cleanup

* Refactor

* Clean up

* Cleanup

* Clean up

* Fix tests

* Fix

* Fix

* Code review

* Refactor

* Code review changes

* Add literals

* Code review changes

* Code review changes

* Checkpoint

* checkpoint

* checkpoint

* Cleanup

* Refactor

* Refactor

* refactor

* Fix type name

* Fix
2024-11-07 15:42:55 +00:00
Hubert Plociniczak
a5ebdf4e79
Fix logging in CLI (#11472)
* Fix logging in CLI

Previously, unless `--logger-connect` was used, CLI would always
fallback to console logging. In addition it would be misconfigured if
`application.conf` was provided with logging configuration.

This change makes sure that CLI uses the same logging infrastructure as
the rest of the system.
As a result, CLI will now by default not only log to the console and
respect the provided configuration but also log to the file system.

* Update docs

* c&p error

* More examples
2024-11-07 16:03:19 +01:00
Kaz Wesley
867c77d5cc
New markdown editor (#11469)
Implements #11240.

https://github.com/user-attachments/assets/4d2f8021-3e0f-4d39-95df-bcd72bf7545b

# Important Notes
- Fix a Yjs document corruption bug caused by `DeepReadonly` being replaced by a stub; introduce a `DeepReadonly` implementation without Vue dependency.
- Fix right panel sizing when code editor is open.
- Fix right panel slide-in animation.
- `Ast.Function` renamed to `Ast.FunctionDef`.
2024-11-06 16:54:32 +00:00
Pavel Marek
701bba6504
Convert Array_Like_Helpers.map to a builtin to reduce stack size (#11363)
The ultimate goal is to reduce the method calls necessary for `Vector.map`.

# Important Notes
- I managed to reduce the number of Java stack frames needed for each `Vector.map` call from **150** to **22** (See https://github.com/enso-org/enso/pull/11363#issuecomment-2432996902)
- Introduced `Stack_Size_Spec` regression test that will ensure that Java stack frames needed for `Vector.map` method call does not exceed **40**.
2024-11-06 11:14:48 +00:00