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

Warning on build regarding HTTP.stack #98

Closed
kobussch opened this issue Nov 17, 2019 · 2 comments · Fixed by #99
Closed

Warning on build regarding HTTP.stack #98

kobussch opened this issue Nov 17, 2019 · 2 comments · Fixed by #99

Comments

@kobussch
Copy link
Contributor

When building Mux, the following warning is displayed:

WARNING: using HTTP.stack in module Mux conflicts with an existing identifier.

This can be fixed easily by changing the using HTTP statements (in 2 places) to using HTTP: HTTP

This looks a bit odd and I could not find this particular syntax in the documentation anywhere, but it works. What it does is to just make the module HTTP reachable within Mux and its included files, without actually bringing all the names exported by HTTP into the Mux scope. Among the exports is stack. Mux has its own declaration of stack, which is causing the conflict.

In Mux all references to HTTP internals are done with dot-syntax so it is not necessary to bring into Mux any of the HTTP exports. Only the namespace of the module HTTP is needed and this is what the suggested code achieves.

I can provide the necessary PR if the above change sounds acceptable

Kobus

@jpsamaroo
Copy link
Collaborator

By "building Mux", I assume you mean loading Mux (Mux doesn't have a build step)?

But yes, that sounds fine to me! import HTTP will likely be what we should do to be idiomatic (it only brings in the module, but doesn't bring exports into scope).

@kobussch
Copy link
Contributor Author

Correct about loading. I actually experience the problem on loading another package which depends on Mux.

I will change my code to import HTTP as suggested. The PR will take a few days due to other commitments.

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

Successfully merging a pull request may close this issue.

2 participants