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

UndefVarError: Server not defined #85

Closed
MaximeBouton opened this issue Mar 21, 2019 · 7 comments
Closed

UndefVarError: Server not defined #85

MaximeBouton opened this issue Mar 21, 2019 · 7 comments

Comments

@MaximeBouton
Copy link

I am getting the following precompilation error on julia 1.1 with v0.6.0

julia> using Mux
[ Info: Precompiling Mux [a975b10e-0019-58db-a62f-e48ff68538c9]
WARNING: could not import HTTP.HandlerFunction into Mux
ERROR: LoadError: LoadError: UndefVarError: Server not defined
Stacktrace:
 [1] top-level scope at none:0
 [2] include at .\boot.jl:326 [inlined]
 [3] include_relative(::Module, ::String) at .\loading.jl:1038
 [4] include at .\sysimg.jl:29 [inlined]
 [5] include(::String) at C:\Users\Maxime\.julia\packages\Mux\a0IXM\src\Mux.jl:1
 [6] top-level scope at none:0
 [7] include at .\boot.jl:326 [inlined]
 [8] include_relative(::Module, ::String) at .\loading.jl:1038
 [9] include(::Module, ::String) at .\sysimg.jl:29
 [10] top-level scope at none:2
 [11] eval at .\boot.jl:328 [inlined]
 [12] eval(::Expr) at .\client.jl:404
 [13] top-level scope at .\none:3
in expression starting at C:\Users\Maxime\.julia\packages\Mux\a0IXM\src\server.jl:56
in expression starting at C:\Users\Maxime\.julia\packages\Mux\a0IXM\src\Mux.jl:24
ERROR: Failed to precompile Mux [a975b10e-0019-58db-a62f-e48ff68538c9] to C:\Users\Maxime\.julia\compiled\v1.1\Mux\cs9xb.ji.
Stacktrace:
 [1] error(::String) at .\error.jl:33
 [2] compilecache(::Base.PkgId, ::String) at .\loading.jl:1197
 [3] _require(::Base.PkgId) at .\loading.jl:960
 [4] require(::Base.PkgId) at .\loading.jl:858
 [5] require(::Module, ::Symbol) at .\loading.jl:853

Any idea on how to fix this? Thanks

@hustf
Copy link

hustf commented Mar 21, 2019

At master version, Mux require both Http and Websockets. The last just switched to using the latest version of http. Did you just update?

In order to use one version of http, the best way of importing symbols to Mux may be through Websockets.

@MaximeBouton
Copy link
Author

I just updated a few hours ago, I was getting the error when calling Blink.jl which depends on Mux.

@lcontento
Copy link

It used to be that HTTP.Servers exported the symbol Server, but it looks like this is no longer the case in the new release. You can fix the problem by using a local version of Mux with ]develop Mux and then add the line using HTTP.Servers: Server at the beginning of ~/.julia/dev/Mux/src/server.jl. Once the problem is fixed in the upstream version, you can revert to it with ]free Mux.

@MaximeBouton
Copy link
Author

Thanks this worked. It seems like #84 will fix it.

@gtollefson
Copy link

gtollefson commented Mar 21, 2019

I have the same issue as OP and experience this on Unix. Mux is a dep of a package I'm developing and have submitted to METADATA.jl for registration. This issue is causing my package to fail to precompile. Is this something that can be fixed soon in the stable version?

@jpsamaroo
Copy link
Collaborator

As mentioned above, #84 will fix this, and I imagine a new version will be tagged promptly afterwards.

@piever
Copy link
Collaborator

piever commented Mar 25, 2019

Fixed by #86

@piever piever closed this as completed Mar 25, 2019
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

6 participants