GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — False error in external specs: a @Ghost the constructor does not set gives "Ghost 'old' could not be found" at the next from-only call · Issue #450 · liquid-java/liquidjava

False error in external specs: a @Ghost the constructor does not set gives "Ghost 'old' could not be found" at the next from-only call #450

New issue
Copy link
New issue
Copy link
Open
Open
False error in external specs: a @Ghost the constructor does not set gives "Ghost 'old' could not be found" at the next from-only call#450
Copy link

Description

@CatarinaGamboa
CatarinaGamboa
opened on Oct 29, 2026
Issue body actions

Impact: adding a @Ghost to an external spec breaks correct programs, unless every constructor sets the ghost. The error names a ghost called old, which is internal and not in the spec.

Minimal reproducer (an external spec and a client, in one directory)

// EditRefinements.java
@ExternalRefinementsFor("javax.swing.undo.AbstractUndoableEdit")
@StateSet({"done", "undone"})
@Ghost("int supported")
public interface EditRefinements {
    @StateRefinement(to = "done(this)")
    void AbstractUndoableEdit();

    @StateRefinement(from = "done(this)")
    boolean canUndo();
}

// Client.java
public class Client {
    public static void main(String[] args) {
        AbstractUndoableEdit e = new AbstractUndoableEdit();
        e.canUndo();
    }
}

Expected: Correct! Passed Verification.

Actual (main @ f7f366c, and 1a506fe):

Not Found Error: Ghost 'old' could not be found

The same shape written in-source (an annotated class with the same @Ghost) verifies. So does the external spec when the constructor's to also sets the ghost: to = "done(this) && supported(this) == 0".

Real-world scenario. I was writing a spec for javax.management.modelmbean.RequiredModelMBean with a ghost to refuse load()/store(), which always throw; from = "false" doesn't work (#449). With the ghost unset, every correct call such as m.setModelMBeanInfo(info) failed with this error.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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

      You are visitor 01402503 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.