Open njc46 opened 9 years ago
This is a name shadowing issue that pops up from time to time. using Compose
exports its own pad
function which that piece of code tries to call.
cc @dcjones another name collision between compose and Escher: pad
Yep Escher.pad
fixed the problem. Same thing happens with title
Ouch. I'm wondering if I should put Escher functions in submodules that are not imported by default.
So you would have to do something like using Escher.Layout
or using Escher.Typography
to get these functions. Then you can chose which pad
or title
you want to use by either including Compose
first or Escher.Layout
first. But may not be worth the hassle and there will have to be many many submodules.
This kind of thing is more awkward than the conflicting unit names because at least there it was obvious that there was some common notion that needed to be factored out. Here, if we factored out pad
into a separate package, it would be pretty contrived. I'm not sure what we can do besides qualify these things.
Same thing happens with
title
What does title conflict with? There's a title
in Gadfly, but that's typically qualified as Guide.title
anyway.
I quickly tried to recreate the problem with title
, but was unable to do so. Previously, it would error with something like "expected function, but got class". And I before, I thought qualifying it as Escher.title
fixed it.
Will post back if I see it again.
One more offender is fontsize
Is this still an issue or can it be closed?
Still an issue. No clear solution is available though
Trying rule 2 example 1 from https://shashi.github.io/Escher.jl/ gives error in padding. Seems to apply to all calls of
pad
. Escher 0.1.0Error:
'pad_outer' has no method matching pad_outer(::Measure{MeasureNil,MeasureNil}, ::FontColor)