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

fixed show methods using Cairo for julia v0.5 #907

Merged
merged 2 commits into from Oct 6, 2016

Conversation

tauu
Copy link

@tauu tauu commented Oct 4, 2016

Try blocks behave differently in julia v0.5 compared to v0.4. The new
behaviour caused the show methods requiring Cairo to be defined in
local scope instead of global scope, which in turn prevented them from
being used. See also:
JuliaLang/julia#18767

Try blocks behave differently in julia v0.5 compared to v0.4. The new
behaviour caused the show methods requiring Cairo to be defined in
local scope instead of global scope, which in turn prevented them from
being used. See also:
  JuliaLang/julia#18767
@coveralls
Copy link

Coverage Status

Coverage decreased (-0.1%) to 65.695% when pulling 82fe1e1 on tauu:pull-request/82fe1e13 into 22d4659 on dcjones:master.

1 similar comment
@coveralls
Copy link

coveralls commented Oct 4, 2016

Coverage Status

Coverage decreased (-0.1%) to 65.695% when pulling 82fe1e1 on tauu:pull-request/82fe1e13 into 22d4659 on dcjones:master.

Copy link
Member

@tlnagy tlnagy left a comment

Choose a reason for hiding this comment

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

The build is failing on Julia v0.4?

@@ -969,18 +969,16 @@ end

try
getfield(Compose, :Cairo) # throws if Cairo isn't being used
@compat function show(io::IO, ::MIME"image/png", p::Plot)
@compat global show(io::IO, ::MIME"image/png", p::Plot) =
Copy link
Member

Choose a reason for hiding this comment

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

Shouldn't this be global function show?

Copy link
Author

Choose a reason for hiding this comment

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

function can be omitted for online functions :-) I did remove function on purpose as in julia v0.4 the following code works:

try
 global foo(x)=x+1
end

while the following code raises an error:

try
  global function foo(x)
    x+1
  end
end

Nevertheless, a different method for fixing this problem was suggested in JuliaLang/julia#18767 . So I'll give it a try. :-)

@tlnagy
Copy link
Member

tlnagy commented Oct 5, 2016

Thanks! I'm waiting for JuliaIO/FileIO.jl#85 to merge before I reboot the tests and make sure everything is okay.

@compat function show(io::IO, ::MIME"application/postscript", p::Plot)
draw(PS(io, Compose.default_graphic_width,
Compose.default_graphic_height), p)
Compose.default_graphic_height), p);
Copy link
Member

Choose a reason for hiding this comment

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

Semi-colon is unnecessary, right?

@tlnagy
Copy link
Member

tlnagy commented Oct 5, 2016

So JuliaIO/FileIO.jl#85 is resolved and I rebooted the tests, if they are all green, I'll go ahead and merge this in

@tlnagy tlnagy merged commit 3464059 into GiovineItalia:master Oct 6, 2016
@coveralls
Copy link

coveralls commented Oct 6, 2016

Coverage Status

Coverage increased (+0.06%) to 65.897% when pulling 6e49114 on tauu:pull-request/82fe1e13 into 22d4659 on dcjones:master.

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.

None yet

3 participants