e5b85bf16e
In a sequence of value-level operators, whitespace does not affect relative precedence. Functional operators still follow the space-precedence rules. The "functional" operators are: `>> << |> |>> <| <<| : .`, application, and any operator containing `<-` or `->`. All other operators are considered value-level operators. Asymmetric whitespace can still be used to form *operator sections* of value-level operators, e.g. `+2 * 3` is still equivalent to `x -> (x+2) * 3`. Precedence of application is unchanged, so `f x+y` is still equivalent to `f (x + y)` and `f x+y * z` is still equivalent to `(f (x + y)) * z`. Any attempt to use spacing to override value-level operator precedence will be caught by the new enso linter. Mixed spacing (for clarity) in value-operator expressions is allowed, as long as it is consistent with the precedences of the operators. Closes #10366. # Important Notes Precedence warnings: - The parser emits a warning if the whitespace in an expression is inconsistent with its effective precedence. - A new enso linter can be run with `./run libraries lint`. It parses all `.enso` files in `distribution/lib` and `test`, and reports any errors or warnings. It can also be run on individual files: `cargo run --release --bin check_syntax -- file1 file2...` (the result may be easier to read than the `./run` output). - The linter is also run as part of `./run lint`, so it is checked in CI. Additional language change: - The exponentiation operator (`^`) now has higher precedence than the multiplication class (`*`, `/`, `%`). This change did not affect any current enso files. Library changes: - The libraries have been updated. The new warnings were used to identify all affected code; the changes themselves have not been programmatically verified (in many cases their equivalence relies on the commutativity of string concatenation). |
||
---|---|---|
.. | ||
data | ||
polyglot-sources/enso-test-java-helpers/src/main/java/org/enso | ||
src | ||
package.yaml | ||
README.md |
This is a set of tests for the Base
library for Enso.
HTTP tests
The run test suite for the HTTP component requires an active helper server on
the localhost. If it is present, the port it listens to should be provided by
setting the ENSO_HTTP_TEST_HTTPBIN_URL
environment variable to a value like
http://localhost:8080
. The URL may contain a trailing slash.
To run the test server, you may use the following command:
sbt 'http-test-helper/run localhost 8080'
You can stop the server via Ctrl-C.
See the server's documentation for more information.
Cloud tests
By default, a subset of cloud tests runs whenever the
ENSO_HTTP_TEST_HTTPBIN_URL
environment variable is set, using a mock of parts
of the cloud logic running on the helper server.
To run a full set of cloud tests against a real deployment, you need to set the following 3 environment variables:
ENSO_CLOUD_API_URI
to point to the root of the cloud API,ENSO_CLOUD_CREDENTIALS_FILE
to be a path to a file containing the credentials to use, e.g.~/.enso/credentials
,ENSO_RUN_REAL_CLOUD_TEST=1
to tell the test suite to run against a real cloud deployment.
Note that some cloud tests (e.g. testing secrets in HTTP requests) still require
the ENSO_HTTP_TEST_HTTPBIN_URL
setup, even if running against a real cloud
deployment.