Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • A asdf
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 54
    • Issues 54
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 18
    • Merge requests 18
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • asdf
  • asdf
  • Issues
  • #97

Closed
Open
Created Dec 22, 2021 by Robert Goldman@rgoldmanOwner

Use of change-class interferes with system class default initargs

Attila Lendvai writes:

i wanted to set the default-component-class of our own system subclass using :default-initargs, but it's ignored because the slot has a :initform (as opposed to setting the default value using a :default-initargs entry).

in the current ASDF setup, i need to override the slot (or the accessor method), which involves messing with internal symbols.

if ASDF used :default-initargs then i could just override that using a :default-initargs entry on my own subclass (IIUC).

This behavior was anomalous, because :default-initargs is supposed to override :initform, rather than vice versa.

Further investigation reveals that this is because change-class is invoked when parsing defsystem forms. See https://gitlab.common-lisp.net/asdf/asdf/-/blob/master/parse-defsystem.lisp#L447-L453 and https://gitlab.common-lisp.net/asdf/asdf/-/blob/master/system.lisp#L114-L118

This process (I have not investigated further) appears to change the initialization protocol, so that the initforms are clobbering the default initargs.

/cc @alendvai

Assignee
Assign to
Time tracking