Probably not a bug, just my misunderstanding.
There are cases when used in one protocol is defined in another protocol. For example change-cause
, content-hint
, content-purpose
defined in text-input
are all used in input-method
.
Questions:
*… when enums used in … (typo)
You can load enums in other protocols by scanning those protocols first.
For example, I'll make a convoluted example where each protocol is in its own package. In the system
myfoo.asd
:;; Directory tree: ;; ./myfoo.asd ;; ./packages.lisp ;; ./text-input-unstable-v3.xml ;; ./input-method-unstable-v2.xml ;; ./app.lisp - this would have your application code (defsystem "myfoo" :defsystem-depends-on ("wayflan-client") :components ((:file "packages") (:wayflan-client-impl "text-input-unstable-v3" :in-package "myfoo.text-input" :export t :depends-on ("packages")) (:wayflan-client-impl "input-method-unstable-v2" :in-package "myfoo.input-method" :export t :depends-on ("packages" "text-input-unstable-v3")) (:file "app")))(The
:depends-on
is unnecessary as the files are loaded in order. It's only to illustrate how each protocol depends on the other)And in
packages.lisp
:(defpackage #:myfoo.text-input (:use #:cl #:wayflan-client)) (defpackage #:myfoo.input-method (:use #:cl #:wayflan-client #:myfoo.text-input))The package
myfoo.input-method
uses the packagemyfoo.text-input
, such that it can use the enums of the previous. I can prove this by transforming the enum into a value within the package:(defpackage #:myfoo.text-input (:use #:cl #:wayflan-client)) (defpackage #:myfoo.input-method (:use #:cl #:wayflan-client #:myfoo.text-input))
I made the example convoluted above to explicitly show which code depends on what. You can also keep things simple by putting everything in one package.
In
myfoo.asd
:(defsystem "myfoo" :defsystem-depends-on ("wayflan-client") :components ((:file "package") (:wayflan-client-impl "text-input-unstable-v3" :in-package "myfoo") (:wayflan-client-impl "input-method-unstable-v2" :in-package "myfoo") (:file "app")))In
package.lisp
:(defpackage #:myfoo (:use #:cl #:wayflan-client))
Thanks.
I've tried to do this before posting but I probably missed the part with adding
:depends-on
toinput-method
in:components
Will try again and post results in a few days.