- 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)
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).
- 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.
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**.
`Meta.get_qualified_type_name` correctly returns fully qualified type name when running a single file from a project with `enso --run Proj/src/Main.enso`.
Once our libraries and tests are compiled with basic inference of method types, some warnings were reported:
```
X:\NBO\enso\built-distribution\enso-engine-0.0.0-dev-windows-amd64\enso-0.0.0-dev\lib\Standard\Database\0.0.0-dev\src\DB_Column.enso:1003:19: warning: Calling member method `div` on type Number will result in a No_Such_Method error in runtime.
1003 | halfway = scale.div 2
| ^~~~~~~~~~~
X:\NBO\enso\built-distribution\enso-engine-0.0.0-dev-windows-amd64\enso-0.0.0-dev\lib\Standard\Image\0.0.0-dev\src\Matrix.enso:381:21: warning: Invoking a value that has a non-function type (type Image) will result in a Not_Invokable error in runtime.
381 | to_image self = Image (Image.from_vector self.normalize.to_vector self.rows self.channels)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
X:\NBO\enso\built-distribution\enso-engine-0.0.0-dev-windows-amd64\enso-0.0.0-dev\lib\Standard\Table\0.0.0-dev\src\Internal\Multi_Value_Key.enso:94:22: warning: Calling static method `new` on (type Illegal_State) will result in a No_Such_Method error in runtime.
94 | Error.throw (Illegal_State.new "Ordered_Multi_Value_Key is not intended for usage in unordered collections.")
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
This PR attempts to fix them.
There was also an expected error in the Examples:
```
X:\NBO\enso\built-distribution\enso-engine-0.0.0-dev-windows-amd64\enso-0.0.0-dev\lib\Standard\Examples\0.0.0-dev\src\Main.enso:139:36: warning: Calling static method `frobnicate` on (type No_Methods) will result in a No_Such_Method error in runtime.
139 | no_such_method = Panic.recover Any No_Methods.frobnicate . catch
| ^~~~~~~~~~~~~~~~~~~~~
```
To avoid getting a warning, I wrapped this in `(_ : Any)` to make the warning go away. The behaviour of the function is unchanged.
- ✅ Alter default `Any.pretty` so constructor is prefixed with type name (as needed now).
![image](https://github.com/user-attachments/assets/72d5ff2f-b567-47e2-becf-2e4acd4d089d)
- ✅ Tests for `pretty` on `Date`.
- `pretty` for ✅ `Date_Time` and ✅ `Time_Of_Day` improved to not have as much noise.
- `pretty` for ✅ `Period`, ✅ `Date_Range` and ✅ `Range`.
- Added custom `pretty` for ✅ `Vector` and ✅ `Array` as built-in method doesn't call through to overrides.
- Added custom `pretty` for ✅ `Column` and ✅ `Table`.
- Bug fix for `pretty` in `Time_Zone` so calls through to `pretty` of the zone_id to ensure safely escaped.
- Initial `default_widget` for `Date` and `Time_Of_Day`.
- Improve widget for `Date.to_date_time`.
![image](https://github.com/user-attachments/assets/18bc1d88-8ea9-42d0-8a9c-bc873e5d6835)
- `to_text`, `to_display_text` and `pretty` for `Enso_Secret`
![image](https://github.com/user-attachments/assets/d850c109-d1af-4b6f-a450-013c4d137805)
- private constructor for `Enso_Secret` as can't be correctly built directly.
- Use `_` for the testing methods in `HTTP` to clarify they shouldn't be used in general code.
Numerous times I wasn't sure when running the IDE if I'm running the bundled engine or a development build. Usually this depends on if I launch the standalone IDE or use a development build of project-manager.
Still it's not always obvious, and making sure that your IDE is running the right engine version is very often the first step when debugging issues with e.g. engine changes not showing up properly.
Thus I thought it may be worth to add this method (currently hidden to users in component browser by marking as `PRIVATE`, one has to type it in manually):
![image](https://github.com/user-attachments/assets/13af3df4-49ff-49bb-9b19-601258a8ca02)
I think it should be a helpful tool for debugging.
Debugger shows only fields of the current atom constructor: (internal members shown in gray, "public" members shown in bold purple)
![image](https://github.com/user-attachments/assets/21815296-c8aa-4ea2-ae7b-6feac78a221f)
(Note that `static_method` is not displayed as a member of `My_Type` - not in scope of this PR)
# Important Notes
The *interop* contract for `Atom` is changed as follows:
- Members are all methods and fields of the current constructor.
- All methods are internal members.
- If the constructor is project-private, fields are internal members.
- All the members are both readable, and invocable.
- Fields are field getters, that is, they are just methods.
- Fields are not invocable
- Constructors and static methods are **not** members of an atom. They should be members of the type.
- Note that methods used to be atom members before #9692
- Closes#11227
- Additionally, it should fix#11278 by ensuring that every scheduled message goes to the desired endpoint, by splitting each batch by endpoint.
* Add retries to HTTP Get requests
A quick solution to random network failures for GET HTTP requests.
Should reduce the number of IOExceptions that users see while fetching
data.
* Use homemade retry logic for http requests
* Add retries to whole Data.read
Previously, we added retries only to fetch HTTP_Request. That was
insufficient as intermittent errors might happen while reading body's
stream.
Enhanced our simple server's crash endpoint to allow for different kind
of failures as well as simulate random failures.
* Remove retries from Java
Increased the scope of retries in the previous commit.
* nit
* Address PR comments
* PR comments
* Remove builtin
close#10719
Changelog:
- add: optional `expressionConfigs` parameter to the `executionContext/recompute` request
- update: `IdExecutionInstrument` allowing to run a single node in a specified execution environment
- refactor: move tests related to the recompute request to a separate test suite. Otherwise the `RuntimeServerTest` is becoming too bloated
# Important Notes
The updated `executionContext/recompute` request.
```typescript
interface ExecutionContextRecomputeParameters {
/** The execution context identifier. */
contextId: ContextId;
/** The expressions that will be invalidated before the execution.
*
* Only the provided expression ids are invalidated excluding the dependencies.
*/
invalidatedExpressions?: "all" | ExpressionId[];
/** The execution environment that will be used in the execution. */
executionEnvironment?: ExecutionEnvironment;
/** The execution configurations for particular expressions.
*
* The provided expressions will be invalidated from the cache with the
* dependencies. The result of the execution will stay in the cache until the
* cache is invalidated by editing the node or other means.
*/
expressionConfigs?: ExpressionConfig[];
}
interface ExpressionConfig {
/** The expression identifier. */
expressionId: ExpressionId;
/** The execution environment that should be used to run this expression. */
executionEnvironment?: ExecutionEnvironment;
}
```
#### Use cases
- to re-run a single node without re-running the dependent nodes (subtree), put the node id in the `invalidatedExpressions` parameter.
- to re-run a node with dependent nodes (subtree), put the node id in the `expressionConfigs` parameter with empty `executionEnvironment`
- to re-run a node in a different execution environment, put the node id in the `expressionConfigs` and specify the `executionEnvieronment`
Add tests for coalesce and fix the In-memory version
# Important Notes
The distribution/lib/Standard/Database/0.0.0-dev/src/Internal/IR/From_Spec.enso change isn't actually needed for this MR as I switched away from using literal tables for these tests as trying to mix 2 literal tables doesn't look to be supported. The change I added will let any future developers know that.
- Allow Interrupted Exceptions to float out of the web requests.
- Use `Type_Error` rather than Any when catching auto scoping resolving.
- Rename `Java_Exception` to `JException`