Skip to content

Printer: members without a parameter list are rendered with no separator between name and type #114

Description

@rochala

Members that have no parameter list (vals and nullary defs) are printed with the result type glued directly onto the name, which makes them look like mangled identifiers or bogus type applications.

Repro:

cellar get-external org.typelevel:cats-effect_3:latest cats.effect.std.Semaphore --hide-inherited
cellar get-external com.lihaoyi:os-lib_3:latest os.proc
cellar get-external org.apache.commons:commons-lang3:3.14.0 org.apache.commons.lang3.StringUtils

Observed:

def tryAcquireF[Boolean]        // Semaphore
def lockResource[F, Unit]       // Mutex — reads as a type application
val commandSeq[Shellable]       // os.proc
val CRString                    // StringUtils — reads as one identifier
val verbPredef.String           // requests.Requester

Expected:

def tryAcquire: F[Boolean]
def lock: Resource[F, Unit]
val command: Seq[Shellable]
val CR: String
val verb: Predef.String

Particularly confusing for agents: lockResource[F, Unit] looks like a real member named lockResource, so an LLM consuming the output will happily call a method that does not exist — the exact failure mode cellar is meant to prevent.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions