* pkl-excutor tests: symlink 0.25.0 distribution into pkl-executable/build
* Use `IoUtils.getPklHomeDir` in HttpClientBuilder
* Simplify Exceptions.java
* Enable testing for older pkl-executor distribution
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).
This reverts commit 7f404fff49.
The package is derived from the module name.
Having `module com.example.Foo` in Pkl
will create Kotlin `package com.example`.
Eventually, we may want to introduce a way to map
Pkl names to package names that provides finer
controls to the code generator.
When I delete pkl-core/src/test/files/LanguageSnippetTests/output and
run "gw test", most output files are regenerated, but 46 of them aren't.
I assume these are stale files that should be deleted.
- fix: make version catalog accessible from `buildSrc` plugins
- chore: declare `googleFormatVersion` in version catalog
- chore: declare `ktfmt` in version catalog
Relates-To: apple/pkl#204
Signed-off-by: Sam Gammon <sam@elide.ventures>
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>
This small change fixes a bug introduced by the `validatePom` task
within the `pklPublishLibrary` plugin. When running project-wide
tasks like `./gradle tasks`, projects which don't provide a POM
fail the build, because the `generatePomFileForLibraryPublication`
cannot be found, but it is expected to be present.
Fixes and closesapple/pkl#215
Signed-off-by: Sam Gammon <sam@elide.ventures>
The referenced filename should be `ispklTutorialPart3.pkl`, not `pklTutorial.pkl`.
Also, changes dates from 2023 to 2024
Co-authored-by: grant-abbott <gaabbott@apple.com>
The body of a typealias gets inlined into wherever the typealias
is used. This fixes a bug where the references in the typealias body can
resolve to the wrong value.