-
-
Notifications
You must be signed in to change notification settings - Fork 18.3k
pkl: Add native build using graalvm #404324
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,12 +1,11 @@ | ||
| diff --git i/pkl-cli/src/test/kotlin/org/pkl/cli/CliEvaluatorTest.kt w/pkl-cli/src/test/kotlin/org/pkl/cli/CliEvaluatorTest.kt | ||
| index df88c423..ae1db500 100644 | ||
| --- i/pkl-cli/src/test/kotlin/org/pkl/cli/CliEvaluatorTest.kt | ||
| +++ w/pkl-cli/src/test/kotlin/org/pkl/cli/CliEvaluatorTest.kt | ||
| @@ -1497,6 +1497,7 @@ result = someLib.x | ||
| assertThat(output).isEqualTo("result = 1\n") | ||
| } | ||
|
|
||
| + @Disabled | ||
| @Test | ||
| fun `eval file with non-ASCII name`() { | ||
| val tempDirUri = tempDir.toUri() | ||
| diff --git a/pkl-core/src/test/kotlin/org/pkl/core/LanguageSnippetTestsEngine.kt b/pkl-core/src/test/kotlin/org/pkl/core/LanguageSnippetTestsEngine.kt | ||
| index 99cf9479..45269d6d 100644 | ||
| --- a/pkl-core/src/test/kotlin/org/pkl/core/LanguageSnippetTestsEngine.kt | ||
| +++ b/pkl-core/src/test/kotlin/org/pkl/core/LanguageSnippetTestsEngine.kt | ||
| @@ -215,6 +215,7 @@ abstract class AbstractNativeLanguageSnippetTestsEngine : AbstractLanguageSnippe | ||
| // on the other hand, don't exclude /native/ | ||
| Regex(".*/import1b\\.pkl"), | ||
| // URIs get rendered slightly differently (percent-encoded vs raw) | ||
| + Regex(".*日本語.pkl"), | ||
| Regex(".*日本語_error\\.pkl"), | ||
| ) + exclusionsForThisJvm() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
69 changes: 69 additions & 0 deletions
69
pkgs/by-name/pk/pkl/use_nix_graalvm_instead_of_download.patch
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,69 @@ | ||
| diff --git i/buildSrc/src/main/kotlin/BuildInfo.kt w/buildSrc/src/main/kotlin/BuildInfo.kt | ||
| index 3020857b..54d0da41 100644 | ||
| --- i/buildSrc/src/main/kotlin/BuildInfo.kt | ||
| +++ w/buildSrc/src/main/kotlin/BuildInfo.kt | ||
| @@ -100,10 +100,10 @@ open class BuildInfo(private val project: Project) { | ||
| File(homeDir, "${baseName}.$extension") | ||
| } | ||
|
|
||
| - val installDir: File by lazy { File(homeDir, baseName) } | ||
| + val installDir: File by lazy { File("@graalvmDir@") } | ||
|
|
||
| val baseDir: String by lazy { | ||
| - if (os.isMacOsX) "$installDir/Contents/Home" else installDir.toString() | ||
| + "@graalvmDir@" | ||
| } | ||
| } | ||
|
|
||
| diff --git i/pkl-cli/pkl-cli.gradle.kts w/pkl-cli/pkl-cli.gradle.kts | ||
| index facfeabb..7b48201f 100644 | ||
| --- i/pkl-cli/pkl-cli.gradle.kts | ||
| +++ w/pkl-cli/pkl-cli.gradle.kts | ||
| @@ -313,7 +313,6 @@ fun Exec.configureExecutable( | ||
| /** Builds the pkl CLI for macOS/amd64. */ | ||
| val macExecutableAmd64: TaskProvider<Exec> by | ||
| tasks.registering(Exec::class) { | ||
| - dependsOn(":installGraalVmAmd64") | ||
| configureExecutable( | ||
| buildInfo.graalVmAmd64, | ||
| layout.buildDirectory.file("executable/pkl-macos-amd64"), | ||
| @@ -323,7 +322,6 @@ val macExecutableAmd64: TaskProvider<Exec> by | ||
| /** Builds the pkl CLI for macOS/aarch64. */ | ||
| val macExecutableAarch64: TaskProvider<Exec> by | ||
| tasks.registering(Exec::class) { | ||
| - dependsOn(":installGraalVmAarch64") | ||
| configureExecutable( | ||
| buildInfo.graalVmAarch64, | ||
| layout.buildDirectory.file("executable/pkl-macos-aarch64"), | ||
| @@ -334,7 +332,6 @@ val macExecutableAarch64: TaskProvider<Exec> by | ||
| /** Builds the pkl CLI for linux/amd64. */ | ||
| val linuxExecutableAmd64: TaskProvider<Exec> by | ||
| tasks.registering(Exec::class) { | ||
| - dependsOn(":installGraalVmAmd64") | ||
| configureExecutable( | ||
| buildInfo.graalVmAmd64, | ||
| layout.buildDirectory.file("executable/pkl-linux-amd64"), | ||
| @@ -349,7 +346,6 @@ val linuxExecutableAmd64: TaskProvider<Exec> by | ||
| */ | ||
| val linuxExecutableAarch64: TaskProvider<Exec> by | ||
| tasks.registering(Exec::class) { | ||
| - dependsOn(":installGraalVmAarch64") | ||
| configureExecutable( | ||
| buildInfo.graalVmAarch64, | ||
| layout.buildDirectory.file("executable/pkl-linux-aarch64"), | ||
| @@ -369,7 +365,6 @@ val linuxExecutableAarch64: TaskProvider<Exec> by | ||
| */ | ||
| val alpineExecutableAmd64: TaskProvider<Exec> by | ||
| tasks.registering(Exec::class) { | ||
| - dependsOn(":installGraalVmAmd64") | ||
| configureExecutable( | ||
| buildInfo.graalVmAmd64, | ||
| layout.buildDirectory.file("executable/pkl-alpine-linux-amd64"), | ||
| @@ -379,7 +374,6 @@ val alpineExecutableAmd64: TaskProvider<Exec> by | ||
|
|
||
| val windowsExecutableAmd64: TaskProvider<Exec> by | ||
| tasks.registering(Exec::class) { | ||
| - dependsOn(":installGraalVmAmd64") | ||
| configureExecutable( | ||
| buildInfo.graalVmAmd64, | ||
| layout.buildDirectory.file("executable/pkl-windows-amd64"), |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This comment was marked as resolved.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.