Commit Graph

244 Commits

Author SHA1 Message Date
Michał Wawrzyniec Urbańczyk
4de8e44871
Release process (#3909) 2022-12-02 02:56:22 +01:00
Michał Wawrzyniec Urbańczyk
e94352fdf3
Launch "Cancel Previous Runs" on GH-hosted runner (#3933) 2022-11-29 22:07:46 +01:00
Jaroslav Tulach
402ebb2f8e
Upgrade to GraalVM 22.3.0 (#3663)
Upgrading to GraalVM 22.3.0.

# Important Notes
- Removed all deprecated `FrameSlot`, and replaced them with frame indexes - integers.
- Add more information to `AliasAnalysis` so that it also gathers these indexes.
- Add quick build mode option to `native-image` as default for non-release builds
- `graaljs` and `native-image` should now be downloaded via `gu` automatically, as dependencies.
- Remove `engine-runner-native` project - native image is now build straight from `engine-runner`.
- We used to have `engine-runner-native` without `sqldf` in classpath as a workaround for an internal native image bug.
- Fixed chrome inspector integration, such that it shows values of local variables both for current stack frame and caller stack frames.
- There are still many issues with the debugging in general, for example, when there is a polyglot value among local variables, a `NullPointerException` is thrown and no values are displayed.
- Removed some deprecated `native-image` options
- Remove some deprecated Truffle API method calls.
2022-11-23 14:30:48 +00:00
Michał Wawrzyniec Urbańczyk
483028dbb0
Cloud dispatch & fixes (#3843)
This PR updates the build script:
* fixed issue where program version check was not properly triggering;
* improved `git-clean` command to correctly clear Scala artifacts;
* added `run.ps1` wrapper to the build script that works better with PowerShell than `run.cmd`;
* increased timeouts to work around failures on macOS nightly builds;
* replaced depracated GitHub Actions APIs (set-output) with their new equivalents;
* workaround for issue with electron builder (python2 lookup) on newer macOS runner images;
* GUI and backend dispatches to cloud were completed;
* release workflow allows creating RC releases.
2022-11-09 00:15:26 +01:00
Radosław Waśko
c1c9be2998
Update CODEOWNERS to avoid project files being owned by just one person (#3820)
Only exception: CI files, as no-one apart from @mwu-tow is currently modifying them anyway
2022-10-22 05:45:55 +00:00
Michał W. Urbańczyk
af3ebccb39 Updated the required changelog check. Removed dead config for release branches. 2022-10-10 23:43:46 +02:00
Michał Wawrzyniec Urbańczyk
ad69eeb4ad
Build script merge (#3743)
Merged the build script into main repository. Some related cleanups.
2022-10-10 23:38:48 +02:00
Dmitry Bushev
f168cd0758
Enable Junit reports for Scalatest (#3756)
Changelog
- enable graphical test results for Scalatest tests like we have for [stdlib tests](https://github.com/enso-org/enso/actions/runs/3180677675/jobs/5184855484)

# Important Notes
Sometimes the report is created on a different workflow, like [here](https://github.com/enso-org/enso/actions/runs/3196147595/jobs/5217691808). Turned out it is a [known](https://github.com/dorny/test-reporter/issues/67) issue in GitHub Actions https://github.com/orgs/community/discussions/24616
2022-10-07 02:36:07 +00:00
Kaz Wesley
44a031f9f0
Parser: Full constructor syntax for type definitions; Field syntax; Complex operator sections; Template functions; Text improvements; Operator methods; eliminate Unsupported; better ArgumentDefinitions (#3716)
I believe all parse failures remaining after these changes are because the new parser is intentionally stricter about some things. I'll be reviewing those failures and opening a bug to change the library/tests code.

Implements:
- https://www.pivotaltracker.com/story/show/182941610: full type def syntax
- https://www.pivotaltracker.com/story/show/182497490: field syntax
- https://www.pivotaltracker.com/story/show/182497395: complex operator sections
- https://www.pivotaltracker.com/story/show/182497236: template functions
- `codeRepr` without leading whitespace
- text literals: interpret escape sequences in lexer
- the multiline text-literal left-trim algorithm
- type operator-methods
- the `<=` operator is no longer treated as a modifier
- https://www.pivotaltracker.com/story/show/183315038: eliminate Unsupported
- use ArgumentDefinition for type constructor arguments
- more detailed ArgumentDefinition type
2022-10-05 04:45:31 +00:00
Jaroslav Tulach
3239815957
Registering SliceVectorMethodGen for reflection (#3737)
Each builtin `makeFunction` method has to be currently registered for reflection. Adding registration of `SliceVectorMethodGen` to make following example work ag

```bash
enso$ sbt engine-runner-native/buildNativeImage
enso$ ./runner --run engine/runner-native/src/test/resources/Factorial.enso 6
```

# Important Notes
Regression caused by #3724 - Once the above code is executed in the CI, we'll discover such breakages before integration.
2022-09-27 17:24:58 +00:00
Michał Wawrzyniec Urbańczyk
b9e6510a12
New CI labels. (#3736)
This PR adds two new labels to interact with CI systems:
* `CI: Keep up to date` tells mergify bot to auto-update the PR against develop but do not merge it. 
* `CI: No changelog needed` is meant to replace old `[ci no changelog needed]`
* `CI: Clean build required` marks PR as being incompatible with main development branch and will ensure that runners are cleaned before and after running jobs related to this PR.

Note that currently only first label is supported, others will follow with the build script update. However they need to be merged before, so I am able to develop and test them.
2022-09-23 23:05:27 +02:00
Dmitry Bushev
a2cae26310
Update SBT codeowners (#3730) 2022-09-22 09:45:59 +00:00
Michał Wawrzyniec Urbańczyk
10f45d7fd1
macOS Code Signing & Notarization (#3712)
This PR reenables code signing and notarization on macOS.

[ci no changelog needed]

# Important Notes
* electron-builder has been bumped, mostly to avoid missing Python issue. A workaround for a regression with Windows installer is provided as a patch.
2022-09-19 19:02:18 +00:00
Michał Wawrzyniec Urbańczyk
b8dd92e9dc
CI and build script update (#3677)
* added polyfill globals plugin to fix issue with missing types like Buffer that was affecting nightly releases;
* fixed exit code propagation for Windows build script wrapper;
* bumped the build script and refreshed the generated workflows.

Includes https://github.com/enso-org/ci-build/pull/8
2022-09-02 22:02:44 +02:00
Michał Wawrzyniec Urbańczyk
10e50c5d4a
CI Updates (ECR push and disabling integration tests) (#3672) 2022-08-28 14:44:10 +02:00
Hubert Plociniczak
63fecec3b1
Add Jaroslav as codeowner of interpreter dsl (#3666)
Requesting to add @JaroslavTulach as codeowner of our interpreter dsl.
2022-08-26 16:47:53 +00:00
Michał Wawrzyniec Urbańczyk
4537a4b57b
Adjusting CI / build configuration. (#3664)
* Downgrading the electron-builder to avoid https://github.com/electron-userland/electron-builder/issues/6865
* Removed "git clean" workaround from CI.
2022-08-25 00:46:36 +02:00
Michał Wawrzyniec Urbańczyk
2507a2049b
Code Signing on Windows (#3654)
This PR reenables code signing on Windows.
Each Windows package built on CI should be now signed.
Additionally, some refactorings were done around electron-builder config, so it is easier to use outside the build script and offers more configuration options.
2022-08-23 00:49:23 +02:00
Michał Wawrzyniec Urbańczyk
183d2ba35d
Follow-up update to exclude removed workflow from required checks. 2022-08-23 00:48:29 +02:00
Michał Wawrzyniec Urbańczyk
d5b16e45dc
Removed the outdated Legal Review workflow.
The legal review is already covered as part of the Engine CI check.
2022-08-22 22:02:05 +02:00
Jaroslav Tulach
a7bc3c6c89
Verify benchmarks compile and execute in the gate (#3640)
Execution of `sbt runtime/bench` doesn't seem to be part of the gate. As such it can happen a change into the Enso language syntax, standard libraries, runtime & co. can break the benchmarks suite without being noticed. Integrating such PR causes unnecessary disruptions to others using the benchmarks.

Let's make sure verification of the benchmarks (e.g. that they compile and can execute without error) is part of the CI.

# Important Notes
Currently the gate shall fail. The fix is being prepared in parallel PR - #3639. When the two PRs are combined, the gate shall succeed again.
2022-08-11 07:21:44 +00:00
Michał Wawrzyniec Urbańczyk
bd3b778721
Replace webpack with esbuild (#3592)
This PR replaces webpack with esbuild, as our bundler.

The change leads to out-of-the-box ~5x improvement in bundling times, reducing the latency in watch-based workflows. 
Along with this a new development server (with live reload capacity) has been introduced to support watch command.

[ci no changelog needed]

### Important Notes
* workflow for checking docs has been removed because it was using outdated prettier version and caused troubles; while the same check is performed in a better way by the GUI/Lint job.
* introduced little more typescript in the scripts in place of js, usually with minimal changes.
2022-08-10 03:41:44 +02:00
Adam Obuchowicz
8f3c5a01d3
Update CODEOWNERS (#3630) 2022-08-04 10:21:39 +00:00
Kaz Wesley
c525b201b9
Parser: don't panic for any standard library files (#3609) 2022-07-28 19:17:33 +02:00
Michał Wawrzyniec Urbańczyk
c6d0843a2c
Submodule CI issue workaround. (#3615) 2022-07-27 04:37:47 +02:00
Michał W. Urbańczyk
7e2998bd27 Cleaning the repository before build to avoid infinite sbt compilation issue. 2022-07-21 12:08:48 +02:00
Michał Wawrzyniec Urbańczyk
e29ac5a548
Update settings.yml
Docs check is superseded by the GUI's lint job.
2022-07-15 23:12:14 +02:00
Kaz Wesley
bc66078251
Parser: Transpile Rust AST types to Java types (#3555)
Implement generation of Java AST types from the Rust AST type definitions, with support for deserializing in Java syntax trees created in Rust.

### New Libraries

#### `enso-reflect`

Implements a `#[derive(Reflect)]` macro to enable runtime analysis of datatypes. Macro interface includes helper attributes; **the Rust types and the `reflect` attributes applied to them fully determine the Java types** ultimately produced (by `enso-metamodel`). This is the most important API, as it is used in the subject crates (`enso-parser`, and dependencies with types used in the AST). [Module docs](https://github.com/enso-org/enso/blob/wip/kw/parser/ast-transpiler/lib/rust/reflect/macros/src/lib.rs).

#### `enso-metamodel`

Provides data models for data models in Rust/Java/Meta (a highly-abstracted language-independent model--I have referred to it before as the "generic representation", but that was an overloaded term).

The high-level interface consists of operations on data models, and between them. For example, the only operations needed by [the binary that drives datatype transpilation](https://github.com/enso-org/enso/blob/wip/kw/parser/ast-transpiler/lib/rust/parser/generate-java/src/main.rs) are: `rust::to_meta`, `java::from_meta`, `java::transform::optional_to_null`, `java::to_syntax`.

The low-level interface consists of direct usage of the datatypes; this is used by [the module that implements some serialization overrides](https://github.com/enso-org/enso/blob/wip/kw/parser/ast-transpiler/lib/rust/parser/generate-java/src/serialization.rs) (so that the Java interface to `Code` references can produce `String`s on demand based on serialized offset/length pairs). The serialization override mechanism is based on customizing, not replacing, the generated deserialization methods, so as to be as robust as possible to changes in the Rust source or in the transpilation process.

### Important Notes

- Rust/Java serialization is exhaustively tested for structural compatibility. A function [`metamodel::meta::serialization::testcases`](https://github.com/enso-org/enso/blob/wip/kw/parser/ast-transpiler/lib/rust/metamodel/src/meta/serialization.rs) uses `reflect`-derived data to generate serialized representations of ASTs to use as test cases. Its should-accept cases cover every type a tree can contain; it also produces a representative set of should-reject cases. A Rust `#[test]` confirms that these cases are accepted/rejected as expected, and generated Java tests (see Binaries below) check the generated Java deserialization code against the same test cases.
- Deserializing `Code` is untested. The mechanism is in place (in Rust, we serialize only the offset/length of the `Cow`; in Java, during deserialization we obtain a context object holding a buffer for all string data; the accessor generated in Java uses the buffer and the offset/length to return `String`s), but it will be easier to test once we have implemented actually parsing something and instantiating the `Cow`s with source code.
- `#[tagged_enum]` [now supports](https://github.com/enso-org/enso/blob/wip/kw/parser/ast-transpiler/lib/rust/shapely/macros/src/tagged_enum.rs#L36-L51) control over what is done with container-level attributes; they can be applied to the container and variants (default), only to the container, or only to variants.
- Generation of `sealed` classes is supported, but currently disabled by `TARGET_VERSION` in `metamodel::java::syntax` so that tests don't require Java 15 to run. (The same logic is run either way; there is a shallow difference in output.)

### Binaries

The `enso-parser-generate-java` crate defines several binaries:
- `enso-parser-generate-java`: Performs the transpilation; after integration, this will be invoked by the build script.
- `java-tests`: Generates the Java code that tests format deserialization; after integration this command will be invoked by the build script, and its Java output compiled and run during testing.
- `graph-rust`/`graph-meta`/`graph-java`: Produce GraphViz representations of data models in different typesystems; these are for developing and understanding model transformations. 

Until integration, a **script regenerates the Java and runs the format tests: `./tools/parser_generate_java.sh`**. The generated code can be browsed in `target/generated_java`.
2022-07-07 04:46:42 +02:00
Michał Wawrzyniec Urbańczyk
b5c8296aaf
Build script bump & benchmark workflow (#3563) 2022-07-05 22:03:29 +02:00
Michał Wawrzyniec Urbańczyk
2b07e4ddbc
Update settings.yml
Project Manager -> Backend
2022-07-03 17:19:54 +02:00
Michał Wawrzyniec Urbańczyk
1dc4f56f50
Update settings.yml
Engine job names.
2022-07-03 17:16:23 +02: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
James Dunkerley
a0c6fa9c96
Removing old functions and tidy up of Table types (#3519)
- Removed `select` method.
- Removed `group` method.
- Removed `Aggregate_Table` type.
- Removed `Order_Rule` type.
- Removed `sort` method from Table.
- Expanded comments on `order_by`.
- Update comment on `aggregate` on Database.
- Update Visualisation to use new APIs.
- Updated Data Science examples to use new APIs.
- Moved Examples test out of Tests to own test.

# Important Notes
Need to get Examples_Tests added to CI.
2022-06-14 13:37:20 +00:00
Kaz Wesley
a1bf0974ce
Better release build time; new maximum-performance production profile. (#3498)
### Pull Request Description

Using the new tooling (#3491), I investigated the **performance / compile-time tradeoff** of different codegen options for release mode builds. By scripting the testing procedure, I was able to explore many possible combinations of options, which is important because their interactions (on both application performance and build time) are complex. I found **two candidate profiles** that offer specific advantages over the current `release` settings (`baseline`):
- `thin16`: Supports incremental compiles in 1/3 the time of `baseline` in common cases. Application runs about 2% slower than `baseline`.
- `fat1-O4`: Application performs 13% better than `baseline`. Compile time is almost 3x `baseline`, and non-incremental.  
(See key in first chart for the settings defining these profiles.)

We can build faster or run faster, though not in the same build. Because the effect sizes are large enough to be impactful to developer and user experience, respectively, I think we should consider having it both ways. We could **split the `release` profile** into two profiles to serve different purposes:
- `release`: A profile that supports fast developer iteration, while offering realistic performance.
- `production`: A maximally-optimized profile, for nightly builds and actual releases.

Since `wasm-pack` doesn't currently support custom profiles (rustwasm/wasm-pack#1111), we can't use a Cargo profile for `production`; however, we can implement our own profile by overriding rustc flags.

### Performance details

![perf](https://user-images.githubusercontent.com/1047859/170788530-ab6d7910-5253-4a2b-b432-8bfa0b4735ba.png)

As you can see, `thin16` is slightly slower than `baseline`; `fat1-O4` is dramatically faster.

<details>
  <summary>Methodology (click to show)</summary>

I developed a procedure for benchmarking "whole application" performance, using the new "open project" workflow (which opens the IDE and loads a complex project), and some statistical analysis to account for variance. To gather this data:

Build the application with profiling:
`./run.sh ide build --profiling-level=debug`

Run the `open_project` workflow repeatedly:
`for i in $(seq 0 9); do dist/ide/linux-unpacked/enso --entry-point profile --workflow open_project --save-profile open_project_thin16_${i}.json; done`

For each profile recorded, take the new `total_self_time` output of the `intervals` tool; gather into CSV:
`echo $(for i in $(seq 0 9); do target/rust/debug/intervals < open_project_thin16_${i}.json | tail -n1 | awk '{print $2}'; do`
(Note that the output of intervals should not be considered stable; this command may need modification in the future. Eventually it would be nice to support formatted outputs...)

The data is ready to graph. I used the `boxplot` method of the [seaborn](https://seaborn.pydata.org/index.html) package, in order to show the distribution of data.
</details>

#### Build times
![thin16](https://user-images.githubusercontent.com/1047859/170788539-1578e41b-bc30-4f30-9b71-0b0181322fa5.png)

In the case of changing a file in `enso-prelude`, with the current `baseline` settings rebuilding takes over 3 minutes. With the `thin16` settings, the same rebuild completes in 40 seconds.

(To gather this data on different hardware or in the future, just run the new `bench-build.sh` script for each case to be measured.)
2022-06-11 00:09:54 +02:00
Michał Wawrzyniec Urbańczyk
654793c246
Make formatting check a required one. 2022-06-09 19:11:25 +02: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
Hubert Plociniczak
9e92694dfc
Create non-existent directories in curl (#3506)
Got annoyed by all those FP notifications I get for legacy CI build.
Either this, or we turn it off please.
2022-06-02 16:11:25 +02:00
Michał Wawrzyniec Urbańczyk
6fc4947764
Bumped the build script (#3489)
* The bash entry point was renamed `run.sh` -> `run`. Thanks to that `./run` works both on Linux and Windows with PowerShell (sadly not on CMD). 
* Everyone's favorite checks for WASM size and program versions are back. These can be disabled through `--wasm-size-limit=0` and `--skip-version-check` respectively. WASM size limit is stored in `build-config.yaml`.
* Improved diagnostics for case when downloaded CI run artifact archive cannot be extracted. 
* Added GH API authentication to the build script calls on CI. This should fix the macOS build failures that were occurring from time to time. (Actually they were due to runner being GitHub-hosted, not really an OS-specific issue by itself.)
* If the GH API Personal Access Token is provided, it will be validated. Later on it is difficult to say, whether fail was caused by wrong PAT or other issue.
* Renamed `clean` to `git-clean` as per suggestion to reduce risk of user accidently deleting unstaged work. 
* Whitelisting dependabot from changelog checks, so PRs created by it are mergeable.
* Fixing issue where wasm-pack-action (third party) randomly failed to recognize the latest version of wasm-pack (macOS runners), leading to failed builds.
* Build logs can be filtered using `ENSO_BUILD_LOG` environment variable. See https://docs.rs/tracing-subscriber/0.3.11/tracing_subscriber/struct.EnvFilter.html#directives for the supported syntax.
* Improve help for ci-run source, to make clear that PAT token is required and what scope is expected there.

Also, JS parts were updated with some cleanups and fixes following the changes made when introducing the build script.
2022-06-01 13:44:40 +02:00
Michał Wawrzyniec Urbańczyk
42d82bd8b7
Added a missing checkout step for changelog assertion. (#3481) 2022-05-25 11:38:40 +02:00
Michał Wawrzyniec Urbańczyk
f5f6d264dd
Fix changelog assertion (#3479) 2022-05-25 03:19:45 +02:00
Michał Wawrzyniec Urbańczyk
818a0651ea
Update settings.yml 2022-05-24 23:13:06 +02:00
Michał Wawrzyniec Urbańczyk
297ef4251c
Update the required CI checks list. 2022-05-24 07:24:58 +02:00
Michał Wawrzyniec Urbańczyk
14a01c4635
New IDE build script (#3466) 2022-05-23 04:16:04 +02:00
Radosław Waśko
a32644dd85
Make it possible to run Enso with assertions enabled (#3450)
Before, when running Enso with `-ea`, some assertions were broken and the interpreter would not start.

This PR fixes two very minor bugs that were the cause of this - now we can successfully run Enso with `-ea`, to test that any assertions in Truffle or in our own libraries are indeed satisfied.

Additionally, this PR adds a setting to SBT that ensures that IntelliJ uses the right language level (Java 17) for our projects.
2022-05-13 15:38:52 +00:00
Jaroslav Tulach
b037da08a7
Expanding list of engine code owners (#3443) 2022-05-10 11:03:32 +03:00
Hubert Plociniczak
63ff67b621
Add formatting checks for Scala and Java (#3394) 2022-04-20 16:11:24 +02:00
Michael Mauderer
24e0f33d8e
Backend Communication Profiling (#3382) 2022-04-19 13:30:29 +02:00
Radosław Waśko
20be5516a5
Aggregates in the Database library - MVP (#3353)
Implements infrastructure for new aggregations in the Database. It comes with only some basic aggregations and limited error-handling. More aggregations and problem handling will be added in subsequent PRs.

# Important Notes
This introduces basic aggregations using our existing codegen and sets-up our testing infrastructure to be able to use the same aggregate tests as in-memory backend for the database backends.

Many aggregations are not yet implemented - they will be added in subsequent tasks.

There are some TODOs left - they will be addressed in the next tasks.
2022-03-28 15:51:37 +00:00
Kaz Wesley
a87b2021a3
Profiling application details (#3332)
* Profiling application details

Add enough profiling to account for every missed frame during startup.

See https://www.pivotaltracker.com/story/show/181499507

* Build ActiveInterval hierarchy in profiler_data

* update doctests / await_!

* docs/formatting/naming

* more graph modes

* increase WASM size

Due to new render-profile-flamegraph scene. We should remove these from the main release WASM blob one way or another.

* lint

* fix a test

* Organization (feedback)

* Add @wdanilo to Cargo.lock CODEOWNERS

As discussed after my previous PR got stuck waiting for Cargo.lock review.

* fix doctests

* Update docs. Removed a limitation.
2022-03-21 11:09:56 -07:00