Skip to content

Commit 146b945

Browse files
committed
Use cur_mod() instead of macro inside at-api definition
1 parent aa2c37c commit 146b945

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

.travis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ matrix:
2727

2828
## uncomment the following lines to override the default test script
2929
script:
30-
# - julia -e 'mit="ModuleInterfaceTools"; sa="StrAPI"; loc="https://github.com/JuliaString"; if VERSION < v"0.7.0-DEV.5183"; Pkg.clone(pwd()); Pkg.clone("$loc/$sa.jl"); Pkg.checkout(sa, "master"); Pkg.test(mit, coverage=true); else; using UUIDs; import Pkg; p = "Project.toml"; uuid = "5cb8414e-7aab-5a03-a681-351269c074bf"; write(p, replace(read(p, String), uuid => uuid4())); Pkg.add(sa); Pkg.add(pwd()); Pkg.up(); Pkg.test(; coverage=true); end'
31-
- julia -e 'mit="ModuleInterfaceTools"; sa="StrAPI"; loc="https://github.com/JuliaString"; if VERSION < v"0.7.0-DEV.5183"; Pkg.clone(pwd()); Pkg.clone("$loc/$sa.jl"); Pkg.checkout(sa, "master"); Pkg.test(mit, coverage=true); else; import Pkg; Pkg.add(sa); Pkg.add(pwd()); Pkg.up(); Pkg.test(; coverage=true); end'
30+
# - julia -e 'mit="ModuleInterfaceTools"; sa="StrAPI"; loc="https://github.com/JuliaString"; if VERSION < v"0.7.0-DEV.5183"; Pkg.clone(pwd()); Pkg.clone("$loc/$sa.jl"); Pkg.checkout(sa, "master"); else; using UUIDs; import Pkg; p = "Project.toml"; uuid = "5cb8414e-7aab-5a03-a681-351269c074bf"; write(p, replace(read(p, String), uuid => uuid4())); Pkg.add(sa); Pkg.add(pwd()); Pkg.up(); end; Pkg.test(mit; coverage=true)'
31+
- julia -e 'mit="ModuleInterfaceTools"; sa="StrAPI"; loc="https://github.com/JuliaString"; if VERSION < v"0.7.0-DEV.5183"; Pkg.clone(pwd()); Pkg.clone("$loc/$sa.jl"); Pkg.checkout(sa, "master"); else; import Pkg; Pkg.add(sa); Pkg.add(pwd()); Pkg.up(); end; Pkg.test(mit; coverage=true)'
3232
after_success:
3333
# push coverage results to Coveralls
3434
- julia -e 'cd(Pkg.dir("ModuleInterfaceTools")); Pkg.add("Coverage"); using Coverage; Coveralls.submit(Coveralls.process_folder())'

src/ModuleInterfaceTools.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ end
122122
123123
"""
124124
macro api(cmd::Symbol)
125-
mod = @static V6_COMPAT ? current_module() : @__MODULE__
125+
mod = @static V6_COMPAT ? current_module() : cur_mod()
126126
cmd == :list ? _api_list(mod) :
127127
cmd == :freeze ? _api_freeze(mod) :
128128
cmd == :test ? _api_test(mod) :
@@ -379,7 +379,7 @@ function _do_list(curmod, cpy, cmd, mod, nam, grp, lst)
379379
end
380380

381381
macro api(cmd::Symbol, exprs...)
382-
_api((@static V6_COMPAT ? current_module() : @__MODULE__), cmd, exprs)
382+
_api((@static V6_COMPAT ? current_module() : cur_mod()), cmd, exprs)
383383
end
384384

385385
end # module ModuleInterfaceTools

0 commit comments

Comments
 (0)