25 Commits

Author SHA1 Message Date
Daniel Chao
ad131b5543 Adjust installation docs (#1010) 2025-04-16 21:17:58 -07:00
Pedro Piñera Buendía
640cc129db Document how to install pkl with Mise (#982) 2025-04-16 21:17:53 -07:00
Daniel Chao
100dd0560e Support jpkl executable for Windows (#872)
This updates the script used to start the executable to support
Windows as well.

For Windows support, the executable needs to be named `jpkl.bat`.
2025-01-14 05:16:59 -08:00
Philip K.F. Hölzenspies
03462fefae Add color to error formatting (#746)
* Add color to error formatting

* Apply suggestions from code review

Co-authored-by: Daniel Chao <daniel.h.chao@gmail.com>

* Address reviewer comments

* Apply suggestions from code review

Co-authored-by: Daniel Chao <daniel.h.chao@gmail.com>

* Define style choices as operations on formatter (abandon semantic API)

* Adjust margin styling

* Review feedback

* Documentation nits

---------

Co-authored-by: Daniel Chao <daniel.h.chao@gmail.com>
2024-11-01 10:02:19 +00:00
Daniel Chao
acd2222534 Polish test result running and reporting (#738)
Changes:
* Move class `TestResults` to package `org.pkl.core`, because it is a public class (it's the result of `Evaluator#evaluateTest`)
* Change examples to treat individual examples as assertions in the same test. Previously, they were considered different tests with an incrementing number. This better aligns with how facts are treated.
* Change `TestResults` to be a record, and introduce builders.
* Remove "module" test result section (it is not really a section).
* Add javadoc to `TestResults`
* Formatting fix: prefix ✍️ emoji just like we do the  and  emojis 
* Consider writing examples as failures, not successes. `pkl test` will exit with code 10 if the only failing tests are due to writing examples.
2024-10-28 21:05:13 -07:00
Daniel Chao
ce25cb8ef0 Add analyze imports libs (SPICE-0001) (#695)
This adds a new feature to build a dependency graph of Pkl programs, following the SPICE outlined in https://github.com/apple/pkl-evolution/pull/2.

It adds:
* CLI command `pkl analyze imports`
* Java API `org.pkl.core.Analyzer`
* Pkl stdlib module `pkl:analyze`
* pkl-gradle extension `analyze`

In addition, it also changes the Gradle plugin such that `transitiveModules` is by default computed from the import graph.
2024-10-23 14:36:57 -07:00
Daniel Chao
00c2e00bb9 Add release notes for 0.26 (#529)
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>
2024-06-17 08:03:41 -07:00
Daniel Chao
f15ad6ec06 Change CLI flag and Gradle name for proxy options (#526)
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`
2024-06-14 08:08:21 -07:00
Daniel Chao
3bd9214858 Adjust docs for proxying (#523)
Update/polish up the documentation around http proxying
2024-06-13 09:46:21 -07:00
Philip K.F. Hölzenspies
b03530ed1f Add support for HTTP proxying (#506)
* 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
2024-06-12 11:54:22 -07:00
Daniel Chao
a520ae7d04 Fix missing paragraph in Windows installation docs (#520) 2024-06-11 08:00:37 -07:00
Daniel Chao
8ec06e631f Add support for Windows (#492)
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>
2024-05-28 15:56:20 -07:00
Daniel Chao
e28d747418 JDK version bump cleaups, bump minimum Gradle version to 8.1 (#454)
* Bump JDK when running simple gradle CI jobs
* Bump minimum Gradle version to 8.1
* Fix docs, and fix minimum version checker
2024-04-26 07:42:39 -07:00
Mitch Capper
583dfc6927 Windows installation notes 2024-04-24 12:37:11 +02:00
Daniel Chao
58ed8242af Fix links for downloading snapshot executables (#391)
Also, quote the URLs for better shell compatibility
2024-04-04 07:43:42 -07:00
Daniel Chao
d7196e1207 Docs fix: Java 8 is not supported (#283)
Java 11 is the minimum version, rather than 8.
2024-03-04 07:49:20 -08:00
Daniel Chao
0ae9e0c5c0 Add homebrew instructions to docs (#270) 2024-02-29 11:02:36 -08:00
The L D O
5a311d3b86 update 'Loading Modules' example to match config contents (#84)
Co-authored-by: Daniel Chao <dan.chao@apple.com>
2024-02-07 17:58:57 -08:00
Adrian Lanzafame
e9df244485 fix concat operator and string typo 2024-02-07 20:23:51 +00:00
Lily Ballard
0538044fee Fix CLI docs examples for -x
The examples were using the wrong key.
2024-02-07 20:04:41 +00:00
Lily Ballard
bb3e3929ac Fix missing pkl eval subcommand in documentation examples 2024-02-07 20:04:41 +00:00
Dimitris Apostolou
80aff3afad Fix typos 2024-02-04 18:55:08 +02:00
Tinko
38f2e9a1cf Fix macOS download URL mismatch (#29)
* Fix macOS download URL mismatch

* Update index.adoc

List aarch64 first

---------

Co-authored-by: Daniel Chao <daniel.h.chao@gmail.com>
2024-02-03 20:07:45 -08:00
Daniel Chao
6e75c4a656 Fix download instructions (#21)
This fixes the download URLs for the pkl CLI
2024-02-03 14:25:40 -08:00
Peter Niederwieser
ecad035dca Initial commit 2024-02-01 14:00:22 -08:00