This adds release notes for 0.26.
Also:
* Adjust IJ settings to ignore certain http: strings
* Add note about http introduced in 0.26 in message passing api
Co-authored-by: Philip K.F. Hölzenspies <holzensp@gmail.com>
Rationale: "proxy" can mean very different things (e.g. java.lang.reflect.Proxy in Java).
This makes the flag name more specific.
CLI:
* `--proxy` -> `--http-proxy`
* `--no-proxy` -> `--http-no-proxy`
Gradle:
* `proxyAddress` -> `httpProxy`
* `noProxy` -> `httpNoProxy`
This fixes an issue where an error coming from loading a project file is shown as a PklBugException.
There were two problems here:
1. proxyAddress needs to be a lazy value, because it can try to load a PklProject
2. accessing proxyAddress can throw a PklException, so it needs to be within the try/catch
Instead of bundling Pkl's built-in CA certificates as a class path resource and loading them at runtime,
pass them to the native image compiler as the default SSL context's trust store.
This results in faster SSL initialization and is more consistent with how default certificates
are handled when running on the JVM.
Further related improvements:
- Remove HttpClientBuilder methods `addDefaultCliCertificates` and `addBuiltInCertificates`.
- Remove pkl-certs subproject and the optional dependencies on it.
- Move `PklCARoots.pem` to `pkl-cli/src/certs`.
- Fix certificate related error messages that were missing an argument.
- Prevent PklBugException if initialization of `CliBaseOptions.httpClient` fails.
- Add ability to set CA certificates as a byte array
- Add CA certificates option to message passing API
Adds a `rename` field to the Java/Kotlin code generators that allows renaming packages and classes during codegen.
* Add `--rename` flag to CLIs
* Add `rename` property to Gradle API
* Add `--proxy` and `--no-proxy` CLI flags
* Add property `http` to `pkl:settings`
* Move `EvaluatorSettings` from `pkl:Project` to its own module and add property `http`
* Add support for proxying in server mode, and through Gradle
* Add `setProxy()` to `HttpClient`
* Add documentation
Now that Pkl syntax highlighting is available on GitHub,
we can remove the Groovy association with these files.
This also adds changes to mark `*.pcf` and `PklProject` files as Pkl.
This adds a language change that requires references from typealiases
to the enclosing module to be `const`.
This is required because typealiases are not late-bound.
Rationale is laid out in SPICE-0007.
Also:
* Update documentation to reflect new rules.
* Fix `Project.pkl`; mark method `const` to not break said rule.
Fix an issue where the CI job attempts to install the wrong executable
when on macOS/aarch64.
Also, adjusts native test definitions in pkl-server to match pkl-core.
This adds changes to support loading project dependencies in non-file based projects.
The design for this feature can be found in SPICE-0005: https://github.com/apple/pkl-evolution/pull/6
Changes:
* Consider all imports prefixed with `@` as dependency notation.
* Bugfix: fix resolution of glob expressions in a local dependency.
* Adjust pkl.Project:
- Allow local dependencies from a scheme-local paths.
- Disallow certain evaluator settings if not loaded as a file-based module.
* Breaking API change: `ProjectDependenciesManager` constructor now requires `ModuleResolver` and `SecurityManager`.
* Split MemberNode into (Regular/Shared)MemberNode
SharedMemberNode enables generating non-constant object members
at run time without generating an unbounded number of Truffle root nodes.
* Invert shouldRunTypeCheck to match its name
* Introduce VmObjectBuilder
Introduce VmObjectBuilder, a uniform way to build `VmObject`s
whose `ObjectMember`s are determined at run time.
Replace some manual object building code with VmObjectBuilder.
Add some assertions to fix IntelliJ warnings.
* Improve implementation of globbed read/import nodes
- Leverage SharedMemberNode to have a single Truffle root node per globbed
read/import expression instead of one root node per resolved glob element.
- Remove caching in ReadGlobNode because it only works correctly if glob pattern is a string *constant*.
- Remove caching in StaticReadNode (now ReadGlobElementNode/ImportGlobElementNode)
because it seems unnecessary and the implementation doesn't look quite right.
* Simplify code
* Fix ClassCastException when reflecting on globbed import
* Fix caching of globbed reads
Problem:
The result of a globbed read depends not only on the glob pattern but also on the current module URI.
However, ResourceManager does not take this into account when caching globbed reads, causing wrong results.
Changes:
- Cache globbed reads per read expression.
This is also how globbed imports are cached, except that import URIs are constant.
- Make ReadGlobNode and ImportGlobNode code as similar as possible.
- Reduce code duplication by inheriting from AbstractReadNode.
- Add some tests.
* Don't expose JDK internal classes; instead solve msgpack issue with `--initialize-at-run-time`.
* Use quick build mode for non-release builds: 40% faster compilation, 20% smaller executable.
* Remove options that were commented out.
* Also run ServerTest against native executable
This adds support for Windows.
The in-language path separator is still `/`, to ensure Pkl programs are cross-platform.
Log lines are written using CRLF endings on Windows.
Modules that are combined with `--module-output-separator` uses LF endings to ensure
consistent rendering across platforms.
`jpkl` does not work on Windows as a direct executable.
However, it can work with `java -jar jpkl`.
Additional details:
* Adjust git settings for Windows
* Add native executable for pkl cli
* Add jdk17 windows Gradle check in CI
* Adjust CI test reports to be staged within Gradle rather than by shell script.
* Fix: encode more characters that are not safe Windows paths
* Skip running tests involving symbolic links on Windows (these require administrator privileges to run).
* Introduce custom implementation of `IoUtils.relativize`
* Allow Gradle to initialize ExecutableJar `Property` values
* Add Gradle flag to enable remote JVM debugging
Co-authored-by: Philip K.F. Hölzenspies <holzensp@gmail.com>
GenericUrl is a catch-all that uses URL.openConnection().
Since we now have special handling of HTTP urls, it makes more sense to
put it in its own module key.
This changes the file paths to use characters that are safe for Windows.
Channges the output of the following:
* Package cache directory
* Generated pkl-doc files
* Kotlin generated code
Unsafe characters are encoded as (<hex>).
For example, the colon character `:` is encoded as `(3a)`.
Additionally, this changes the cache directory prefix (package-1 to
package-2).
Follows the design of https://github.com/apple/pkl-evolution/pull/3
This is technically a breaking change, but follows the intended use-case
and documentation of settings.
* Require that the global settings file at `~/.pkl/settings.pkl`
amends stdlib module `pkl:settings`, or otherwise sets `output.value`
to an instance of `pkl.Settings`.
* Simplify the object mapping of `PklSettings.java`
Fix all IntelliJ warnings in Java production code except for
bogus spelling warnings and warnings about unused public methods.
Also fix some warnings emitted by Code->Inspect Code.
Changes made:
- use text block instead of string concatenation
- extract method to avoid code duplication
- use switch expression
- fix Javadoc syntax and spelling
- fix spelling in comment
- increase class visibility to match visibility of use site
- delete overriding method with same implementation
- use String.isEmpty() and StringBuilder.isEmpty()
- add @Serial annotation
- make field final
- remove unused field
- remove unused private method
- remove exceptions that aren't thrown from throws clause
- insert non-null assertion
- annotate overriding method with @Nonnull
- suppress warning
- delete unused class (WriteAuxiliarySlotNode)
- add final modifier
- remove unused error message
- repeat @Nullable modifier in overriding method
- remove never thrown exception from throws clause
- remove redundant suppression