Commit Graph

228 Commits

Author SHA1 Message Date
Hubert Plociniczak
8575b76b0a
Support pattern matching on constants (#3641)
This change adds support for matching on constants by:
1) extending parser to allow literals in patterns
2) generate branch node for literals

Related to https://www.pivotaltracker.com/story/show/182743559
2022-08-12 13:18:58 +00:00
Dmitry Bushev
5e114acbb5
Update Scala to 2.13.8 (#3631)
Update Scala compiler and libraries.
2022-08-08 19:32:55 +00:00
Dmitry Bushev
0701e762ea
Add Language Server benchmarking tool (#3578) 2022-07-22 14:12:52 +00:00
James Dunkerley
2527a7bdb2
Update SQLite, PostgreSQL and Redshift drivers (#3571)
Updated the SQLite, PostgreSQL and Redshift drivers.

# Important Notes
Updated the API for Redshift and proved able to connect without the ini file workaround.
2022-07-11 18:39:16 +00:00
Hubert Plociniczak
22fc03ca3d
Fix here leftovers (#3567)
Hooking up Reporting_Stream_Encoder_Spec reveals missing renaming.
Also removed one more `here.` that wasn't run in tests.

Kudos to @radeusgd for finding those!
2022-07-07 12:02:18 +00:00
Michał Wawrzyniec Urbańczyk
43a893cae6
Bump the build script (#3535) 2022-07-01 03:58:14 +02:00
Jaroslav Tulach
479f74cc84
Enso Integration with Ideal Graph Visualizer (#3533)
This PR adds sources for Enso language support in IGV (and NetBeans). The support is based on TextMate grammar shown in the editor and registration of the Enso language so IGV can find it. Then this PR adds new GitHub Actions workflow file to build the project using Maven.
2022-06-23 04:43:49 +00:00
Jaroslav Tulach
dc30e44b60
Register instruments/language in their own compilation units to fix the sbt build issues (#3509)
New plan to [fix the `sbt` build](https://www.pivotaltracker.com/n/projects/2539304/stories/182209126) and its annoying:
```
log.error(
"Truffle Instrumentation is not up to date, " +
"which will lead to runtime errors\n" +
"Fixes have been applied to ensure consistent Instrumentation state, " +
"but compilation has to be triggered again.\n" +
"Please re-run the previous command.\n" +
"(If this for some reason fails, " +
s"please do a clean build of the $projectName project)"
)
```
When it is hard to fix `sbt` incremental compilation, let's restructure our project sources so that each `@TruffleInstrument` and `@TruffleLanguage` registration is in individual compilation unit. Each such unit is either going to be compiled or not going to be compiled as a batch - that will eliminate the `sbt` incremental compilation issues without addressing them in `sbt` itself.

fa2cf6a33ec4a5b2e3370e1b22c2b5f712286a75 is the first step - it introduces `IdExecutionService` and moves all the `IdExecutionInstrument` API up to that interface. The rest of the `runtime` project then depends only on `IdExecutionService`. Such refactoring allows us to move the `IdExecutionInstrument` out of `runtime` project into independent compilation unit.
2022-06-13 14:09:08 +00:00
Kaz Wesley
8a50e8f930
Faster dev builds; tooling for measuring build times and app performance. (#3491)
- Change dev profile settings. Improves build performance; will not affect anything else. Details below.
- Introduce script for benchmarking various incremental builds. Usage is explained in the script comments.
- Add a line to `intervals` showing total main-thread CPU work logged in a profile; this can be used to compare the results of optimizations (I'll be starting a discussion informed by that data separately; this change just enables the tooling to report it).
2022-06-02 19:24:18 +00:00
Jaroslav Tulach
ab1ca54acd
Profile the language server (#3389)
In order to analyse why the `runner.jar` is slow to start, let's _"self sample"_ it using the [sampler library](https://bits.netbeans.org/dev/javadoc/org-netbeans-modules-sampler/org/netbeans/modules/sampler/Sampler.html). As soon as the `Main.main` is launched, the sampling starts and once the server is up, it writes its data into `/tmp/language-server.npss`.

Open the `/tmp/language-server.npss` with [VisualVM](https://visualvm.github.io) - you should have one copy in your
GraalVM `bin/jvisualvm` directory and there has to be a GraalVM to run Enso.

#### Changelog

- add: the `MethodsSampler` that gathers information in `.npss` format
- add: `--profiling` flag that enables the sampler
- add: language server processes the updates in batches
2022-05-10 12:44:05 +00:00
Hubert Plociniczak
4bbabc00be
Move Builtin Types and Methods to stdlib (#3363)
This PR replaces hard-coded `@Builtin_Method` and `@Builtin_Type` nodes in Builtins with an automated solution
that a) collects metadata from such annotations b) generates `BuiltinTypes` c) registers builtin methods with corresponding
constructors.
The main differences are:
1) The owner of the builtin method does not necessarily have to be a builtin type
2) You can now mix regular methods and builtin ones in stdlib 
3) No need to keep track of builtin methods and types in various places and register them by hand (a source of many typos or omissions as it found during the process of this PR)

Related to #181497846
Benchmarks also execute within the margin of error.

### Important Notes

The PR got a bit large over time as I was moving various builtin types and finding various corner cases.
Most of the changes however are rather simple c&p from Builtins.enso to the corresponding stdlib module.
Here is the list of the most crucial updates:
- `engine/runtime/src/main/java/org/enso/interpreter/runtime/builtin/Builtins.java` - the core of the changes. We no longer register individual builtin constructors and their methods by hand. Instead, the information about those is read from 2 metadata files generated by annotation processors. When the builtin method is encountered in stdlib, we do not ignore the method. Instead we lookup it up in the list of registered functions (see `getBuiltinFunction` and `IrToTruffle`)
- `engine/runtime/src/main/java/org/enso/interpreter/runtime/callable/atom/AtomConstructor.java` has now information whether it corresponds to the builtin type or not.
- `engine/runtime/src/main/scala/org/enso/compiler/codegen/RuntimeStubsGenerator.scala` - when runtime stubs generator encounters a builtin type, based on the @Builtin_Type annotation, it looks up an existing constructor for it and registers it in the provided scope, rather than creating a new one. The scope of the constructor is also changed to the one coming from stdlib, while ensuring that synthetic methods (for fields) also get assigned correctly
- `engine/runtime/src/main/scala/org/enso/compiler/codegen/IrToTruffle.scala` - when a builtin method is encountered in stdlib we don't generate a new function node for it, instead we look it up in the list of registered builtin methods. Note that Integer and Number present a bit of a challenge because they list a whole bunch of methods that don't have a corresponding method (instead delegating to small/big integer implementations).
During the translation new atom constructors get initialized but we don't want to do it for builtins which have gone through the process earlier, hence the exception
- `lib/scala/interpreter-dsl/src/main/java/org/enso/interpreter/dsl/MethodProcessor.java` - @Builtin_Method processor not only  generates the actual code fpr nodes but also collects and writes the info about them (name, class, params) to a metadata file that is read during builtins initialization 
- `lib/scala/interpreter-dsl/src/main/java/org/enso/interpreter/dsl/MethodProcessor.java` - @Builtin_Method processor no longer generates only (root) nodes but also collects and writes the info about them (name, class, params) to a metadata file that is read during builtins initialization
- `lib/scala/interpreter-dsl/src/main/java/org/enso/interpreter/dsl/TypeProcessor.java` - Similar to MethodProcessor but handles @Builtin_Type annotations. It doesn't, **yet**, generate any builtin objects.  It also collects the names, as present in stdlib, if any, so that we can generate the names automatically (see generated `types/ConstantsGen.java`)
- `engine/runtime/src/main/java/org/enso/interpreter/node/expression/builtin` - various classes annotated with @BuiltinType to ensure that the atom constructor is always properly registered for the builitn. Note that in order to support types fields in those, annotation takes optional `params` parameter (comma separated). 
- `engine/runtime/src/bench/scala/org/enso/interpreter/bench/fixtures/semantic/AtomFixtures.scala` - drop manual creation of test list which seemed to be a relict of the old design
2022-05-05 20:18:06 +02:00
Hubert Plociniczak
79c82da21c
Frgaal integration in sbt (#3421)
* Initial integration with Frgaal in sbt

Half-working since it chokes on generated classes from annotation
processor.

* Replace AutoService with ServiceProvider

For reasons unknown AutoService would fail to initialize and fail to
generate required builtin method classes.
Hidden error message is not particularly revealing on the reason for
that:
```
[error] error: Bad service configuration file, or exception thrown while constructing Processor object: javax.annotation.processing.Processor: Provider com.google.auto.service.processor.AutoServiceProcessor could not be instantiated
```

The sample records is only to demonstrate that we can now use newer Java
features.

* Cleanup + fix benchmark compilation

Bench requires jmh classes which are not available because we obviously
had to limit `java.base` modules to get Frgaal to work nicely.
For now, we default to good ol' javac for Benchmarks.
Limiting Frgaal to runtime for now, if it plays nicely, we can expand it
to other projects.

* Update CHANGELOG

* Remove dummy record class

* Update licenses

* New line

* PR review

* Update legal review

Co-authored-by: Radosław Waśko <radoslaw.wasko@enso.org>
2022-05-04 21:18:40 +02:00
James Dunkerley
a4dbc9a37b
Moving Aggregation to Java (#3364) 2022-04-04 09:12:48 +00:00
Dmitry Bushev
23e5216922
Fix docparser (#3370)
Changelog:
- fix the docparser case when there is an unclosed formatted section before a list
- add the test checking the doc generation on the stdlib
2022-03-31 04:44:34 +00:00
Edward Kmett
0c25ee736c
Upgrade Truffle and Graal to Version 21.3.0 (#3258) 2022-02-11 19:05:13 +03:00
Dmitry Bushev
ca0a6f0bf6
Update Scala to 2.13.7 (#3214) 2021-12-31 17:50:32 +03:00
Adam Obuchowicz
942464cbaf
Refactoring: merge utils into prelude; merge workspaces. (#3151) 2021-11-10 14:36:08 +01:00
Michał Wawrzyniec Urbańczyk
8fc51bfe44
Apply unified prettier style to engine codebase (#3145) 2021-11-08 16:45:29 +01:00
Marcin Kostrzewa
a81257b402
Google Spreadsheet Reading (#1976) 2021-09-03 21:41:12 +02:00
Marcin Kostrzewa
b73e5e84b3
Redshift Connector (#1985) 2021-09-02 11:28:49 +02:00
Radosław Waśko
826e28a149
Implement library/preinstall (Without Dependencies Yet) (#1972) 2021-08-27 14:01:13 +02:00
Radosław Waśko
0a60e5180a
Update Simple Library Server (#1952) 2021-08-18 10:01:28 +02:00
Radosław Waśko
fac0405fd0
Updating Editions (#1944) 2021-08-12 16:55:23 +02:00
Radosław Waśko
31167fd6ae
Revert "Revert "Library Publishing MVP (#1898)"" (#1933) 2021-08-09 16:00:04 +02:00
Ara Adkins
a7478bc573
Revert "Library Publishing MVP (#1898)"
This reverts commit 1bd4e5824e.
2021-07-26 10:32:19 +01:00
Radosław Waśko
1bd4e5824e
Library Publishing MVP (#1898) 2021-07-23 18:16:34 +02:00
Radosław Waśko
5e86343a9c
Make Legal Notices Order Deterministic (#1891) 2021-07-22 13:00:23 +02:00
Radosław Waśko
f3bc88b91e
Library Downloads MVP (#1885) 2021-07-22 08:24:06 +02:00
Dmitry Bushev
980ba8cb65
Add Reexport Field to Suggestions (#1793)
Add the reexport field to suggestions
2021-07-20 19:10:53 +03:00
Marcin Kostrzewa
f55d66cb2c
XLS(X) Reading (#1879) 2021-07-20 13:32:19 +02:00
Radosław Waśko
86fcd86055
New Language Server API Implementations / Mocks (#1875) 2021-07-17 16:49:51 +02:00
Radosław Waśko
399fa5edfe
Update Dockerfile for Integrating Editions with Cloud (#1848) 2021-07-12 13:58:13 +02:00
Radosław Waśko
042a0f81f1
Fix Nightly Workflows and Update Release Policy (#1845) 2021-07-10 01:10:31 +02:00
Radosław Waśko
b58e895b18
Editions Integration (#1832) 2021-07-08 15:38:20 +02:00
Maciej Mikołajek
520cd70d55
Documentation files on disk Part 1. (#1744) 2021-07-07 15:00:33 +02:00
Radosław Waśko
e58b5eb81d
Dynamically Loading Libraries (#1826) 2021-07-06 00:27:14 +02:00
Marcin Kostrzewa
334a022ffd
Import syntax including namespace (#1806) 2021-06-24 12:42:24 +02:00
Maciej Mikołajek
4173dd810f
Documentation in the Suggestions Database (#1791) 2021-06-22 14:44:48 +02:00
Radosław Waśko
1d124d7770
Libraries Repository (#1804) 2021-06-22 13:35:15 +02:00
Dmitry Bushev
6950888bb0
Update GraalVM in the runtime container (#1814) 2021-06-22 08:53:51 +01:00
Radosław Waśko
241a1e7d74
Define Editions (#1797) 2021-06-18 16:39:45 +02:00
Ara Adkins
a981e72fdf
Provide API access to the project name (#1759) 2021-05-27 16:13:52 +01:00
Ara Adkins
1bdf87ce76
Update the memory limit for Native Image (#1746) 2021-05-20 14:03:14 +01:00
Dmitry Bushev
6c084fc8ae
Add support for detailed logger configuration (#1745) 2021-05-19 09:02:32 +01:00
Radosław Waśko
a32ceb7bb8
Fix warnings in the legal review (#1743) 2021-05-14 19:20:13 +01:00
Ara Adkins
48bcebc723
Update to GraalVM 21.1.0 (#1738) 2021-05-14 13:08:39 +01:00
Radosław Waśko
c3e4901eb1
Add a workflow for building nightly releases (#1689) 2021-05-05 11:58:14 +01:00
Łukasz Olczak
17c6653206
Update the ensodev user ID for docker (#1681) 2021-04-15 11:15:17 +01:00
Dmitry Bushev
65e9cca5a4
Add Python and R to the GraalVM Bundle (#1644)
CI release pipeline is updated to install
python and R GraalVM components
2021-04-07 17:19:23 +03:00
Dmitry Bushev
534ed305fc
Image Processing Library Prototype (#1450)
Add the Standard.Image library.
2021-03-23 13:16:43 +03:00
Radosław Waśko
21f667323e
PostgreSQL Support in Database Library (#1565)
Co-authored-by: Marcin Kostrzewa <marckostrzewa@gmail.com>
2021-03-16 17:53:04 +01:00
Ara Adkins
96697ddc97
Fix a crash due to shadowed project names (#1571) 2021-03-16 12:45:19 +00:00
Radosław Waśko
5f8af886e5
Connection and Materialization in the Database Library (#1546) 2021-03-09 19:52:42 +01:00
Ara Adkins
2b4f0ef2ad
Bump scalac to 2.13.5 (#1531) 2021-03-01 16:35:57 +00:00
Radosław Waśko
6544c2478d
Implement the first part of the database library (#1475) 2021-02-25 13:48:18 +00:00
Ara Adkins
8ec2a92b77
Upgrade GraalVM to 21.0 (#1487) 2021-02-22 13:32:55 +00:00
Łukasz Olczak
f726cfe119
Docker refinement (#1420) 2021-01-25 21:26:46 +01:00
Łukasz Olczak
d257615ef1
Fix for SQLite DB busy error on Azure (#1395)
depending on an environmental variable is used either 
default locking mode or a mode that uses flock syscall
2021-01-19 12:07:17 +03:00
Radosław Waśko
10bccf6b56
Better component handling in the project manager (#1399) 2021-01-15 15:26:51 +00:00
Łukasz Olczak
291cbfa6ee
Runtime Containerisation (#1345) 2020-12-23 18:56:30 +01:00
Radosław Waśko
25561e4c8c
Project Manager Native Image (#1318) 2020-12-09 14:58:11 +01:00
Radosław Waśko
9e1b49d245
Forking Language Server in the Project Manager (#1305) 2020-12-02 16:56:47 +01:00
Radosław Waśko
4d5f794122
Integrating Runtime Version Manager with Project Manager (#1285)
Related to #1153, implements the first part of the integration, without the
parts that use the runner which will be done next.
Temporarily there are two logger implementations - this will be alleviated with
the next part - when and the direct classpath dependency on the language server
is removed.
2020-11-16 18:49:59 +01:00
Dmitry Bushev
670cffb380
Fix Storing the Runtime Types (#1271)
A bunch of improvements to the suggestions
system. Suggestions are extracted to the tree data
structure. The tree allows producing better diffs
between the file versions. And better diffs reduce
the number of updates that are sent to the IDE
after a file change, and consequently fix the
issue when the runtime type got overwritten with
the compile-time type.
2020-11-10 14:50:37 +03:00
Marcin Kostrzewa
150771c0e2
Simple CSV parser (#1268) 2020-11-05 16:53:50 +01:00
Radosław Waśko
35efd8ea55
Separate ComponentManager from Launcher (#1248) 2020-10-30 12:31:31 +01:00
Marcin Kostrzewa
207aaaccf5
Map Implementation (#1222) 2020-10-20 13:43:04 +02:00
Radosław Waśko
989aa4b7d7
Initial Legal Review (#1210)
The reports will now be sent to the legal team for review.
2020-10-19 10:50:12 +02:00
Marcin Kostrzewa
8668079337
Opt-in TCO (#1219) 2020-10-15 16:52:26 +02:00
Radosław Waśko
0a9e2a42ce
Automate License Information Gathering (#1198) 2020-10-09 16:19:58 +02:00
Radosław Waśko
2155fa8e88
Fallback for Launcher Upgrades (#1139) 2020-09-14 11:05:37 +02:00
Marcin Kostrzewa
4e337840cf
No Implicit Builtins (#1114) 2020-09-01 11:21:26 +02:00
Ara Adkins
f5ffbe8fa7
Add a markdown style guide (#1022) 2020-07-21 13:59:40 +01:00
Josef
f068509b2e
Automate the Rust Code Generation (#990) 2020-07-15 11:29:13 +02:00
Ara Adkins
919ffbdfac
Refactor the crate structure (#967) 2020-07-03 14:42:45 +01:00
Ara Adkins
94c7e77e03
Update references to Luna to be Enso (#931) 2020-06-24 12:07:24 +01:00
Radosław Waśko
1a6449d329
Migrate the REPL to the New Server (#827)
Also add language stack traces to the REPL.
2020-06-15 13:06:20 +02:00
Ara Adkins
8a99415a30
Fix warnings, docs, and repo structure (#651) 2020-04-14 17:00:51 +01:00