int128 / int128/gradle-ssh-plugin

RunHandler is null

Open
#462 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Groovy
Stars
325
Forks
59
Avg merge
5h 29m
Merged PRs (30d)
6

Description

tasks {
    val deploy by registering {
        doLast {
            ssh.run(closureOf<RunHandler> {
                session(devServer, closureOf<SessionHandler> {
                    put(hashMapOf(
                        "from" to outputJar.single(),
                        "into" to prop("sshDeployPath")
                    ))
                })
            })
        }
    }
}

gives error

> Parameter specified as non-null is null: method Build_gradle$5$deploy$2$1.execute$lambda$0, parameter $this$closureOf

When changed to:

tasks {
    val deploy by registering {
        doLast {
            ssh.run(closureOf<RunHandler?> {
                println("RunHandler: $this")
                // ...

it logs:

RunHandler: null

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the Kotlin DSL example and trace how ssh.run and closureOf handle the receiver. Compare the non-null and nullable RunHandler cases, then identify the expected receiver behavior and add or update coverage for the failing invocation.

Written by the indexing model from the issue text.

Assessment

Tech stack
kotlin
Domain
build-system, devops
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.