Commit Graph

2060 Commits

Author SHA1 Message Date
James Dunkerley
9578dc1e43
Move write_bytes to be part of Vector. (#3583)
Updates `write_bytes` API to be part of `Vector` and to conform to `write` APIs.

# Important Notes
Ensures doesn't touch the file if an invalid byte array.
2022-07-14 11:30:40 +00:00
Dmitry Bushev
2c780ef6ba
Add command for changing expression value (#3562)
Implement `text/applyExpressionValue` command.
2022-07-13 15:59:47 +00:00
Michael Mauderer
807d970d75
Implement saving of the pre-edit expression in the node metadata. (#3584)
Implements https://www.pivotaltracker.com/story/show/182633483

Adds functionality to the Searcher Controller to save the expression of a node to its metadata, while it is edited. In later PRs this will be used to restore the expression, if an edit is aborted. This will be needed, as the expression will be changed within the source while editing to allow the visualization preview to be shown. As of this PR, the information is only stored, not used yet.

Demo Video
------------------
Note how the metadata of the node includes a `edit_status` field, when the project is saved during editing, and how it is cleared when saving without an edit happening.

https://user-images.githubusercontent.com/1428930/178740111-d0bbaa43-00b0-42e3-9fbb-d9249f07ae35.mp4

# Important Notes
[ci no changelog needed]
2022-07-13 14:33:04 +00:00
James Dunkerley
e41936f436
Additional tests for Excel Append (#3580)
Add some additional scenarios to Excel append tests:
- Non-A1 start
- Name duplication
- Hitting another range

# Important Notes
Also fixed a warning in the Image library.
2022-07-13 13:02:39 +00:00
James Dunkerley
73e9240a11
Remove here. from Javascript code. (#3577)
Visualization within the UI is no longer working since the removal of the `here` keyword.
This PR fixes the JavaScript calls.

# Important Notes
There are various lines of rust code which still have `here.` within them and these will need to be fixed at some point.
2022-07-12 13:34:37 +00:00
Hubert Plociniczak
df0ddf7c0b
Print final test report at the end (#3579)
The option asks to print a final test report for each projects at the
end `sbt> run`.
That way, when running the task in aggregate mode, we have a summary at
the end, rather than somewhere in the large output of the individual
subproject.
2022-07-12 12:58:41 +00:00
Michael Mauderer
ca034484b4
Component List Panel View Acceptance Fixes (#3576)
Updates the Component List Panel View to resolve issues spotted during acceptance review:
* order between "Local Scopes" and "Favourites Section" is switched.
* Headers in demo scenes now include a number indicating the index

https://user-images.githubusercontent.com/1428930/178252570-21405174-2a0f-4f58-8033-6a1a0055a16e.mp4

# Important Notes
[ci no changelog needed]
2022-07-12 10:06:36 +00:00
Mateusz Czapliński
c1aa4aac87
Embedded-fonts crate should contain constants with font names. (#3403)
Add constants for font names. This reduces the number of "magic strings" and helps avoid typos in font names in the codebase.

https://www.pivotaltracker.com/story/show/181908872

[ci no changelog needed]
2022-07-12 09:05:10 +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
Jaroslav Tulach
891eef0f92
Cannot debug recursive/infinite structure (#3556)
There is an Unsafe.set_atom_field operation in Standard library. That operation allows one to create an infinite data structure. Store following program in ones.enso:
```
import Standard.Base.IO
import Standard.Base.Runtime.Unsafe

type Gen
type Empty
type Generator a:Int tail:Gen

ones : Gen
ones =
g = Generator 1 Empty
Unsafe.set_atom_field g 1 g
g

main =
IO.println here.ones
```

running such program then leads to (probably expectable) stack overflow exception:
```
Execution finished with an error: Resource exhausted: Stack overflow
at <enso> Any.to_text(Internal)
...
at <enso> Any.to_text(Internal)
at <enso> Any.to_text(Internal)
at <enso> Any.to_text(Internal)
at <enso> IO.println(Internal)
at <enso> g.main(g.enso:15:5-24)
```
However the bigger problem is that it also crashes our debugger. While producing guest Stack overflow when the guest program is running maybe OK, crashing the engine doesn't seem tolerable.

Try:
```
enso-engine-0.0.0-dev-linux-amd64/enso-0.0.0-dev/bin/enso --inspect --run ones.enso
```
and navigate Chrome dev tools to the line 11 as shown on the attached picture.

Stepping over that line generates following error:
```
at org.enso.interpreter.runtime.callable.atom.Atom.toString(Atom.java:84)
at org.enso.interpreter.runtime.callable.atom.Atom.lambda$toString$0(Atom.java:79)
at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:195)
at java.base/java.util.Spliterators$ArraySpliterator.forEachRemaining(Spliterators.java:948)
at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484)
at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474)
at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:913)
at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at java.base/java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:578)
```
Stack overflow in the engine when computing `Atom.toString()` - I want to prevent that.

# Important Notes
I am able to see a stacktrace in the debugger and I can _step in_ and _step over_, @kustosz:

![image](https://user-images.githubusercontent.com/26887752/176626989-fdc2979e-f86c-42bc-a4df-c533cf7a4839.png)

However there are extra items like `case_branch` which I'd like to avoid, would you know how to do that?
2022-07-11 13:03:19 +00:00
Radosław Waśko
df10e4ba7c
Add appending support for Delimited files (#3573)
Implements https://www.pivotaltracker.com/story/show/182309839
2022-07-11 12:36:01 +00:00
Dmitry Bushev
b59a496589
Create execution context with provided id (#3575) 2022-07-11 14:59:38 +03:00
Jaroslav Tulach
735053c218
Implementing basic functions (#3554)
The language specification suggests to add [five basic functions into the standard library](https://github.com/enso-org/design/blob/wip/wd/enso-spec/epics/enso-spec-1.0/05.%20Functions.md#useful-functions-in-the-standard-library). `identity`, `flip`, `const`, `curry` & `uncurry`.

# Important Notes
The new functions are being added into existing `Function.enso` file. That may not be the best place, but it is not clear from the [design spec](https://github.com/enso-org/design/blob/wip/wd/enso-spec/epics/enso-spec-1.0/05.%20Functions.md#useful-functions-in-the-standard-library) how they are supposed to be imported. I can move them wherever needed.

There is a documentation provided for each of the functions, but I am not sure how to verify it is correct. Do we generate the documentation for stdlib somehow?
2022-07-11 10:30:44 +00:00
Radosław Waśko
28513a3389
Allow filtering caught error type in Error.catch (#3574)
More and more often I need a way to only recover a specific type of a dataflow error (in a similar manner as with panics). So the API for `Error.catch` has been amended to more closely resemble `Panic.catch`, allowing to handle only specific types of dataflow errors, passing others through unchanged. The default is `Any`, meaning all errors are caught by default, and the behaviour of `x.catch` remains unchanged.
2022-07-11 08:26:44 +00:00
Mateusz Czapliński
ec5cd01dfa
Fix vertical alignment of short columns in Component Browser Local Scope (#3566)
Fix vertical alignment of columns in the Local Scope section of the Component Browser. All columns are now bottom-aligned and their entries align vertically. Previously, shorter columns were vertically centered and their entries did not align vertically with entries in longer columns.

https://www.pivotaltracker.com/story/show/180892146/comments/232101261 (see: *"Entries in the rightmost column of Local Scope is not vertically aligned with entries in other columns."*).

#### Visuals

Before:

<img width="626" alt="Screenshot 2022-07-06 at 18 14 18" src="https://user-images.githubusercontent.com/273837/177596439-cbe29a3a-2600-4b99-be20-955bf9fabd6e.png">


After:

<img width="626" alt="Screenshot 2022-07-06 at 18 08 27" src="https://user-images.githubusercontent.com/273837/177596072-1f3fd652-fe36-42c2-957c-4584b68539b4.png">
2022-07-07 22:59:51 +00:00
Kaz Wesley
100eeda673
Simple assignments and function definitions (#3572)
implement simple variable assignments and function definitions.

This implements:
- https://www.pivotaltracker.com/story/show/182497122
- https://www.pivotaltracker.com/story/show/182497144 (the code blocks are not created yet, but the function declaration is recognized.)

# Important Notes
- Introduced S-expression-based tests, and pretty-printing-roundtrip testing.
- Started writing tests for TypeDef based on the examples in the issue. None of them parse successfully.
- Fixed Number tokenizing.
- Moved most contents of parser's `main.rs` to `lib.rs` (fixes a warning).
2022-07-07 22:31:00 +00:00
Radosław Waśko
d8dddf40c6
Fix Meta.Polyglot.get_language (#3568) 2022-07-07 13:29:38 +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
Hubert Plociniczak
96e50648dd
Remove 'here' and make method name resolution case-sensitive (#3538)
Modified UppercaseNames to now resolve methods without an explicit `here` to point to the current module.
`here` was also often used instead of `self` which was allowed by the compiler.
Therefore UppercaseNames pass is now GlobalNames and does some extra work -
it translated method calls without an explicit target into proper applications.

# Important Notes
There was a long-standing bug in scopes usage when compiling standalone expressions.
This resulted in AliasAnalysis generating incorrect graphs and manifested itself only in unit tests
and when running `eval`, thus being a bit hard to locate.
See `runExpression` for details.

Additionally, method name resolution is now case-sensitive.

Obsolete passes like UndefinedVariables and ModuleThisToHere were removed. All tests have been adapted.
2022-07-07 10:31:06 +00:00
Mateusz Czapliński
dcd084eb07
Fix colors in Component List Panel View (#3565)
Fixes missing colors in the `component_list_panel_view` demo scene.

https://www.pivotaltracker.com/story/show/180892146/comments/232101261 (see: *"2. All groups in the demo scene look gray."*).

#### Visuals

Before:

<img width="450" alt="Screenshot 2022-07-06 at 16 07 29" src="https://user-images.githubusercontent.com/273837/177569995-e293ac58-69de-4fd3-bae6-22883047ae89.png">
<img width="441" alt="Screenshot 2022-07-06 at 16 08 06" src="https://user-images.githubusercontent.com/273837/177570026-e09c3b27-023d-4f56-9bd0-50ef3e8d225b.png">

After (the component groups are randomized in the demo scene, so the column heights may not align with the "before" screenshots):

<img width="445" alt="Screenshot 2022-07-06 at 16 02 04" src="https://user-images.githubusercontent.com/273837/177570107-accc94ed-42b3-465b-93d6-271914377e91.png">
<img width="459" alt="Screenshot 2022-07-06 at 16 02 28" src="https://user-images.githubusercontent.com/273837/177570213-18b94f7e-23d8-4d29-b15d-ccfdd9c41e07.png">
2022-07-07 08:29:55 +00:00
James Dunkerley
16e6f2fa08
Adding Append support to Excel.Write (#3558)
Adds support for appending to an existing Excel table.

# Important Notes
- Renamed `Column_Mapping` to `Column_Name_Mapping`
- Changed new type name to `Map_Column`
- Added last modified time and creation time to `File`.
2022-07-07 06:41:33 +00: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
Radosław Waśko
7c94fa6a77
Custom Encoding support when writing Delimited files (#3564)
Implements https://www.pivotaltracker.com/story/show/182545847
2022-07-07 00:20:00 +00:00
Mateusz Czapliński
d950499a90
Pan camera to created nodes. (#3552)
If a node created by the user gets placed off-screen, the screen's camera is panned to make the node visible.

https://www.pivotaltracker.com/story/show/181188687

#### Visuals

A screencast showing a number of node creation scenarios when the camera is panned to the newly created node, including when zoomed out.



https://user-images.githubusercontent.com/273837/177169716-50a12b0a-c742-4b01-9766-56206e7938b9.mov

# Important Notes
- Camera is panned also if the node is only partially visible, or if there's not enough free space visible around the node. The specific amount of free space that needs to be visible around a newly created node is configured in the theme.
- If the screen area is so small that the node cannot be fully fit in it (either horizontally or vertically), showing the left and top boundaries of the node's area takes priority over showing the corresponding opposite edges.
2022-07-06 10:33:35 +00:00
Michał Wawrzyniec Urbańczyk
b5c8296aaf
Build script bump & benchmark workflow (#3563) 2022-07-05 22:03:29 +02:00
Dmitry Bushev
509663f7ab
Disable flaky create_process test (#3561) 2022-07-05 11:25:47 +03:00
James Dunkerley
5174cc6ece
Update Database.connect to match new API (#3542)
Initial work restructuring the `Database.connect` API
- New SQLite API with support for InMemory.
- Updated PostgreSQL API with SSL and Client Certificate Support.
- Updated Redshift API.

# Important Notes
Follow up tasks:
- PostgreSQL SSL additional testing.
- Driver version updating.
- `.pgpass` support.
2022-07-04 20:26:44 +00:00
Michael Mauderer
1b0312b446
Avoid patching the file msdfgen_wasm.js more than once. (#3560)
Adds a fix for a build issue where the `msdfgen_wasm.js` file gets patched multiple times, which breaks the build.
[ci no changelog needed]
2022-07-04 19:07:52 +00:00
James Dunkerley
4ca2097488
Adding write support to File_Format.Excel (#3551)
Support for writing tables to Excel.

# Important Notes
Has custom support for Error mode as will allow appending a new table in this mode to the file.
2022-07-04 18:32:16 +00:00
Mateusz Czapliński
2b2563a395
Implement trivial placeholder icons for all 5 Component Browser entry kinds. (#3557)
Implement simple placeholder icons for all entry kinds supported in the Suggestion Database. The icons are planned to be used in Component Browser as default icons for entries. This is intended to allow visually distinguishing different entry kinds.

The following additional fixes and tweaks are applied:
 - Icons previously using only 1 color from the theme now use the color provided through shape parameters instead.
 - The `data_science` and `network` icons now use only the 2 colors provided through shape parameters.
 - The `join` icon has its shape and colors modified and uses only the 2 colors provided through shape parameters.
 - The demo scene now parametrizes icon shapes using colors from the Component Browser Design Doc.

https://www.pivotaltracker.com/story/show/182584322

#### Visuals

Original contents of the demo scene before the PR:

<img width="2197" alt="x-orig" src="https://user-images.githubusercontent.com/273837/176669422-ee2e14c7-9ef4-42fd-acb7-ae3be6b68587.png">



Final contents of the demo scene after the PR:

<img width="2201" alt="x2-final" src="https://user-images.githubusercontent.com/273837/176668720-6f1685fd-f7e6-44d7-85f5-f6a6d6789644.png">
2022-07-04 16:36:27 +02:00
Michael Mauderer
e6b7d5b8fc
List Panel View Part 2 (#3537)
Design, integration and bugfix update for the List Panel View.

![image](https://user-images.githubusercontent.com/1428930/175554745-c4887d55-a885-4299-878b-4727f09a7520.png)

![image](https://user-images.githubusercontent.com/1428930/175554906-837db815-948d-4407-8233-10a15e4198b3.png)

![image](https://user-images.githubusercontent.com/1428930/175555165-bcbe5138-8e5c-416e-886b-c72df361d743.png)


[ci no changelog needed]
2022-07-04 14:08:31 +00: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
Wojciech Daniło
7c0330290f
Parser improvements (#3549) 2022-07-01 05:42:29 +02:00
Michał Wawrzyniec Urbańczyk
43a893cae6
Bump the build script (#3535) 2022-07-01 03:58:14 +02:00
Mateusz Czapliński
d689777d7a
Local Scope entries in new Hierarchical Action List. (#3526)
Make the local scope components available to the Component Browser through `component::List` (previously known as "Hierarchical Action List"). (See the [Local Scope Section in the Design Doc](https://github.com/enso-org/design/blob/main/epics/component-browser/design.md#local-scope-section) for more details.)

https://www.pivotaltracker.com/story/show/181869186

# Important Notes
- Note: the PR description does not include a screencast due to the changes in this PR not having any visual effect at this moment. The result of this PR's changes would be only observed in the Component Browser, but the Component Browser is not merged yet. As described in the task's Acceptance Criteria, the changes in this PR are currently only covered by tests.
- The `component::group::Data::new_empty_visible` constructor was renamed to `from_name_and_id` and changed to set the `visible` field to a default value. All known code paths appear to call the `update_sorting_and_visibility` method before checking the value of the `visible` field, so setting the value to `true` when creating the object does not seem needed.

[ci no changelog needed]
2022-06-29 15:46:56 +00:00
Dmitry Bushev
9d76ba9284
Fix GitHub Releases Lookup (#3550)
GitHub CI creates releases without `enso-` prefix, while enso ecosystem uses tags with the prefix.
2022-06-28 14:18:31 +00:00
Jaroslav Tulach
abc2d37b12
Disable MultiTier compilation in benchmarks (#3548)
Truffle is using [MultiTier compilation](190e0b2bb7) by default since 21.1.0. That mean every `RootNode` is compiled twice. However benchmarks only care about peak performance. Let's return back the previous behavior and compile only once after profiling in interpreter.

# Important Notes
This change does not influence the peak performance. Just the amount of IGV graphs produced from benchmarks when running:
```
enso$ sbt  "project runtime" "withDebug --dumpGraphs benchOnly -- AtomBenchmark"
```
is cut to half.
2022-06-28 04:55:12 +00:00
Jaroslav Tulach
096d8fdca0
Avoid crashing the engine when JS debugger statement is used (#3547)
Try following enso program:
```
main =
here.debug

foreign js debug = """
debugger;

```
it crashes the engine with exception:
```
Execution finished with an error: java.lang.ClassCastException: class com.oracle.truffle.js.runtime.builtins.JSFunctionObject$Unbound cannot be cast to class org.enso.interpreter.runtime.callable.CallerInfo (com.oracle.truffle.js.runtime.builtins.JSFunctionObject$Unbound and org.enso.interpreter.runtime.callable.CallerInfo are in unnamed module of loader com.oracle.graalvm.locator.GraalVMLocator$GuestLangToolsLoader @55cb6996)
at <java> org.enso.interpreter.runtime.callable.function.Function$ArgumentsHelper.getCallerInfo(Function.java:352)
at <java> org.enso.interpreter.instrument.ReplDebuggerInstrument$ReplExecutionEventNodeImpl.onEnter(ReplDebuggerInstrument.java:179)
at <java> org.graalvm.truffle/com.oracle.truffle.api.instrumentation.ProbeNode$EventProviderChainNode.innerOnEnter(ProbeNode.java:1397)
at <java> org.graalvm.truffle/com.oracle.truffle.api.instrumentation.ProbeNode$EventChainNode.onEnter(ProbeNode.java:912)
at <java> org.graalvm.truffle/com.oracle.truffle.api.instrumentation.ProbeNode.onEnter(ProbeNode.java:216)
at <java> com.oracle.truffle.js.nodes.JavaScriptNodeWrapper.execute(JavaScriptNodeWrapper.java:44)
at <java> com.oracle.truffle.js.nodes.control.DiscardResultNode.execute(DiscardResultNode.java:88)
at <java> com.oracle.truffle.js.nodes.function.FunctionBodyNode.execute(FunctionBodyNode.java:73)
at <java> com.oracle.truffle.js.nodes.JavaScriptNodeWrapper.execute(JavaScriptNodeWrapper.java:45)
at <java> com.oracle.truffle.js.nodes.function.FunctionRootNode.executeInRealm(FunctionRootNode.java:150)
at <java> com.oracle.truffle.js.runtime.JavaScriptRealmBoundaryRootNode.execute(JavaScriptRealmBoundaryRootNode.java:93)
at <js> <js> poly_enso_eval(Unknown)
at <epb> <epb> null(Unknown)
at <enso> Prg.debug(Prg.enso:27-28)
```
2022-06-25 05:58:24 +00:00
Hubert Plociniczak
8f9a0b33d5
Fix System.nanoTime definition (#3543)
While redesigning builtins a bug was accidentally introduced.
Stumbled upon accidentally while trying to run `test/Benchmarks`.
2022-06-24 10:46:31 +00:00
Radosław Waśko
972b34d1a9
Implement value formatting and writing new files in Delimited format. (#3528)
Implements https://www.pivotaltracker.com/story/show/182309429 and https://www.pivotaltracker.com/story/show/182309573
2022-06-23 16:51:52 +00:00
Dmitry Bushev
206933ec57
Implement execute parameter of applyEdit command (#3541)
PR implements new `execute` parameter designed in #3532. It allows IDE to control the execution after applying edits to files.
2022-06-23 15:33:45 +00:00
Jaroslav Tulach
de89673e8f
Fix broken AtomBenchmarks (#3546)
`AtomBenchmarks` are broken since the introduction of [micro distribution](https://github.com/enso-org/enso/pull/3531). The micro distribution doesn't contain `Range` and as such one cannot use `1.up_to` method.

# Important Notes
I have rewritten enso code to manual `generator`. The results of the benchmark seem comparable. Executed as:
```
sbt:runtime> benchOnly AtomBenchmarks
```
2022-06-23 13:52:46 +00:00
Jaroslav Tulach
d0124fbb02
Fail bin/enso --run when there is an error in the script (#3544)
I was modifying `Date_Spec.enso` today and made a mistake. When executing with I could see the error, but the process got stuck...
```
enso/test/Tests/src/Data/Time$ ../../../../built-distribution/enso-engine-0.0.0-dev-linux-amd64/enso-0.0.0-dev/bin/enso --run Date_Spec.enso In module Date_Spec:
Compiler encountered warnings:
Date_Spec.enso[14:29-14:37]: Unused function argument parseDate.
Compiler encountered errors:
Date_Spec.enso[18:13-18:20]: Variable `debugger` is not defined.
Exception in thread "main" Compilation aborted due to errors.
at org.graalvm.sdk/org.graalvm.polyglot.Value.invokeMember(Value.java:932)
at org.enso.polyglot.Module.getAssociatedConstructor(Module.scala:19)
at org.enso.runner.Main$.runMain(Main.scala:755)
at org.enso.runner.Main$.runSingleFile(Main.scala:695)
at org.enso.runner.Main$.run(Main.scala:582)
at org.enso.runner.Main$.main(Main.scala:1031)
at org.enso.runner.Main.main(Main.scala)
^C
```
...had to kill it with Ctrl-C. This PR fixes the problem by moving `getAssociatedConstructor` call into `try` block, catching the exception and exiting properly.
2022-06-23 11:16:20 +00: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
Michael Mauderer
655793aa78
Component List Panel View (#3495) 2022-06-22 16:39:32 +01:00
James Dunkerley
7a2d304fa0
Update Excel reading API (#3523)
- Remove `from_xls` and `from_xlsx`.
- Add `headers` support to `File_Format.Excel`.
- Altered default read for Excel to be the first sheet.
- Altered behavior so that single cells grow down and right when reading sheet.
- Altered `Excel_Range` so knows if single cell or 1x1 range address.

# Important Notes
- Renamed `Range` to `Cell_Range` to avoid name clash.
2022-06-21 13:39:32 +00:00
Hubert Plociniczak
22a371a9c6
Substitute this with self (#3524)
A semi-manual s/this/self appied to the whole standard library.
Related to https://www.pivotaltracker.com/story/show/182328601

In the compiler promoted to use constants instead of hardcoded
`this`/`self` whenever possible.

# Important Notes
The PR **does not** require explicit `self` parameter declaration for methods as this part
of the design is still under consideration.
2022-06-21 10:53:52 +00:00
Jaroslav Tulach
8f6367966b
Single (+patchable) LiteralNode (#3536)
This PR merges existing variants of `LiteralNode` (`Integer`, `BigInteger`, `Decimal`, `Text`) into a single `LiteralNode`. It adds `PatchableLiteralNode` variant (with non `final` `value` field) and uses `Node.replace` to modify the AST to be patchable. With such change one can remove the `UnwindHelper` workaround as `IdExecutionInstrument` now sees _patched_ return values without any tricks.
2022-06-21 09:42:23 +00:00
Dmitry Bushev
a54bfb8c82
API for value updates (#3532)
Changelog:
- Describe the `EditKind` optional parameter that allows enabling engine-side optimizations, like value updates
- Describe the `text/openBuffer` message required for the lazy visualizations feature
2022-06-20 12:30:33 +00:00