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

setup API is too loose #41

Closed
ConnorRigby opened this issue Sep 25, 2017 · 3 comments
Closed

setup API is too loose #41

ConnorRigby opened this issue Sep 25, 2017 · 3 comments

Comments

@ConnorRigby
Copy link
Contributor

in ref to #17, #38 and by extension #40 i would like to start an official discussion of the setup api.

I don't personally want to support both string and atom keys for things. And this is only one part of this particular issue. I would like to parse and confirm them before passing further down to be messed up anywhere. I think the parse_settings function @Hermanverschooten introduced is on the right track, but instead of coxing things into a proper shape, we should enforce the proper shape. I think the public api should raise ArgumentError's when options are not inputted correctly.

@Hermanverschooten
Copy link
Contributor

I agree with your sentiment. As far as the String to Atom goes, currently the underlying WpaSupplicant requires an Atom. I know there is a pull request there too, to allow strings to be used. My idea is we should implement our strategy concerning the config, and massage it to confirm with the called APIs. That will also allow us to enforce our contract, and make it more clear to the users.

@ConnorRigby
Copy link
Contributor Author

ConnorRigby commented Mar 5, 2018

in 0.3.x releases, we are now logging an incompatible type for ifnames such as here

Next major version update, we will be actually enforcing incompatible types.

@ConnorRigby
Copy link
Contributor Author

as of 0.3.7, you will receive warnings on incompatible settings. later versions will officially deprecate old apis

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

2 participants