Commit Graph

462 Commits

Author SHA1 Message Date
Dmitry Bushev
ad5f2c9121
Change the default location for Enso projects (#10318)
close #10240

Changelog:
- add: `desktop-environment` Java module to detect user environment configuration
- add: `ProjectsMigration` module containing the migration logic of the enso projects directory
- update: updated and cleaned up unused settings from the storage config
- add: `desktopEnvironment` TS module to detect user environment configuration in the `project-manager-shim`
- update: `project-manager-shim` with the new user projects directory
2024-06-22 12:40:51 +00:00
Jaroslav Tulach
fe2cf49568
Run whole test/Base_Tests in native image runner (#10296) 2024-06-21 06:03:53 +02:00
Hubert Plociniczak
114b3a5c5e
Cleaning up YAML parsing in preparation for circe-yaml removal (#10309)
The current implementation contains logic that should enable us to make some backward compatibility config changes.
At the same time, the logic is tightly integrated with circe's JSON library, which we want to eventually to get rid off.
Rather than trying to keep it somehow around and maintain via some hacks this PR proposes to ditch that logic completely as we currently have no use-case for such scenarios.

As a result, classes modelling YAML configs now don't have the extra fields and there is 1:1 correspondence.

Performance has also improved although that wasn't the main objective, yet. Follow up PR will attempt to replace `circe-yaml` with `snakeyaml` directly.

In preparation for #9113. Note that the dependency upgrade is necessary because it brings latest available `snakeyaml` (as part of `circe-yaml`).
2024-06-20 13:07:54 +00:00
Dmitry Bushev
04a92ef765
TextEdit with custom IdMap (#10283)
close #10182

Changelog:
- add: IdMap parameter to the `text/applyEdit` request
- add: IdMap to the runtime module
- update: set IdMap during the interactive compilation
- update: set the IR identifiers in the `TreeToIR` parsing step
2024-06-15 18:03:18 +00:00
Radosław Waśko
3b566709f3
Type Inference PoC - iteration 1 - most basic type inference (#8652)
- Closes #8590
2024-06-13 16:23:56 +00:00
Hubert Plociniczak
d6d370925a
Removing dependencies to speed up startup (#10249)
Reducing the number of dependencies. Explicit `cats` are almost gone (present in `cli`). `enumeration` is completely gone.  `cats` is also still included implicitly via `io.circe` but that's a different kind of beast.
Also, really removed `jackson` from dependencies by fixing the dependency on `http-test-helper`.

# Important Notes
In a number of places importing all cats implicits could be simply replaced with a single or two method calls. Not to mention that this will reduce compilation times due to reduced implicit search space.

One example of how the changes affect performance (not only startup):

Before:
![Screenshot from 2024-06-11 12-05-24](https://github.com/enso-org/enso/assets/292128/a1a772a9-635d-4a16-a543-e2fd2124a22c)
Now:
![Screenshot from 2024-06-11 14-27-47](https://github.com/enso-org/enso/assets/292128/b17c7fcc-9a6d-48b9-8200-60708354ee03)
(frequently executed)

![Screenshot from 2024-06-12 12-46-34](https://github.com/enso-org/enso/assets/292128/31bc4dfd-4edc-45c9-9c5d-13e3472089b9)
Also appears to be gone.

This PR is by no means finished. The purge will continue in follow up PRs.
2024-06-12 18:15:36 +00:00
Pavel Marek
2ea2a57651
ydoc-server is a separate module (#10156)
- Remove remnants of deprecated Scala parser
- The following projects are now JPMS modules provided on system module-path (in components directory):
  - `ydoc-server`
  - `profiling-utils`
  - `syntax-rust-definition`
- The contents of the aforementioned modules are excluded from both `runner.jar` and `runtime.jar` fat jars.
- Suggestions are serialized and deserialized with our Persistance framework, rather than via the default Java OutputObjectWriter.
2024-06-07 12:56:42 +02:00
Dmitry Bushev
d08cb704b0
Record interaction between GUI and LS (#10107)
close #8328

Changelog:
- add: message callbacks to JsonRpc and Binary servers
- update: use events log to collect the RPC messages
2024-06-03 06:50:59 +00:00
Dmitry Bushev
79e20adcc0
Local dashboard shouldn't be showing system files (#10072)
close #10071

Changelog:
- update: `--filesystem-list` command to filter the hidden files
- update: project manager shim middleware to filter the hidden fiels
2024-05-29 09:26:35 +00:00
Hubert Plociniczak
094076a9e8
Remove invalid JVM parameters (#10053) 2024-05-23 14:48:08 +00:00
Jaroslav Tulach
0a010b3f71
Include milliseconds in the log output (#10016) 2024-05-23 16:44:32 +02:00
Hubert Plociniczak
a5ca9f9ac2
Reduce ops when setting exisitng execution env (#9967)
Setting execution environment to the existing one should have no effect.
Should (positively) affect startup in #9789.

# Important Notes
Cancelling jobs and triggering a fresh execute job is expensive and unnecessary, especially on startup, when the result should be the same as before.
2024-05-16 20:59:13 +00:00
Hubert Plociniczak
43c80da8a3
Follow up to #9927 (#9930)
`System.getProperty` does not return `null`, it returns `"null"`
🤦.
I broke the internet, sorry.
2024-05-13 16:43:24 +02:00
Hubert Plociniczak
ff28737252
Improve SuggestionsRepo initialization (#9808)
Added synchronization block to avoid race conditions.
2024-05-13 13:40:52 +00:00
Hubert Plociniczak
c67218c1ed
Abort jobs as early as possible (#9927)
We don't seem to run `abortJobs` under a lock, and especially not under the write compilation lock, in other scenarios. This is causing some major slowdown when there is a long running execution or compilation, as currently experienced in the cloud.

This should reduce chances of a timeout.

Also added an option to override the global executor. Currently it would always default to the runtime number of available process which may be suboptimal.

# Important Notes
Pending testing on the impact it will have.
2024-05-13 07:39:29 +00:00
Hubert Plociniczak
f2779cfea4
Allow for profiling startup in dockerized setting (#9865)
When `PROFILING_FILENAME` and `PROFILING_TIME` are set, language server will collect profiling data on startup and place it under `/opt/enso/profiling/$PROFILING_NAME` where it can be fetched from.

Needed to better analyze #9789.
2024-05-06 15:04:54 +00:00
Dmitry Bushev
5995a00958
Run ydoc-server with GraalVM (#9528)
part of #7954

# Important Notes
The workflow is:
- `$ npm install` -- just in case
- `$ npm --workspace=enso-gui2 run build-ydoc-server-polyglot` -- build the `ydocServer.js` bundle
- `$ sbt ydoc-server/assembly` -- build the ydoc server jar
- `env POLYGLOT_YDOC_SERVER=true npm --workspace=enso-gui2 run dev` -- run the dev server with the polyglot ydoc server. Providing `POLYGLOT_YDOC_SERVER_DEBUG=true` env variable enables the chrome debugger
2024-05-02 06:28:57 +00:00
Jaroslav Tulach
931baa4276
Towards simplifying runtime-compiler dependencies (#8894) 2024-04-25 10:03:42 +02:00
Hubert Plociniczak
58009b7c04
In-memory suggestions (#9751)
This change replaces an sqllite-backed suggestions' repo with a simple, in-memory, one.
As `completion` functionality has been implemented completely in GUI, there is no need to support it in backend, which simplifies a lot of functionality.

Closes #9650 and #9471.

# Important Notes
Loading suggestions and sending them to GUI on startup is almost instantaneous. Previously it would take ~10s just for `Standard.Base`.
2024-04-22 11:02:17 +00:00
Hubert Plociniczak
a444934806
Fix bundled engine after GraalVM upgrade (#9735)
The change fixes the problem with suggestions loading by
1. Making sure that bundle is always the first on the search path for editions and engine
2. Passing language home to language server

Verified by building/running AppImage locally (previously would fail).

Closes #9728. Regressed in #9647.
2024-04-18 10:14:34 +00:00
Hubert Plociniczak
d6f7afc624
Open Java modules for Snowflake setup (#9664)
# Important Notes
Some workarounds are being considered but we need this change sooner than later.
2024-04-16 21:01:32 +00:00
GregoryTravis
271a744b67
On MacOS, do not assume existence of Contents/Home in the JDK binary path (#9684) 2024-04-15 20:07:25 +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
Jaroslav Tulach
11e1e9efa0
Don't let the non-Enso types float around the Enso interpreter! (#9584) 2024-04-02 06:22:19 +02: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
Dmitry Bushev
fb0559e7ab
Put all reexports of given entry in Suggestion Database (#9454)
close #9351

Changelog:
- update: deprecate the `reexport` suggestion field
- add: `reexports` suggestion field containing the list of modules re-exporting this symbol
- update: exports logic to gather all the symbols exported from a given module
2024-03-26 16:33:25 +00:00
Dmitry Bushev
aff7fb86e8
Allow project manager to write files (#9483)
close #9360

Changelog:
- add: `--filesystem-write-path {path}` command allowing to write bytes from stdin to the provided path
2024-03-21 15:56:04 +00:00
Dmitry Bushev
df3faf6f27
Project manager returns normalized name of the created project (#9510)
close #9509

Changelog:
- update: project create response to contain a normalized project name
2024-03-21 15:38:43 +00:00
Dmitry Bushev
44e679ce55
Project manager create method should handle relative paths (#9484)
close #9444

Changelog:
- update: resolve `~` in the user provided path
2024-03-21 09:10:59 +00:00
AdRiley
81c73a9866
Google Analytics Report (#9239)
* Updating Google Analytics API

* Move up one file level

* Code Review changes

* Code Review Changes

* Updated Changelog

* Revert

* Code Review changes
2024-03-14 10:15:47 +00:00
Pavel Marek
af73768d14
Declare HTTPDownloaderTest as flaky (#9339)
`HTTPDownloaderTest` failed recently transiently. Let's declare it as flaky.
2024-03-12 09:53:55 +00:00
Dmitry Bushev
8d921e7412
Allow deleting files with project manager (#9359)
followup #9173

Changelog:
- update: chage `--filesystem-delete-directory` to `--filesystem-delete` and allow removing files
2024-03-11 13:24:00 +00:00
Dmitry Bushev
ee2dc57d68
Project manager API for basic file system operations (#9245)
close #9173

Changelog:
- add: `--filesystem-list {path}` cli parameter that list files, directories and projects
- add: `--filesystem-create-directory {path}` cli parameter that creates a specified directory
- add: `--filesystem-delete-directory {path}` cli parameter that deletes a specified directory
- add: `--filesystem-move-from {path}` ` --filesystem-move-to {path}` cli parameters to move specified filesystem object
2024-03-08 15:44:17 +00:00
Hubert Plociniczak
f80dd9f593
Demonstrate usage of foreign arrow function (#9150)
Including arrow language in the distribution by default. Added a basic example for creating an Arrow array.
Making sure that memory layout agrees with Arrow specification (padding, continuous allocation of memory chunks).
Related to #9118.

This should unblock work on allowing serialization/deserialization to/from Parquet but I'd like to delay it to a follow up ticket as it is going to be a significant amount of specialized work.
2024-03-08 15:20:55 +00:00
Pavel Marek
53c1b3f48b
PathProgressBodyHandler does not return immediately (#9222)
Fixes downloading of files. It used to fail because it returned almost immediately. Also fixes progress reporting when fetching a String.

# Important Notes
Tested by removing appropriate engine and runtime from `$HOME/.local/share/enso` and with manually running:
```
java -jar launcher.jar --launcher-log-level trace install engine 2024.1.1-nightly.2024.2.29
```
2024-02-29 16:42:33 +00:00
Pavel Marek
f48caac586
Upload native-image argfiles (#9094)
In PR #8953, in commit ba0a69de6e, I have introduced argument files to the `native-image`. In this PR, let's try to upload these argfiles as artifacts on GH, so that we can inspect them later.
2024-02-26 19:25:37 +00:00
Dmitry Bushev
7ff90aa3f7
Synchronize suggestions loading after the reconnect 2 (#9142)
related #8689, #9072

Fixes a race between the language server SQL updating logic and the engine `DeserializeLibrarySuggestionsJob`s when the library suggestions may start loading before the database is properly cleaned up after the reconnect.

# Important Notes
As a side effect, arguments are showing slightly (~1 second) faster due to the lower contention between the engine jobs.

#### Before
https://github.com/enso-org/enso/assets/357683/cbda2da4-9080-4b9b-b836-81e54694d468

#### After
https://github.com/enso-org/enso/assets/357683/bf442284-47be-456d-b1dd-2413b6ad8244
2024-02-23 11:18:01 +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
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
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
Hubert Plociniczak
5c624d21d7
Revert "Synchronize suggestions loading after the reconnect (#9043)" (#9072) 2024-02-15 13:39:56 +00:00
Dmitry Bushev
9c982e07b0
Synchronize suggestions loading after the reconnect (#9043)
related #8689

Fixes a race between the language server SQL updating logic and the engine `DeserializeLibrarySuggestionsJob`s when the library suggestions may start loading before the database is properly cleaned up after the reconnect.
2024-02-13 17:52:15 +00:00
Pavel Marek
5919eda753
Fix incremental compilation of runtime/test (#8975) 2024-02-13 10:05:31 +01:00
Dmitry Bushev
eb1f52984e
Local project manager work against any folder (#8985)
close #8650

Changes in project manager required to work with projects located in custom directories.

Changelog:
- add: `--projects-directory /path/to/projects` `--project-list` command line parameters returning the projects located in custom directory
- update: `project/create`, `project/open`, `project/delete`, `project/rename` commands to work with projects located in custom directories
2024-02-12 09:46:40 +00:00
Hubert Plociniczak
b8612344ca
Disable flaky test (#8967) 2024-02-05 13:41:43 +00:00
Hubert Plociniczak
34e1bacdf1
Further optimizations to test resources (#8936)
TestRuntime should be deprecated as it creates a number of threads and doesn't allow to easily modify ZIO's runtime.
But the biggest drop stems from fixing leaking `FileSystemService` that weren't being closed for every `TextOperationsTest` test.
The change is a follow up on #8892 but this time focused on ZIO usage.

Hopefully fixes #8806 for good.

# Important Notes
Running `language-server/test`.
Before:
![Screenshot from 2024-02-02 09-48-32](https://github.com/enso-org/enso/assets/292128/fb414c74-7d7a-4e7b-8b0c-d25dc3721bbf)

After:
![Screenshot from 2024-02-02 09-46-02](https://github.com/enso-org/enso/assets/292128/db9429df-d861-4f48-818f-888d5bbbb089)
2024-02-02 22:49:48 +00:00
Hubert Plociniczak
68ce4ae1b7
Reduced resources for various Akka dispatchers (#8892)
The defaults picked up by Akka tend to make us of all resources which is unnecessary and overwhelming for tests.

Improves #8806, potentially.

Before
![Screenshot from 2024-01-28 22-34-42](https://github.com/enso-org/enso/assets/292128/f80eb66a-2f37-44d5-bcdb-f00a78fe72fd)
After
![Screenshot from 2024-01-31 00-12-10](https://github.com/enso-org/enso/assets/292128/c5223912-5f6e-413c-a0a4-050afa3ed463)

when running the problematic `LibrariesTest`.

Full `language-server` test suite.
Before
![Screenshot from 2024-01-31 00-20-50](https://github.com/enso-org/enso/assets/292128/f1c94a66-6905-4f57-8a7d-7df049714353)
After
![Screenshot from 2024-01-31 00-18-40](https://github.com/enso-org/enso/assets/292128/3a11125e-d593-43df-8d35-1a8915812b2b)

# Important Notes
Note that Executors assigned to Zio and initializers should also be improved. Unfortunately due to various blocking threadpools  it is easy to get timeouts when running the whole suite.
2024-01-31 10:25:17 +00:00
Radosław Waśko
368e4867b4
Allow secrets in AWS_Credential (#8774)
- Closes #8722
2024-01-19 19:00:56 +00:00
Hubert Plociniczak
7d56cdc234
Thread dump on test timeout (#8785) 2024-01-17 11:20:38 +00:00
Jaroslav Tulach
09f484f00d
Make suspended atom fields work for boxed atoms (#8712)
Fixes #8710 by making sure suspended atom fields support works also for "normal" `Atom` instances without any special `Layout`. Moves all _atom related_ classes into single package and hides as much of classes as possible by making them _package private_.
2024-01-16 20:20:38 +00:00