Forum OpenACS Development: acs_sc::impl::new_from_spec fails if an optional service contract is not insalled

The tcl API for acs-service-contract requires that the service contract for an implementation be installed. This is beacuse the implementation bindings are created when the implementation is created.

This does not allow for optional services.

I ran into this working on WebDAV. Not all sites would use this, so the service contracts might not be installed.

One option would be to skip adding the bindings if the service contract doesn't exist. Then if the optional service is later installed it could search for unbound implementations and create the bindings.

Is there a better way? Should the WebDAV package be required, but stay disabled instead?

Hm. You're saying you want to install the implementation for a contract without having installed the contract?

Hwo exactly would this work? CR would define the implementation, but in order to install the contract to make that implementation useful, you'd have to install a separate package?

I'm not entirely convinced of the usefuleness of this...


Well, the other option is to require WebDAV support be installed even if you never plan on using it.

The idea is that file-storage is installed, but WebDAV support is not installed because it is not used anywhere.

If at a later time, WebDAV support was installed, the service contract and implementations need to be activated.

Previously to install the bindings, it was recommened to vist the acs-service-contract page of an installation. I can understand why automatic install of bindings is preferred.

What does installing webdav support entail?

I'd be inclined to suggest that we include the webdav service contract in core, if we expect packages to implement it.

And whatever webdav entails in addition to just the service contract could be installed separately later, and you wouldn't have to manually go bind the service contracts.

Is that possible?



I am thinking to just include the tDAV tcl library right in the openacs package. That way, nothing additional is required. If WebDAV is in the core, then file-storage can require it, and it can be installed, without activating it. It should be unoticable to users unless its turned on.