mirror of
https://github.com/apple/pkl.git
synced 2026-01-13 15:13:38 +01:00
[PR #492] [MERGED] Add support for Windows #580
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/apple/pkl/pull/492
Author: @bioball
Created: 5/14/2024
Status: ✅ Merged
Merged: 5/29/2024
Merged by: @bioball
Base:
main← Head:windows-build📝 Commits (10+)
b3a72b7Add support for Windows8bd47c0Run spotlessApply75102b9Fix parsing module names of windows absolute paths9c23fffFix encoding and triple-slash paths317ccfeFix remaining build errorse1e6793Adjust note about jvm debugging78b73f6Docs adjustments4627c30Adjustments from code review, set platform to Windowsea8aa46Set union type on pkl.platform#OperatingSystem.name70e0216Apply suggestions from code review📊 Changes
76 files changed (+903 additions, -400 deletions)
View changed files
📝
.circleci/config.pkl(+11 -1)📝
.circleci/config.yml(+92 -112)📝
.circleci/jobs/BuildNativeJob.pkl(+14 -6)📝
.circleci/jobs/DeployJob.pkl(+3 -1)📝
.circleci/jobs/GradleCheckJob.pkl(+15 -5)📝
.circleci/jobs/GradleJob.pkl(+5 -10)📝
.circleci/jobs/SimpleGradleJob.pkl(+3 -1)📝
.gitattributes(+1 -0)📝
DEVELOPMENT.adoc(+8 -0)📝
buildSrc/src/main/kotlin/BuildInfo.kt(+11 -4)📝
buildSrc/src/main/kotlin/ExecutableJar.kt(+6 -8)📝
buildSrc/src/main/kotlin/pklAllProjects.gradle.kts(+25 -0)📝
buildSrc/src/main/kotlin/pklGraalVm.gradle.kts(+12 -8)📝
docs/modules/language-reference/pages/index.adoc(+11 -2)📝
docs/modules/pkl-cli/pages/index.adoc(+26 -25)📝
gradle/libs.versions.toml(+1 -0)📝
pkl-cli/pkl-cli.gradle.kts(+42 -7)📝
pkl-cli/src/main/kotlin/org/pkl/cli/CliEvaluator.kt(+17 -3)📝
pkl-cli/src/main/kotlin/org/pkl/cli/CliPackageDownloader.kt(+5 -1)📝
pkl-cli/src/main/kotlin/org/pkl/cli/commands/TestCommand.kt(+2 -1)...and 56 more files
📄 Description
Closes https://github.com/apple/pkl/issues/20
This adds support for Windows.
The in-language path separator is still
/, to ensure Pkl programs are cross-platform.The specifics behind this design are detailed in https://github.com/apple/pkl-evolution/pull/7.
Log lines are written using CRLF endings on Windows.
Modules that are combined with
--module-output-separatoruses LF endings to ensureconsistent rendering across platforms.
jpkldoes not work on Windows as a direct executable.However, it can work with
java -jar jpkl.Additional details:
IoUtils.relativize, because the current implementation delegates toPath, which will fail if the URI contains invalid Windows characters.Propertyvalues./gradlew testcommandspkl:platform'scurrent.operatingSystem.nameis"Windows"for all Windows OSes (match treatment of macOS/Linux).🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.