56 Commits

Author SHA1 Message Date
translatenix
dfe85b786e Replace magic test port 12110 with 0 (#345)
Also introduce constants for some test package SHAs
to make them easier to update.
2024-03-20 10:47:28 -07:00
translatenix
3f3dfdeb1e Use java.net.http.HttpClient instead of java.net.Http(s)URLConnection (#217)
Moving to java.net.http.HttpClient brings many benefits, including
HTTP/2 support and the ability to make asynchronous requests.

Major additions and changes:
- Introduce a lightweight org.pkl.core.http.HttpClient API.
  This keeps some flexibility and allows to enforce behavior
  such as setting the User-Agent header.
- Provide an implementation that delegates to java.net.http.HttpClient.
- Use HttpClient for all HTTP(s) requests across the codebase.
  This required adding an HttpClient parameter to constructors and
  factory methods of multiple classes, some of which are public APIs.
- Manage CA certificates per HTTP client instead of per JVM.
  This makes it unnecessary to set JVM-wide system/security properties
  and default SSLSocketFactory's.
- Add executor v2 options to the executor SPI
- Add pkl-certs as a new artifact, and remove certs from pkl-commons-cli artifact

Each HTTP client maintains its own connection pool and SSLContext.
For efficiency reasons, It's best to reuse clients whenever feasible.
To avoid memory leaks, clients are not stored in static fields.

HTTP clients are expensive to create. For this reason,
EvaluatorBuilder defaults to a "lazy" client that creates the underlying
java.net.http.HttpClient on the first send (which may never happen).
2024-03-06 10:25:56 -08:00
translatenix
48a000aa1a Fix Gradle test tasks in pkl-server (#176)
Before: "test" runs no tests, "unitTests" runs all tests
After : "test" runs all tests
2024-02-22 19:58:06 -08:00
Sam Gammon
1e50200969 Use Gradle typed project accessors
This change activates the `TYPESAFE_PROJECT_ACCESSORS` feature
preview in Gradle, and switches to such accessors instead of
string-based project references, where possible

Relates-To: apple/pkl#204
Signed-off-by: Sam Gammon <sam@elide.ventures>
2024-02-21 11:36:02 +00:00
Kushal Pisavadia
699cdc623e Update GraalVM to 22.3.3 (from 22.3.1) (#156)
This bumps GraalVM's version.

References:
- https://github.com/graalvm/graalvm-ce-builds/releases/tag/vm-22.3.3
- https://github.com/oracle/graal/compare/vm-22.3.1...vm-22.3.3
- https://www.graalvm.org/release-notes/22_3/
2024-02-15 09:48:15 -08:00
Peter Niederwieser
ecad035dca Initial commit 2024-02-01 14:00:22 -08:00