Skip to content

Commit

Permalink
Clean up Project.toml, bump version, remove using Pkg
Browse files Browse the repository at this point in the history
  • Loading branch information
ScottPJones committed Oct 4, 2018
1 parent 05e1ce1 commit ed74187
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 12 deletions.
8 changes: 6 additions & 2 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,13 @@ keywords = ["Packages", "API", "Modules"]
license = "MIT"
desc = "Macro to help manage module and package APIs"
authors = ["ScottPJones <[email protected]>"]
version = "0.1.6"
version = "0.1.7"

[deps]
Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"

[extras]
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
InternedStrings = "7d512f48-7fb1-5a58-b986-67e6dc259f01"

[targets]
test = ["Test", "InternedStrings"]
2 changes: 1 addition & 1 deletion REQUIRE
Original file line number Diff line number Diff line change
@@ -1 +1 @@
julia 0.6
julia 0.6 2-
12 changes: 3 additions & 9 deletions src/ModuleInterfaceTools.jl
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,9 @@ module ModuleInterfaceTools

const debug = Ref(false)

const V6_COMPAT = VERSION < v"0.7.0-DEV"
const V6_COMPAT = VERSION < v"0.7-"
const BIG_ENDIAN = (ENDIAN_BOM == 0x01020304)

@static if !V6_COMPAT
using Pkg
export Pkg
end

_stdout() = @static V6_COMPAT ? STDOUT : stdout
_stderr() = @static V6_COMPAT ? STDERR : stderr

Expand Down Expand Up @@ -147,7 +142,7 @@ end
_api_list(mod::Module) = (_api_display(mod, :__api__) ; _api_display(mod, :__tmp_api__))

function _api_freeze(mod::Module)
ex = :( global const __api__ = ModuleInterfaceTools.API(__tmp_api__) ; __tmp_api__ = nothing )
ex = :( const __api__ = ModuleInterfaceTools.API(__tmp_api__) ; __tmp_api__ = nothing )
isdefined(mod, :__tmp_api__) && m_eval(mod, :( __tmp_api__ !== nothing ) ) && m_eval(mod, ex)
nothing
end
Expand Down Expand Up @@ -210,8 +205,7 @@ end
"""Initialize the temp api variable for this module"""
_init_api(curmod) =
isdefined(curmod, :__tmp_api__) ||
m_eval(curmod, :( export @api, ModuleInterfaceTools ;
global __tmp_api__ = ModuleInterfaceTools.TMP_API($curmod)))
m_eval(curmod, :( global __tmp_api__ = ModuleInterfaceTools.TMP_API($curmod)))

"""Add symbols"""
function _add_symbols(curmod, grp, exprs)
Expand Down

0 comments on commit ed74187

Please sign in to comment.