Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

plugins: web_api: package require wibble causes errors, even if not enabled #73

Closed
jeffsf opened this issue Feb 23, 2021 · 3 comments
Closed

Comments

@jeffsf
Copy link
Contributor

jeffsf commented Feb 23, 2021

package require wibble
package require de1_machine

set plugin_name "web_api"

Causes failures on load in environments without wibble installed. If one is not going to use the plugin, there should be no reason to have to install wibble. Though preloaded in AndroWish, it is not present in, for example, macOS wish, including those installed with brew.

Suggest moving the offending dependency into a later phase of plugin initialization, where it is only evaluated if the plugin is active.

git merge-base main HEAD
55c65f1

@jeffsf
Copy link
Contributor Author

jeffsf commented Feb 23, 2021

Screen Shot 2021-02-23 at 10 51 41 AM

@jeffsf
Copy link
Contributor Author

jeffsf commented Feb 23, 2021

Further, the attempts to define procs within the ::wibble namespace on a global context also fail

Suggest that namespace eval ::wibble or similar be used.

Screen Shot 2021-02-23 at 12 22 27 PM

@jeffsf
Copy link
Contributor Author

jeffsf commented Apr 13, 2021

The loading problem seems to have been resolved by 495b831

The questions of where to declare proc ::wibble::check_auth are primarily stylistic in this specific instance. They still are done outside of proc main and register both a namespace and procs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant