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

Call module specific function not working? #3785

Closed
quinnj opened this issue Jul 22, 2013 · 5 comments
Closed

Call module specific function not working? #3785

quinnj opened this issue Jul 22, 2013 · 5 comments

Comments

@quinnj
Copy link
Member

quinnj commented Jul 22, 2013

I recently updated my Julia build, 614b2eff2, and noticed there were some additional methods added to connect, particularly one that takes a single string as an argument. It's never been a conflict before, but the ODBC package also has a connect function that is defines with a single string argument for the DSN, and usr::String="", pwd::String="" as named arguments.

I noticed the conflict as I tried to run a script and the Base.connect was called as one would expect. I thought this would eventually happen, but I tried to explicitly call ODBC.connect and Base.connect was still called. Is this expected? I thought fully referencing a module before a function made sure the module function would be called.

julia> Base.connect("SHC")
ERROR: connect: socket operation on non-socket (ENOTSOCK)
 in yield at multi.jl:1415

julia> ODBC.connect("SHC")
ERROR: connect: socket operation on non-socket (ENOTSOCK)
 in yield at multi.jl:1415

julia> @which ODBC.connect("SHC")
connect(path::Union(ASCIIString,UTF8String)) at stream.jl:817
@Keno
Copy link
Member

Keno commented Jul 22, 2013

are you importing the connect method in ODBC?

@quinnj
Copy link
Member Author

quinnj commented Jul 22, 2013

Yes.

import Base.show, Base.connect, Base.Chars

@Keno
Copy link
Member

Keno commented Jul 22, 2013

that's your problem right there ;)

@StefanKarpinski
Copy link
Sponsor Member

That's an unfortunately named function. ODBC probably should either not export it or call it something that doesn't clash with a fairly important function in Base. Either that or just add methods to Base.connect if appropriate.

@quinnj
Copy link
Member Author

quinnj commented Jul 22, 2013

Ah.....I think I see now. I think the solution will be to not export connect and users can call ODBC.connect.

@quinnj quinnj closed this as completed Jul 22, 2013
IanButterworth pushed a commit that referenced this issue Feb 19, 2024
Stdlib: Pkg
URL: https://github.com/JuliaLang/Pkg.jl.git
Stdlib branch: master
Julia branch: master
Old commit: 6dd0e7c9e
New commit: 76070d295
Julia version: 1.12.0-DEV
Pkg version: 1.11.0(Does not match)
Bump invoked by: @IanButterworth
Powered by:
[BumpStdlibs.jl](https://github.com/JuliaLang/BumpStdlibs.jl)

Diff:
JuliaLang/Pkg.jl@6dd0e7c...76070d2

```
$ git log --oneline 6dd0e7c9e..76070d295
76070d295 Prevent repl crash on invalid command (#3800)
d267986c2 RFC: stop testing non-ARM on mac on CI (#3794)
2571be6d1 CI: Add Apple Silicon (macOS aarch64) to the CI matrix (#3793)
3075fb78c Simplify Pkg.Registry APIs. (#3785)
e6f1e0902 Explain about Manifest.toml per julia version (#3791)
```

Co-authored-by: Dilum Aluthge <dilum@aluthge.com>
KristofferC pushed a commit that referenced this issue Feb 26, 2024
Stdlib: Pkg
URL: https://github.com/JuliaLang/Pkg.jl.git
Stdlib branch: master
Julia branch: master
Old commit: 6dd0e7c9e
New commit: 76070d295
Julia version: 1.12.0-DEV
Pkg version: 1.11.0(Does not match)
Bump invoked by: @IanButterworth
Powered by:
[BumpStdlibs.jl](https://github.com/JuliaLang/BumpStdlibs.jl)

Diff:
JuliaLang/Pkg.jl@6dd0e7c...76070d2

```
$ git log --oneline 6dd0e7c9e..76070d295
76070d295 Prevent repl crash on invalid command (#3800)
d267986c2 RFC: stop testing non-ARM on mac on CI (#3794)
2571be6d1 CI: Add Apple Silicon (macOS aarch64) to the CI matrix (#3793)
3075fb78c Simplify Pkg.Registry APIs. (#3785)
e6f1e0902 Explain about Manifest.toml per julia version (#3791)
```

Co-authored-by: Dilum Aluthge <dilum@aluthge.com>
(cherry picked from commit 59102aa)
tecosaur pushed a commit to tecosaur/julia that referenced this issue Mar 4, 2024
…#53357)

Stdlib: Pkg
URL: https://github.com/JuliaLang/Pkg.jl.git
Stdlib branch: master
Julia branch: master
Old commit: 6dd0e7c9e
New commit: 76070d295
Julia version: 1.12.0-DEV
Pkg version: 1.11.0(Does not match)
Bump invoked by: @IanButterworth
Powered by:
[BumpStdlibs.jl](https://github.com/JuliaLang/BumpStdlibs.jl)

Diff:
JuliaLang/Pkg.jl@6dd0e7c...76070d2

```
$ git log --oneline 6dd0e7c9e..76070d295
76070d295 Prevent repl crash on invalid command (JuliaLang#3800)
d267986c2 RFC: stop testing non-ARM on mac on CI (JuliaLang#3794)
2571be6d1 CI: Add Apple Silicon (macOS aarch64) to the CI matrix (JuliaLang#3793)
3075fb78c Simplify Pkg.Registry APIs. (JuliaLang#3785)
e6f1e0902 Explain about Manifest.toml per julia version (JuliaLang#3791)
```

Co-authored-by: Dilum Aluthge <dilum@aluthge.com>
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

3 participants