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

0.7 compatibility (mostly) #623

Closed
wants to merge 11 commits into from
Closed

0.7 compatibility (mostly) #623

wants to merge 11 commits into from

Conversation

stevengj
Copy link
Member

@stevengj stevengj commented Feb 3, 2018

This fixes most of the 0.7 compatibility issues. (Closes #637. Should close #646 too.)

Notebooks can now start and execute cells without deprecation warnings (assuming you have JSON and ZMQ master). Documentation tooltips work. Tests pass.

Some things are still broken, e.g. stdio seems borked at the moment.

@stevengj
Copy link
Member Author

stevengj commented Feb 3, 2018

Tests are re-enabled on nightly, reverting #622 (cc @davidanthoff).

@stevengj
Copy link
Member Author

stevengj commented Feb 3, 2018

Note that a new version of ZMQ needs to be tagged for this to pass.

@jd-lara
Copy link

jd-lara commented May 14, 2018

I am getting the same error LoadError: UndefVarError: JULIA_HOME not defined already ran Pkg.checkout("IJulia")

@appleparan
Copy link

Bump for 0.7-alpha!

@aviks
Copy link
Member

aviks commented Jun 4, 2018

I tried this on the alpha, and while it builds and loads, the kernel crashes. I can't seem to find why, even with verbose=true and capture_xxx = false

@stevengj
Copy link
Member Author

stevengj commented Jun 7, 2018

Just got back to working on this. Fixed a crash in the heartbeat thread. stdio is still not working — have to figure out the interaction of IJulia's stdio redirection with what Compat does.

@appleparan
Copy link

appleparan commented Jun 8, 2018

In my opinion, because STDOUT, STDERR, STDIN are changed to lowercase in 0.7, uppercase(s) doesn't need to be forced.

IJulia.jl/src/stdio.jl

Lines 28 to 36 in 4fef79f

for s in ("stdout", "stderr", "stdin")
f = Symbol("redirect_", s)
S = QuoteNode(Symbol(uppercase(s)))
@eval function Base.$f(io::IJuliaStdio)
io[:jupyter_stream] != $s && throw(ArgumentError(string("expecting ", $s, " stream")))
eval(Base, Expr(:(=), $S, io))
return io
end
end

EDIT: https://travis-ci.org/appleparan/IJulia.jl/jobs/389795873 after change from uppercase to lowercase, it passes at least nightly on mac (I don't know why libgit2 problem occurs in linux build)

EDIT2: https://travis-ci.org/appleparan/IJulia.jl/builds/389981492 test passes on v0.7, but failed on v0.6 due to same reason but vice versa. Ah, that what you said about Compat, finally I understand.

@drewrobson
Copy link
Contributor

I was testing this today, and noticed a problem with showing backtraces. For example, a cell containing error("oops") brings down the kernel. I tracked this down to "UndefVarError: ip_matches_func not defined" at execute_request.jl:68

I was able to fix this by replacing addr->REPL.ip_matches_func with addr->Base.ip_matches_func

Now running error("oops") in a notebook prints the error and backtrace as it should!

@appleparan
Copy link

appleparan commented Jun 10, 2018

@drewrobson You can solve this problem by my commit appleparan@06e44e6#diff-de7d7de4e5274faf81359c1792eae1a8R66

The real problem is how to deal with "STD*" and "std*". I can't force with lowercase ver. because of 0.6 compatibility. Just using Compat can't solve the problem even it has STD*

@stevengj
Copy link
Member Author

Thanks @appleparan, I merged your patch into this PR.

@appleparan
Copy link

Actually, I made a mistake on split. If this pr is merged, you should use Compat.split instead

@stevengj
Copy link
Member Author

We also need JuliaLang/Compat.jl#573 for the chr2ind/ind2chr deprecation that occurs during tab completion.

@staticfloat
Copy link
Member

Confirmed that latest master works with this branch (e.g. I was able to install, build and run IJulia from this branch, open up jupyer lab and run 1+1 in a cell)

@staticfloat
Copy link
Member

Ah, I didn't realize that logging wasn't working yet. Here's a workaround PR against nightly: #667

@@ -19,7 +19,7 @@ function prog_version(prog)
return nothing
end
try
return convert(VersionNumber, v)
return VersionNumber(v)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

At some point I want to change this to VersionParsing.vparse(v)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there reason not to add that code to Base for the VersionNumber constructor and/or the @v_str macro?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My impression is that non-semver parsing is deemed out of scope for Base. By putting it in Base (in Julia 1.0) we would be committing to a particular nonstandard parsing scheme for a long time. The nice thing about having permissive parsing in a package is that it can be quickly updated when weird real-world examples arise.

See e.g. JuliaLang/julia#7282

@stevengj
Copy link
Member Author

stevengj commented Jul 6, 2018

Closing in favor of #671

@stevengj stevengj closed this Jul 6, 2018
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 this pull request may close these issues.

Overflow of tab completion tips in Jupyter Lab Build issue on nightly - JULIA_HOME not defined
7 participants