Skip to content

Commit fb4e8ee

Browse files
authored
Merge pull request #49 from jmert/fix48
Interpolate PkgId expression, working around #48
2 parents 1f71c39 + b4a1fbe commit fb4e8ee

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/require.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,14 +58,14 @@ macro require(pkg, expr)
5858
return Expr(:macrocall, Symbol("@warn"), __source__,
5959
"Requires now needs a UUID; please see the readme for changes in 0.7.")
6060
id, modname = parsepkg(pkg)
61-
pkg = Base.PkgId(Base.UUID(id), modname)
61+
pkg = :(Base.PkgId(Base.UUID($id), $modname))
6262
quote
6363
if !isprecompiling()
64-
listenpkg(Base.PkgId(Base.UUID($id), $modname)) do
64+
listenpkg($pkg) do
6565
withpath($(string(__source__.file))) do
66-
err($__module__, $(pkg.name)) do
66+
err($__module__, $modname) do
6767
$(esc(:(eval($(Expr(:quote, Expr(:block,
68-
:(const $(Symbol(pkg.name)) = Base.require($pkg)),
68+
:(const $(Symbol(modname)) = Base.require($pkg)),
6969
expr)))))))
7070
end
7171
end

0 commit comments

Comments
 (0)